feat: ship templates, crew fields, and read/edit dashboard
- Add crew_req, hardpoints, cargo fields (DB migration + server + types) - Add 10 ship templates from Appendix A (Caravel, Galleon, Sloop, etc.) - Enhanced CreateShipModal with template picker that auto-fills all stats - Dashboard defaults to compact read-only view; Edit button toggles to editable steppers/dropdowns - New CrewSection showing crew required, hardpoints, and cargo - Two-column form layout in create modal for better use of space - Fix .gitignore data/ pattern to only match root-level data directory Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
146
web/src/data/ship-templates.ts
Normal file
146
web/src/data/ship-templates.ts
Normal file
@@ -0,0 +1,146 @@
|
||||
export interface ShipTemplate {
|
||||
name: string;
|
||||
hull_max: number;
|
||||
armor_max: number;
|
||||
ac: number;
|
||||
con_save: number;
|
||||
speed: number;
|
||||
maneuver_class: string;
|
||||
size_category: string;
|
||||
crew_req: number;
|
||||
hardpoints: number;
|
||||
cargo: number;
|
||||
}
|
||||
|
||||
export const shipTemplates: ShipTemplate[] = [
|
||||
{
|
||||
name: 'Caravel',
|
||||
hull_max: 50,
|
||||
armor_max: 20,
|
||||
ac: 13,
|
||||
con_save: 3,
|
||||
speed: 300,
|
||||
maneuver_class: 'B',
|
||||
size_category: 'Small',
|
||||
crew_req: 8,
|
||||
hardpoints: 4,
|
||||
cargo: 15,
|
||||
},
|
||||
{
|
||||
name: 'Galleon',
|
||||
hull_max: 75,
|
||||
armor_max: 35,
|
||||
ac: 13,
|
||||
con_save: 4,
|
||||
speed: 300,
|
||||
maneuver_class: 'C',
|
||||
size_category: 'Medium',
|
||||
crew_req: 20,
|
||||
hardpoints: 12,
|
||||
cargo: 40,
|
||||
},
|
||||
{
|
||||
name: 'Sloop',
|
||||
hull_max: 40,
|
||||
armor_max: 16,
|
||||
ac: 13,
|
||||
con_save: 3,
|
||||
speed: 300,
|
||||
maneuver_class: 'B',
|
||||
size_category: 'Small',
|
||||
crew_req: 8,
|
||||
hardpoints: 3,
|
||||
cargo: 10,
|
||||
},
|
||||
{
|
||||
name: 'Frigate',
|
||||
hull_max: 120,
|
||||
armor_max: 40,
|
||||
ac: 15,
|
||||
con_save: 7,
|
||||
speed: 300,
|
||||
maneuver_class: 'B',
|
||||
size_category: 'Medium',
|
||||
crew_req: 20,
|
||||
hardpoints: 12,
|
||||
cargo: 100,
|
||||
},
|
||||
{
|
||||
name: 'Hammership',
|
||||
hull_max: 150,
|
||||
armor_max: 40,
|
||||
ac: 15,
|
||||
con_save: 7,
|
||||
speed: 300,
|
||||
maneuver_class: 'C',
|
||||
size_category: 'Medium',
|
||||
crew_req: 24,
|
||||
hardpoints: 16,
|
||||
cargo: 150,
|
||||
},
|
||||
{
|
||||
name: 'Squid Ship',
|
||||
hull_max: 120,
|
||||
armor_max: 35,
|
||||
ac: 14,
|
||||
con_save: 7,
|
||||
speed: 300,
|
||||
maneuver_class: 'C',
|
||||
size_category: 'Medium',
|
||||
crew_req: 14,
|
||||
hardpoints: 7,
|
||||
cargo: 60,
|
||||
},
|
||||
{
|
||||
name: 'Man-O-War',
|
||||
hull_max: 75,
|
||||
armor_max: 25,
|
||||
ac: 15,
|
||||
con_save: 6,
|
||||
speed: 300,
|
||||
maneuver_class: 'C',
|
||||
size_category: 'Medium',
|
||||
crew_req: 10,
|
||||
hardpoints: 6,
|
||||
cargo: 30,
|
||||
},
|
||||
{
|
||||
name: 'Bombard',
|
||||
hull_max: 60,
|
||||
armor_max: 35,
|
||||
ac: 14,
|
||||
con_save: 4,
|
||||
speed: 300,
|
||||
maneuver_class: 'C',
|
||||
size_category: 'Small',
|
||||
crew_req: 10,
|
||||
hardpoints: 3,
|
||||
cargo: 15,
|
||||
},
|
||||
{
|
||||
name: 'Shrike Ship',
|
||||
hull_max: 40,
|
||||
armor_max: 20,
|
||||
ac: 15,
|
||||
con_save: 3,
|
||||
speed: 400,
|
||||
maneuver_class: 'A',
|
||||
size_category: 'Small',
|
||||
crew_req: 5,
|
||||
hardpoints: 3,
|
||||
cargo: 5,
|
||||
},
|
||||
{
|
||||
name: 'Whaleship',
|
||||
hull_max: 225,
|
||||
armor_max: 50,
|
||||
ac: 15,
|
||||
con_save: 4,
|
||||
speed: 200,
|
||||
maneuver_class: 'D',
|
||||
size_category: 'Large',
|
||||
crew_req: 12,
|
||||
hardpoints: 12,
|
||||
cargo: 250,
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user