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) {
|
if (card != null) {
|
||||||
//Allow lands with morph to be played at instant speed
|
//Allow lands with morph to be played at instant speed
|
||||||
if (card.isLand()) {
|
if (card.isLand()) {
|
||||||
boolean morphAbility = false;
|
boolean morphAbility = card.getAbilities().stream().anyMatch(ability -> ability instanceof MorphAbility);
|
||||||
for (Ability checkAbility : card.getAbilities()) {
|
|
||||||
if (checkAbility instanceof MorphAbility) {
|
|
||||||
morphAbility = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (morphAbility) {
|
if (morphAbility) {
|
||||||
Card cardCopy = card.copy();
|
Card cardCopy = card.copy();
|
||||||
cardCopy.getCardType().clear();
|
cardCopy.getCardType().clear();
|
||||||
|
|
Loading…
Reference in a new issue