I’m planning to add shields to the game. I have the jsons for items set up and that’s about it. So far, the way I think they should work is:
-Different types of shields (as opposed to a generic shield item); the main trade-off is between encumbrance and protection. A huge shield is going to slow you to a crawl but block almost anything you point it at. So far I’m planning to add: two-by-shield (craftable after low fabrication skill is reached), leather buckler (requires both fabrication and tailoring as well as, obviously, leather), riot shield (probably found in police stations or barricades), ballistic shield (barricades or labs?), scutum/tower shield (recipe should only be found in that one armormaking book).
-Allow the shield to be ‘readied’ - the wielder holds it up in front of themselves instead of leaving it on their arm, preventing them from attacking but increasing chance to block (detailed below).
-Some larger shields (scutum?) can be planted into the ground as stationary cover.
-Shields do not naturally provide protection to arms/hands; the attack code itself should handle this. Presence of a shield is factored in whenever an enemy attempts a ranged or melee attack. (Special attacks like lightning can probably get through.) This code takes effect just before the armor blocking code.
-Check for ranged:
What’s the projectile’s stats? If an NPC is throwing rocks at you they’ll be stopped without a problem. If they’re shooting arrows at you, however, then your puny two-by-shield probably isn’t going to cut it - a crude, thin wooden shield isn’t durable enough to stop an arrow and you’d need crazy reflexes to position it in time. Only ballistic shields (found in labs or police barricades?) can stop bullets, and nothing’s going to stop a grenade or missile.
If the shield is small, how good are the wielder’s reflexes (dodge skill or dexterity)? They need to have the shield in position. Bonuses are given for the shield being readied and the shield’s relative size to the wielder (coverage).
If the block is successful, check dexterity (or melee?) again. Taking a hit dead-on might reduce the shield’s durability; simply pushing the projectile to one side won’t.
-Check for melee:
Melee attacks are a little more complicated. First, compare the dexterity of both parties - if the enemy is considerably faster, they’ll be able to get around a shield easily; if the player is faster, they can knock most attacks aside.
If the attack hits the shield, compare strength. The shield might be knocked away - certain enemies (grabber zombies!) might specifically yank on the shield and receive a bonus to this. (If the player insists on holding onto the shield in this situation, they might possibly be knocked over!)
Dexterity/melee should be checked again if the block is successful - same direct hit vs. roll off situation as in ranged.
-Similarly to blocking, the player can only block one enemy (but multiple attacks from said enemy) per turn with a shield unless they have crazy high dexterity/dodge.
I haven’t added many items so I’m not that experienced in balancing things. I’ll look at the actual numbers when I submit this to github - right now, I’m worried about the balance of the concepts above. Suggestions?
Pull requested with a [WIP] tag; suggestions on github are also welcome (information there is likely more up-to-date).