It is currently 07 Jul 2021, 14:47
   
Text Size

Goblin Arsonist and SA Removal from Stacks

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, friarsol, Blacksmith, KrazyTheFox, Agetian, 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 90 times
friarsol
Global Moderator
 
Posts: 7575
Joined: 15 May 2010, 04:20
Has thanked: 242 times
Been thanked: 956 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: 7575
Joined: 15 May 2010, 04:20
Has thanked: 242 times
Been thanked: 956 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 14 guests


Who is online

In total there are 14 users online :: 0 registered, 0 hidden and 14 guests (based on users active over the past 10 minutes)
Most users ever online was 1922 on 07 Jun 2021, 06:01

Users browsing this forum: No registered users and 14 guests

Login Form