Hi! So I'm trying to make a script for Casting a spell after an attack for a specific creature ID.
The idea is to replicate Dragon Fly's ability (cast weakness after a melee attack). And I encounter some problems.
My implementation was not good. I used FU(OnBattleActionEnd) to trigger the spell. The problem with this trigger is that it triggers only after enemy retaliation (which should be before retaliation), and it won't trigger with retaliation.
Is there a way to get the real attacker of 4462998 (BG:N but changes with retaliation, similar to BG:Q)?
The alternative question, Is a way to get the stack ID that is retaliating?
Without sorting this out, I cannot set spell casting on retaliation.
I understand that for the whole attack - retaliation process, the BG:N number is the same while BG:Q changes upon enemy retaliating -> This can be a way to check whether 4462998 is triggering under an initiative attack or retaliation. However, with Berserk spell, this check could break, as a stack can beat another stack in the same side with this situation.