forked from External/mage
some cleanups
This commit is contained in:
parent
63695f9b5b
commit
f0623d37c9
8 changed files with 24 additions and 53 deletions
|
|
@ -52,21 +52,12 @@ public enum SuspendedCondition implements Condition {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Card card = game.getCard(source.getSourceId());
|
||||
boolean found = false;
|
||||
if (card != null) {
|
||||
for (Ability ability: card.getAbilities()) {
|
||||
if (ability instanceof SuspendAbility) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
boolean found = card.getAbilities().stream().anyMatch(ability -> ability instanceof SuspendAbility);
|
||||
|
||||
if (!found) {
|
||||
for (Ability ability: game.getState().getAllOtherAbilities(source.getSourceId())) {
|
||||
if (ability instanceof SuspendAbility) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
found = game.getState().getAllOtherAbilities(source.getSourceId()).stream().anyMatch(ability -> ability instanceof SuspendAbility);
|
||||
|
||||
}
|
||||
if (found) {
|
||||
if (game.getState().getZone(card.getId()) == Zone.EXILED &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue