It is currently 29 Oct 2025, 19:43
   
Text Size

Goblin Arsonist and SA Removal from Stacks

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins

Goblin Arsonist and SA Removal from Stacks

Postby 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.
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

Postby 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.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 21 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 21 users online :: 0 registered, 0 hidden and 21 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 21 guests

Login Form