Merge pull request #6596 from johnmeat/ArchonofValorsReachAutoTest

Archon clone null exception
This commit is contained in:
LevelX2 2020-06-03 16:52:36 +02:00 committed by GitHub
commit 9b74585c23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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());