remove redundant null checks, remove some static fields

This commit is contained in:
Ingmar Goudt 2018-09-26 21:55:58 +02:00
parent 05dcfeaaa1
commit a0e54fbb7b
21 changed files with 84 additions and 104 deletions

View file

@ -114,19 +114,17 @@ class TurriIslandEffect extends CostModificationEffectImpl {
if (cPlane == null) {
return false;
}
if (cPlane != null) {
if (!cPlane.getName().equalsIgnoreCase("Plane - Turri Island")) {
return false;
}
if (!cPlane.getName().equalsIgnoreCase("Plane - Turri Island")) {
return false;
}
Spell spell = (Spell) game.getStack().getStackObject(abilityToModify.getId());
if (spell != null) {
return this.filter.match(spell, game) && selectedByRuntimeData(spell, source, game);
return filter.match(spell, game) && selectedByRuntimeData(spell, source, game);
} else {
// used at least for flashback ability because Flashback ability doesn't use stack
Card sourceCard = game.getCard(abilityToModify.getSourceId());
return sourceCard != null && this.filter.match(sourceCard, game) && selectedByRuntimeData(sourceCard, source, game);
return sourceCard != null && filter.match(sourceCard, game) && selectedByRuntimeData(sourceCard, source, game);
}
}
return false;