Page 1 of 1

Goblin Arsonist and SA Removal from Stacks

PostPosted: 20 Apr 2013, 01:22
by friarsol
Ok, so I wanted to put some notes down about what I'm seeing here where my additions to move the removal of SpellAbilities to after the SA actually resolves, instead of before it starts resolving and how that interacts with AI triggers.

Basically what appears to be happening is the AI is targeting again during trigger resolution, which creates a different TargetChoices and prevents the SpellAbility from matching and being removed. (Below is an image of the stack trace)

http://i.imgur.com/P5Gip9P.png

Steps to Repro:
0. Apply attached patch
1. Add Goblin Arsonist for AI
2. Cast Pyroclasm
3. With the Arsonist trigger on the stack, add a breakpoint to Target.addTarget(Object) on line 445

Steps that don't Repro:
1. Add Ember-Fist Zubera for AI
2. Cast Pyroclasm
3. With Zubera trigger on the stack, the breakpoint we set earlier doesn't stop.


So it looks like as Sloth thought before that there's something funky going on with Optional Triggers and how the AI handles them.

Re: Goblin Arsonist and SA Removal from Stacks

PostPosted: 20 Apr 2013, 01:58
by friarsol
Alright, I committed a fix for this that stores out the TargetChoices, re-runs the doTrigger test (which has the possibility to be inaccurate) and then restore the TargetChoices afterwards. This fixes the Goblin Arsonist issue with removing an SA after it resolves instead of before.

Please lemme know if you notice anything related to that.