Add Addendum condition
parent
e42b42c829
commit
fcb38517b3
|
@ -950,4 +950,14 @@ public abstract class MagicCondition implements MagicMatchedCostEvent {
|
|||
return player.controlsPermanent(MagicTargetFilterFactory.LEGENDARY_CREATURE_OR_PLANESWALKER);
|
||||
}
|
||||
};
|
||||
|
||||
public static MagicCondition ADDENDUM = new MagicCondition() {
|
||||
@Override
|
||||
public boolean accept(final MagicSource source) {
|
||||
final MagicCardOnStack spell = (MagicCardOnStack)source;
|
||||
final MagicGame game = source.getGame();
|
||||
final MagicPhaseType phaseType = game.getPhase().getType();
|
||||
return spell.isCast() && spell.isController(game.getTurnPlayer()) && (phaseType == MagicPhaseType.FirstMain || phaseType == MagicPhaseType.SecondMain);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -799,6 +799,12 @@ public enum MagicConditionParser {
|
|||
return MagicCondition.HAS_THE_CITYS_BLESSING;
|
||||
}
|
||||
},
|
||||
Addendum("you cast this spell during your main phase") {
|
||||
@Override
|
||||
public MagicCondition toCondition(final Matcher arg) {
|
||||
return MagicCondition.ADDENDUM;
|
||||
}
|
||||
},
|
||||
;
|
||||
|
||||
private final Pattern pattern;
|
||||
|
|
Loading…
Reference in New Issue