Closed forest0xia closed 5 months ago
Yeah, a general pool is definitely the way to go. It's something I've been meaning to do, as copy-pasting existing logic (which I change sometimes) across multiple files has been tedious and just isn't good. This is why I've rarely added newer stuff to Spell Steal since adding Rubick. As you mentioned, error-prone and not scalable. It'll take a while.
Currently you are checking one hero by one hero, one ability by one ability, and one condition by one condition, to see if Rubick can use any of those spells.
I'd suggest to think it from another perspective - add all abilities to a ability pool. Such a pool will be like a key-value match for each spell. The key is the spell name, value is the way to use the spell. This way: