use correct player for current game G

master
melvinzhang 2018-10-23 09:33:18 +08:00
parent 0bef4161f6
commit df75a51698
6 changed files with 5 additions and 6 deletions

View File

@ -11,4 +11,4 @@ ability=Melee
timing=main
requires_groovy_code
oracle=Melee\nWhenever Custodi Soulcaller attacks, return target creature card with converted mana cost X or less from your graveyard to the battlefield, where X is the number of players you attacked with a creature this combat.
# Correct with 2 player game. Need changes if 3+ players will be supported in the future
# Correct with 2 player game. Need changes if 3+ players will be supported in the future

View File

@ -19,7 +19,7 @@
final MagicPermanent perm ->
final MagicGame G = perm.getGame();
if (perm.hasSubType(MagicSubType.Angel)) {
G.doAction(new ChangeCountersAction(event.getPlayer(),perm,MagicCounterType.PlusOne,2));
G.doAction(new ChangeCountersAction(event.getPlayer().map(G), perm, MagicCounterType.PlusOne, 2));
}
}));
});

View File

@ -19,7 +19,7 @@
final MagicPermanent perm ->
final MagicGame G = perm.getGame();
if (perm.hasSubType(MagicSubType.Dragon)) {
G.doAction(new ChangeCountersAction(event.getPlayer(),perm,MagicCounterType.PlusOne,2));
G.doAction(new ChangeCountersAction(event.getPlayer().map(G), perm, MagicCounterType.PlusOne, 2));
}
}));
});

View File

@ -11,4 +11,3 @@ ability=Whenever another creature you control dies, you get an experience counte
timing=main
requires_groovy_code
oracle=Whenever another creature you control dies, you get an experience counter.\nAt the beginning of your end step, choose target creature card in your graveyard. If that card's converted mana cost is less than or equal to the number of experience counters you have, return it to the battlefield. Otherwise, put it into your hand.

View File

@ -17,7 +17,7 @@
game.doAction(new ReturnCardAction(MagicLocationType.Graveyard,it,event.getPlayer(),{
final MagicPermanent perm ->
final MagicGame G = perm.getGame();
G.doAction(new ChangeCountersAction(event.getPlayer(),perm,MagicCounterType.PlusOne,1));
G.doAction(new ChangeCountersAction(event.getPlayer().map(G), perm, MagicCounterType.PlusOne, 1));
}));
});
}

View File

@ -7,4 +7,4 @@ type=Enchantment
cost={3}{R}
timing=enchantment
oracle=Whenever you cast your second spell each turn, Pyromancer's Assault deals 2 damage to target creature or player.
requires_groovy_code
requires_groovy_code