phylll / mychs-macro-magic

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

Healing & attack scripts: manage status markers & health- or exhaustion-related temporary restrictions #33

Closed phylll closed 2 years ago

phylll commented 2 years ago

We're missing a script to process healing or energy boosts in ways that automatically remove exhaustion or injury markers set by our attack scripts.

Once/if we add such a script, we could easily also automate the annoying handling of temporary restrictions to endurance or movement based on injury or exhaustion levels:

phylll commented 2 years ago

Requires #32

phylll commented 2 years ago

Requires https://github.com/michael-buschbeck/mychs-macro-magic/issues/160

phylll commented 2 years ago

A new applyHealing script is part of efb5db2bf07cd152cb16bf073027048296c90971, with temporary restrictions left on the todo list

phylll commented 2 years ago

When a temporary restriction begins, e.g. defense reduces health to below 50%, which triggers a cap on endurance at 50%, as well:

Generic NPCs usually never recover, they just die or become incapacitated. There needs to be a way to clean up the storage sheet, though. Otherwise it will soon be full of attributes relating to long-dead orcs. The challenge is that MMM scripts can only access attributes if they know their names, so auto-cleanup is possible only as long as the token in question is subject to a script. One solution would be for the GM to operate a die script to clean up after each token.

Individual NPCs or PCs will recover, either through rest or applyHealing of one kind or another. In practice, the most common case in which endurance exceeds health is after significant rest. In that case,

phylll commented 2 years ago

From the list of combat-related temporary attribute restrictions ...

... the only one we automate is endurance, so it should be enough for now to manage that.

phylll commented 2 years ago

So far, new functions m3mgdSetAttrCeiling(tokenID, enduranceAttr, enduranceCeiling) and m3mgdReleaseAttrCeiling(tokenID, enduranceAttr) work as intended.

Remaining issues:

phylll commented 2 years ago

Closing, except für the very last bullet point in the last comment, which is moved to #40