mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
rewrite loop to stream
This commit is contained in:
parent
49981ba2a3
commit
f74dfcb8b6
1 changed files with 1 additions and 7 deletions
|
@ -56,13 +56,7 @@ public class CastAsThoughItHadFlashAllEffect extends AsThoughEffectImpl {
|
|||
if (card != null) {
|
||||
//Allow lands with morph to be played at instant speed
|
||||
if (card.isLand()) {
|
||||
boolean morphAbility = false;
|
||||
for (Ability checkAbility : card.getAbilities()) {
|
||||
if (checkAbility instanceof MorphAbility) {
|
||||
morphAbility = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
boolean morphAbility = card.getAbilities().stream().anyMatch(ability -> ability instanceof MorphAbility);
|
||||
if (morphAbility) {
|
||||
Card cardCopy = card.copy();
|
||||
cardCopy.getCardType().clear();
|
||||
|
|
Loading…
Reference in a new issue