create local var to access outer variable from inner class
parent
4c0cdec5c3
commit
7a21921286
|
@ -19,9 +19,10 @@ def PT = new MagicStatic(MagicLayer.SetPT, MagicStatic.UntilEOT) {
|
|||
}
|
||||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
final MagicStatic setPT = PT;
|
||||
event.processTargetPermanent(game,new MagicPermanentAction() {
|
||||
public void doAction(final MagicPermanent creature) {
|
||||
game.doAction(new MagicBecomesCreatureAction(creature,PT));
|
||||
game.doAction(new MagicBecomesCreatureAction(creature,setPT));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -18,9 +18,11 @@ def TP = Karn__Silver_Golem.getTP();
|
|||
|
||||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
final MagicStatic setPT = PT;
|
||||
final MagicStatic giveST = ST;
|
||||
event.processTargetPermanent(game,new MagicPermanentAction() {
|
||||
public void doAction(final MagicPermanent creature) {
|
||||
game.doAction(new MagicBecomesCreatureAction(creature,PT,ST));
|
||||
game.doAction(new MagicBecomesCreatureAction(creature,setPT,giveST));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue