alejandrohiraldo wrote:When I cast it for the first time and use the ability everything is correct. But when I use the ability again it applies 2 counters (-0/-2). Also, if after that I cast another Wall Of
Roots and use the ability it gets 3 counters (-0/-3) and so forth. It seems to be stacking up.
That's because you are creating one invisible token each time you use the ability, so their toughness modifiers are stacking.
First of all, remove the following block from the wall token:
- Code: Select all
<TRIGGERED_ABILITY internal="1">
<TRIGGER value="END_OF_STEP">
return Object():Tapped() == 0
</TRIGGER>
<RESOLUTION_TIME_ACTION>
Object():Tap()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
this is needed for the mana tokens, but not for your wall token.
Then, since we are editing, I would suggest to apply the fix suggested by RiiakShiNal: one invisible token for each player. Modify the last RESOLUTION_TIME_ACTION (the one that creates the token) of your
Wall of Roots as follows:
- Code: Select all
<RESOLUTION_TIME_ACTION>
local filter = Object():GetFilter()
filter:Clear()
filter:NotTargetted()
filter:AddCardName( "WALL_TOKEN" )
filter:SetZone( ZONE_IN_PLAY )
local num_players = MTG():GetNumberOfPlayers()
for i=0,num_players-1 do
local player = MTG():GetNthPlayer(i)
if player ~= nil then
filter:SetController( player )
if filter:CountStopAt(1) == 0 then
MTG():PutTokensIntoPlay( "WALL_TOKEN", 1, player )
end
end
end
</RESOLUTION_TIME_ACTION>
This will create a token for each player, only if there's no one yet. Note that you have to give your wall token a CARDNAME, if you didn't give it yet. The code I wrote assumes that the CARDNAME is "WALL_TOKEN" (if it's not, change the argument of filter:AddCardName accordingly). Don't make confusion with the FILENAME: the token has a FILENAME for sure, but maybe you left the CARDNAME empty because you didn't need it before.
Now, modify the FILTER of the last STATIC_ABILITY of your wall token as follows:
- Code: Select all
<FILTER>
return CreaturesYouControl()
</FILTER>
This will make each token influence only the player who controls it.
After this editing, everything should be OK.