forked from cataclysmbnteam/Cataclysm-BN
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shields can interact with ranged attacks, add some vanilla shields (c…
…ataclysmbnteam#2851) * Commit what I've got for the moment * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update character.cpp * Update character.cpp * [Eternal Screaming] * Update src/creature.h Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix it up to a basic working state * Continue code tweaks, add ballistic shield * And some hopefully final touches * Commit what I've got for the moment * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update character.cpp * Update character.cpp * [Eternal Screaming] * Update src/creature.h Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix it up to a basic working state * Continue code tweaks, add ballistic shield * Update JSON_FLAGS.md * Update src/character.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * refactor: extract covered by shield * refactor: extract shieldlevel * refactor: extract damage calculation * refactor: use switch instead using map is kinda overkill * Fix a slight recipe inconsistency I spotted --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: scarf <[email protected]>
- Loading branch information
1 parent
42454cc
commit 6dcdd71
Showing
18 changed files
with
331 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
[ | ||
{ | ||
"id": "shield_wooden", | ||
"type": "ARMOR", | ||
"name": { "str": "wooden shield" }, | ||
"description": "A crude wooden shield, lacking any metal or leather reinforcement. Tolerable weight but not very tough.", | ||
"weight": "3 kg", | ||
"volume": "3 L", | ||
"price": "50 USD", | ||
"price_postapoc": "5 USD", | ||
"to_hit": -1, | ||
"bashing": 8, | ||
"material": [ "wood" ], | ||
"symbol": "[", | ||
"color": "brown", | ||
"covers": [ "arm_either", "hand_either" ], | ||
"coverage": 90, | ||
"encumbrance": 15, | ||
"material_thickness": 3, | ||
"techniques": [ "WBLOCK_2" ], | ||
"flags": [ "OVERSIZE", "BELTED", "RESTRICT_HANDS", "BLOCK_WHILE_WORN" ] | ||
}, | ||
{ | ||
"id": "shield_wooden_large", | ||
"type": "ARMOR", | ||
"name": { "str": "large wooden shield" }, | ||
"description": "An crude wooden tower shield, lacking any metal or leather reinforcement. Bulky, but offers a decent amount of protection.", | ||
"weight": "5 kg", | ||
"volume": "5 L", | ||
"price": "60 USD", | ||
"price_postapoc": "750 cent", | ||
"to_hit": -2, | ||
"bashing": 10, | ||
"material": [ "wood" ], | ||
"symbol": "[", | ||
"color": "brown", | ||
"covers": [ "arm_either", "hand_either" ], | ||
"coverage": 90, | ||
"encumbrance": 25, | ||
"material_thickness": 3, | ||
"techniques": [ "WBLOCK_3" ], | ||
"flags": [ "OVERSIZE", "BELTED", "RESTRICT_HANDS", "BLOCK_WHILE_WORN" ] | ||
}, | ||
{ | ||
"id": "shield_riot", | ||
"type": "ARMOR", | ||
"name": { "str": "riot shield" }, | ||
"description": "A large but fairly light plastic shield, designed for riot police officers. Not too encumbering, but designed for fending off thrown rocks rather than bullets.", | ||
"weight": "2500 g", | ||
"volume": "5 L", | ||
"price": "200 USD", | ||
"price_postapoc": "25 USD", | ||
"to_hit": -1, | ||
"bashing": 4, | ||
"material": [ "plastic" ], | ||
"symbol": "[", | ||
"color": "light_gray", | ||
"covers": [ "arm_either", "hand_either" ], | ||
"coverage": 100, | ||
"encumbrance": 10, | ||
"material_thickness": 4, | ||
"environmental_protection": 3, | ||
"techniques": [ "WBLOCK_3" ], | ||
"flags": [ "OVERSIZE", "BELTED", "RESTRICT_HANDS", "BLOCK_WHILE_WORN" ] | ||
}, | ||
{ | ||
"id": "shield_ballistic", | ||
"type": "ARMOR", | ||
"name": { "str": "ballistic shield" }, | ||
"description": "A heavy composite shield used by SWAT teams and other armed forces. It can handle the occasional pistol bullet, but its heavy-duty nature means it's quite encumbering and doesn't cover the legs very well.", | ||
"weight": "8 kg", | ||
"volume": "4 L", | ||
"price": "1000 USD", | ||
"price_postapoc": "50 USD", | ||
"to_hit": -3, | ||
"bashing": 12, | ||
"material": [ "ceramic", "kevlar" ], | ||
"symbol": "[", | ||
"color": "light_gray", | ||
"covers": [ "arm_either", "hand_either" ], | ||
"coverage": 100, | ||
"encumbrance": 30, | ||
"material_thickness": 6, | ||
"environmental_protection": 2, | ||
"techniques": [ "WBLOCK_2" ], | ||
"flags": [ "OVERSIZE", "BELTED", "RESTRICT_HANDS", "BLOCK_WHILE_WORN" ] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.