CleverRaven/Cataclysm-DDA — pull request #5974 by ClockworkZombie (2014-02-05 05:57:03+00:00)
Title: submitting system for retributive monster strikes for review... yet again.

Sorry about the multiple requests- ignore the other ones. This is at least neater and doesn't include my attempts to sync via the github website.

Other PRs this has been posted under: #5943, #5965 (both closed)

Ported and buffed the current scheme for damage on hit from shock zombies and shadows to a new framework for triggering things that happen when something is hit. The longer-term idea is to make combat a bit more dynamic and strategic by incentivizing/penalizing different types of attacks beyond basic damage type resistance/weakness and armour piercing. This will also hopefully help keep the monster-specific stuff out of the generic attack/damage routines.

This is roughly analogous to the current sp_attack system. As with that system, the "defense" moves don't really need to be beneficial to the monster, it's just a way to have specific things happen when the monster gets hit. As per earlier feedback, the current zapback member (read: move) has no move cost because the old shock didn't. If/when other stuff is added, some of those on-hit moves may merit a cost but that will be up to whomever adds them, the intention is not to give monsters a bunch of free attacks.

As for the zapback buff, this is intended to make the penalty from striking a shock zombie worth noticing. a 50% chance of 1 damage that can be blocked by wearing gloves is pretty weaksauce.

Looking for feedback, as this might also belong under on_gethit, but it doesn't look like that's been implemented for monsters yet. I'd be happy to add a few more things to build on (quill attacks, spores, disarming, etc.) but figured some input would be good before ploughing forward.

Thanks all!