phylll / mychs-macro-magic

A simple, sane, and friendly little scripting language for your Roll20 macros.
MIT License
0 stars 0 forks source link

Combat scripts should automatically process effects of major injuries registered by status markers #60

Closed phylll closed 2 years ago

phylll commented 2 years ago

Major injuries e.g. resulting from critical failures in combat are registered using a wide range of additional status markers. Their effects on combat rolls should be processed automatically by combat scripts.

Here's the list of conditions and markers, with their immediate combat effects only (longer-term effects over several minutes or hours are ignored here and need to be roleplayed, see infoboxes):

Condition Status Marker One-off Every combat round
AP=0 green -4 on any attack & defense
LP_weniger_1/2 yellow 50% endurance cap
LP_kleiner_4 red no attack, no defense
Schock brown
LP<=0 death_zone 1d6-abs(LP) minutes to live / immediate death if result is < 0 no attack, no defense
Bewusstlos pummeled
Vergiftet skull
Arm_schwereVerl. half_haze grab -4 for fighting (attacks and defense) for use of off hand
Auge_schwereVerl. bleeding_eye -2 on seeing
Bein_schwereVerl. tread -4 on defense
Hals_schwereVerl. sleepy -1LP/-1AP per round
Halswirbel_schw.V. back_pain 10% risk of death
innere_Verletzung all_for_one broken_heart no attack, no defense
Kopf_schwereVerl. ninja_mask no attack, no defense
Ohr_schwereVerl. screaming -2 on hearing
Rippen_schwereVerl. white_tower -4 on everything
Wirbelsäule_schwV. spanner exhausted=endurance cap 0
phylll commented 2 years ago

Among round-over-round effects, there are three types in the above list:

  1. Making a type of action (attack, defense, whatever) completely impossible: This needs to be checked at the beginning of a script, so that the script can be aborted or run only to process the effects of external events (defenseless "defense").
  2. Adding modifiers: They need to be taken into account and logged during the script
  3. End-of-round effects: losing health or endurance or your life, sometimes only for a certain probability (rolling a die) needs to be registered once per round, at the end, and logged for the user.
phylll commented 2 years ago

d5283523d33abcd54b9622fa211f9cf034272259 implements (1) and (2) for defense, along with some general plumbing for everything else. By 32f5fb386366c24a6af8c7724a8b79b5c1cf3489, meleeAttack and rangedAttack cover (1) and (2), as well, and the new endOfRoundEffects script is available to handle (3).

Once this issue is resolved, at least two other things should be streamlined:

a. Rune blade marker-related modifiers could be added to the central m3mgdInjuryStatus struct. b. All the text used to report on injury status by various m3mgd_XXX functions should be pulled from the struct, as well.

phylll commented 2 years ago

Fully implemented (without target status markers affecting a different token's attack and without refactoring injury status texts in other m3mgd_XXX functions) in 606a8aeeafc8811746519d2245d809794508b65e