Goblin Arsonist and SA Removal from Stacks
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
2 posts
• Page 1 of 1
Goblin Arsonist and SA Removal from Stacks
by friarsol » 20 Apr 2013, 01:22
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.
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.
- Attachments
-
saResolve.zip- (560 Bytes) Downloaded 189 times
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Goblin Arsonist and SA Removal from Stacks
by friarsol » 20 Apr 2013, 01:58
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.
Please lemme know if you notice anything related to that.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 21 guests