Page 1 of 1

[v1.7.0+] Pre-Paid Hiemal Shield

Posted: Sat Jun 11, 2022 3:16 pm
by Zizzo
So I've been idly fiddling around with a kind of gimmicky "all-minions" skeleton/ghoul/dread Necromancer build, just to see if it can actually work (verdict's still out), and it reminded me afresh of a minor annoyance I've run into with Hiemal Shield: if your shield has been partly depleted, it will regenerate to full "10 turns after leaving combat" — which in practice usually works out to "long after any chance of actually, y'know, recouping the soul cost of said regeneration in a timely manner". Which isn't so bad if you're already below max souls and can collect some spares in advance while you're waiting for the reset, but if you're maxed out, you're likely throwing away some perfectly good souls that you could use to pay for your upcoming shield reset.

Now, if you're at all familar with my work, the minute I said "minor annoyance" you immediately thought, "yeah, he wrote an addon, didn't he?" :mrgreen: In particular, my new Pre-Paid Hiemal Shield addon. Here's how it works: If your Hiemal Shield is dinged and you're at max souls and you capture a soul via Soul Leech, that soul will be temporarily stored in a Hiemal Buffer, which will be used to recoup the soul cost of a shield reset when it happens. If your shield collapses completely (or you turn it off manually), that soul will go back into your soul bar if you have room for it.

[And this one strikes me as kind of questionable, so it's probably not a likely candidate for inclusion in a future version of ZOmnibus.]

[Implementation notes:]

Code: Select all

Hooks:
  ToME:load [to load our effect and fiddle some talents to use it]

Re: [v1.7.0+] Pre-Paid Hiemal Shield

Posted: Sun Nov 10, 2024 3:33 pm
by Zizzo
Two and a half years it's taken me to trip over the small conceptual problem with this addon: there are ways of gaining souls other than Soul Leech. :? Suppose, for instance (purely hypothetically, of course :oops: ), that you're putting together an oddball Adventurer build using Raze instead of Soul Leech as your soul source; since we hook specifically into Soul Leech, oops, no Hiemal Buffer for you. :(

Well, nothing special about Soul Leech AFAICT, so in v1a, just pushed out, we move our hook from there directly to Actor:incSoul(), meaning that any time you gain more souls than you can store, you have an opportunity to gain a Hiemal Buffer. We Apologize for the Oversight.™

Re: [v1.7.0+] Pre-Paid Hiemal Shield

Posted: Sun Nov 10, 2024 8:01 pm
by Zizzo
Sorry to bump this again so soon, but I just thought of another feature to add, after finding myself watching the Hiemal Buffer buff display and waiting for my Hiemal Shield to reset so it'll go away. So, in v1a.1, we add a countdown indicator, showing the number of turns remaining until your shield resets, or 'C' if the player is still in "combat mode" and the reset countdown hasn't started.

Re: [v1.7.0+] Pre-Paid Hiemal Shield

Posted: Wed Feb 05, 2025 5:01 pm
by Zizzo
And speaking of waiting for Hiemal Shield to reset so my Hiemal Buffer effect will go away… :roll: Being able to just rest it off would be ideal, but our effect isn't something that the game looks for to decide whether resting should continue, like depleted life or resources or a cooling-down talent. Well, turns out that's what the callbackOnRest() callback is for. :mrgreen: That's going out as v1b; We Apologize for the Convenience.™

Re: [v1.7.0+] Pre-Paid Hiemal Shield

Posted: Mon Feb 10, 2025 6:32 pm
by Zizzo
Small fix to the preceding: previously, we were only teiing the game to keep resting once Hiemal Shield's "out-of-combat" countdown timer had started — i.e. when the Hiemal Buffer effect starts displaying a number instead of "C". Apparently my previous test characters had enough dinged life or used resources to rest through the "still in combat" state to get to the part where our changes actually worked.

Anyway, that's going out as v1b.1; We Apologize for the Inconvenience.™