It is currently 30 Oct 2025, 20:11
   
Text Size

MagicStack.add

Post MTG Forge Related Programming Questions Here

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

MagicStack.add

Postby Max mtg » 28 May 2013, 11:29

There is such code at the end of MagicStack.add(SpellAbility sa)

Code: Select all
        if (!this.getSimultaneousStackEntryList().isEmpty()) {
            game.getPhaseHandler().passPriority();
        }
What is its purpose?
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: MagicStack.add

Postby friarsol » 28 May 2013, 12:03

I believe simultaneousStackEntryList is keeping track of what triggers are hitting the stack at the same time for ordering (or at least was many a moon ago). I'm not sure why you would be passing priority if that were empty.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: MagicStack.add

Postby Max mtg » 28 May 2013, 13:10

Well, there is no longer passPriority method... so I cannot sustain this code.

If there's a repro when current code won't work, please write it here or file as a bugreport.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: MagicStack.add

Postby Max mtg » 28 May 2013, 15:23

Found a repro : cast Bloodbraid Elf.
But it should not pass priority in that case - when Cascade trigger is added to stack

I commited r21786, seems to work as it should
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 67 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 67 users online :: 0 registered, 0 hidden and 67 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 67 guests

Login Form