Added a test.

This commit is contained in:
LevelX2 2016-10-02 16:15:04 +02:00
parent 98db0fa21b
commit 5469facdd6
2 changed files with 45 additions and 3 deletions

View file

@ -145,10 +145,10 @@ class EtherswornCanonistReplacementEffect extends ContinuousRuleModifyingEffectI
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
EtherswornCanonistWatcher watcher = (EtherswornCanonistWatcher) game.getState().getWatchers().get(EtherswornCanonistWatcher.class.getName());
Card card = game.getCard(event.getSourceId());
if (card != null && !card.getCardType().contains(CardType.ARTIFACT) && watcher.castNonArtifactSpell(event.getPlayerId())) {
return true;
if (card != null && !card.getCardType().contains(CardType.ARTIFACT)) {
EtherswornCanonistWatcher watcher = (EtherswornCanonistWatcher) game.getState().getWatchers().get(EtherswornCanonistWatcher.class.getName());
return watcher != null && watcher.castNonArtifactSpell(event.getPlayerId());
}
return false;
}