return false when no choice made for archon ability

This commit is contained in:
johnm 2020-06-01 10:29:10 +01:00
parent f64549213f
commit 84daa0f820

View file

@ -169,6 +169,11 @@ class ArchonOfValorsReachReplacementEffect extends ContinuousRuleModifyingEffect
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if ((String) game.getState().getValue(source.getSourceId().toString() + "_cardtype") == null){
return false;
}
CardType cardType = ArchonOfValorsReachChoice.getType((String) game.getState().getValue(source.getSourceId().toString() + "_cardtype"));
// spell is not on the stack yet, so we have to check the card
Card card = game.getCard(event.getSourceId());