Fortunately, in this simpler case, we can streamline and specialize the sustain handling to be more useful — hence my new Restart Poisons addon. Here's the scoop:
- Any time one of your active poison sustains is deactivated by something other than user action, we flag it as having been forcibly deactivated and make a note to restart it. Like Restart Sustains, you'll get a prominent particle effect and a status indicator in the buffs display to let you know it's happened.
- Since all the poison enhancement sustains are instant-use, we don't have to worry about juggling restarts while resting; instead, we just reactivate them as soon as they become available.
- By default, if you activate a poison sustain while you already have two other ones active, the game will randomly deactivate one of them. That's kind of annoying, so instead we prompt for which sustain to deactivate. (Or if you hit the wrong talent by accident, you can just cancel out.)
- And speaking of hitting the wrong talent by accident,
we follow Restart Sustains' lead and add a new game option "Gameplay | Confirm deactivation of poison enhancement sustains", which pretty much does what it sounds like. (Note that deactivating a poison sustain by way of the prompt above won't ping this option.)
[And as with Restart Sustains, I figure this addon will be viewed by some as "protection from not paying attention", and thus would be suitable for merging into ZOmnibus but not ZOmnibus Lite.]
[Implementation notes:]
Code: Select all
Hooks:
ToME:load [to load status effect definition]
ToME:run [to add juggling to poison sustains]
GameOptions:generateList [to add our game option]
Superload:
mod.class.Actor:
forceUseTalent() [to warn about poison sustains being deactivated]
isTalentConfirmable() [to confirm deactivation of poison sustains]
mod.class.Player:
onTalentCooledDown() [to restart deactivated poison sustains]