B7: Weapon roster and consumables

Eight slot weapons: the six from the design plus the rivet repeater (fast,
short-range automatic) and the harpoon gun (slow heavy bolt, 2.5x damage to
built pieces). Four quality tiers, Rusted to Captain's, scale damage and reload
time. The line thrower now yanks the shooter towards where its line lands,
through a data field (pull_speed) any weapon can use.

Four consumables: sailcloth bandage (heals to 75), brine tonic, cork vest and
the new tar patch. Fire with one held starts using it if it would help; it
takes effect after its use time. Changing slot, dropping, sprinting, swimming
or elimination interrupts it and uses nothing up. All checks run on the server.

A data-validation test covers every weapon, tier, consumable and ammunition
type, including unknown stat keys, name format and that every ammo type is
used. The GDD's weapons section lists the roster.

Closes #21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-11 17:26:04 -05:00
co-authored by Claude Opus 5.5
parent ed46b6e19f
commit 5d2a2bbc31
12 changed files with 434 additions and 22 deletions
+28 -8
View File
@@ -193,21 +193,41 @@ the gap at `BREACH_FLOW_METRES_PER_SECOND`.
## Weapons and items
`WEAPONS` holds damage, fire rate, magazine size, reload time, range falloff and rarity.
`WEAPONS` holds damage, fire rate, magazine size, reload time, range falloff, spread,
ammunition and rarity. Every weapon besides the boathook takes an inventory slot.
| Name | Role |
|---|---|
| Boathook | Melee and harvesting; always carried |
| Fowling Piece | Close-range spread |
| Boathook | Melee and harvesting; always carried, never in a slot |
| Fowling Piece | Close-range spread of shot |
| Rivet Repeater | Fast, short-range automatic |
| Dock Carbine | Mid-range automatic |
| Signal Revolver | Accurate sidearm |
| Whaler's Longgun | Long-range, single shot |
| Line Thrower | Fires a line to pull yourself to a surface |
| Whaler's Longgun | Long-range single shot; a heavy ball that drops with distance |
| Harpoon Gun | Slow, heavy bolt; tears through built pieces |
| Line Thrower | Fires a line and yanks you towards where it lands |
| Powder Keg | Thrown explosive; damages structures heavily |
Items are in `ITEMS`: Sailcloth Bandage restores health, Brine Tonic restores more
health slowly, and Cork Vest adds armor, up to `PLAYER_MAX_ARMOR`. A player has
`PLAYER_MAX_HEALTH` health and `INVENTORY_SLOTS` carried item slots.
Weapons come in four quality tiers, from `WEAPON_TIERS`: Rusted, Seaworthy,
Brass-Fitted and Captain's. Better tiers hit harder and reload faster.
Ammunition (`AMMO`) is carried apart from the slots: birdshot, cartridges, heavy balls,
harpoons and lines, each up to its own cap.
Consumables are in `ITEMS`. Fire with one held starts using it, and it takes effect
after its use time. Changing slot, sprinting or swimming interrupts it and nothing is
used up; taking damage doesn't. An item that would do nothing can't be started.
| Name | Effect |
|---|---|
| Sailcloth Bandage | Restores some health, up to 75 |
| Brine Tonic | Restores a lot of health, slowly |
| Tar Patch | Adds a little armor, quickly |
| Cork Vest | Adds a lot of armor |
A player has `PLAYER_MAX_HEALTH` health, up to `PLAYER_MAX_ARMOR` armor, which takes
damage first, and `INVENTORY_SLOTS` slots. The top `HEAD_HEIGHT` of the body takes
each weapon's headshot multiplier.
## Controls