Closed phylll closed 2 years ago
Requires #32
A new applyHealing
script is part of efb5db2bf07cd152cb16bf073027048296c90971, with temporary restrictions left on the todo list
When a temporary restriction begins, e.g. defense
reduces health to below 50%, which triggers a cap on endurance at 50%, as well:
m3mgd_token[ID]_[attr]
whose name needs to include both the token_id
and the attribute being limited (in its name, since otherwise we won't be able to store more than one restricted attribute per token) and the number of endurance points or movement units (in "current") since generic NPC tokens do not offer storage unique to each token.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,
token_id
-based centrally stored attribute, the script recognizes that a temporary ceiling is in place on some attribute(s). If the ceiling remains in place, the restricted attribute cannot exceed the ceiling, and e.g. the good night's rest brings the character only up to half their endurance as long as they haven't recovered from their major injuries.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.
So far, new functions m3mgdSetAttrCeiling(tokenID, enduranceAttr, enduranceCeiling)
and m3mgdReleaseAttrCeiling(tokenID, enduranceAttr)
work as intended.
Remaining issues:
bar2
or the AP
attribute. If the set and release scripts happen to use different ones, the release script cannot find the stored value._m3mgdGetStoredAttr()
.m3mgdModifyHealth()
implements the setting and releasing of ceilings. While a ceiling is in place, however, m3mgdModifyEndurance()
also needs to respect it: an energy drink or a full night's sleep won't provide endurance gain beyond the ceiling.rest
and applyHealing
to let players know why their expensive energy drinks don't work.Closing, except für the very last bullet point in the last comment, which is moved to #40
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:
defense
scripts would put a certain restriction into effect by making the change (toB
orAP
, for example) while storing the previous value (which might be unequal to.max
) in some temporary attribute.