mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
fix cascade for splitcards
This commit is contained in:
parent
f0a83c4689
commit
9da97f9368
2 changed files with 6 additions and 11 deletions
|
@ -202,7 +202,7 @@ public class CascadeTest extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cascade dont work with split cards.
|
* Cascade work with split cards, cmc = total of halfs.
|
||||||
*
|
*
|
||||||
* For example: Ardent Plea + Breaking/Entering
|
* For example: Ardent Plea + Breaking/Entering
|
||||||
*/
|
*/
|
||||||
|
@ -231,9 +231,9 @@ public class CascadeTest extends CardTestPlayerBase {
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Ardent Plea", 1);
|
assertPermanentCount(playerA, "Ardent Plea", 1);
|
||||||
assertGraveyardCount(playerA, "Breaking // Entering", 1);
|
assertGraveyardCount(playerA, "Breaking // Entering", 0);
|
||||||
|
|
||||||
assertGraveyardCount(playerB, 8);
|
assertGraveyardCount(playerB, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,6 @@ import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.Cards;
|
import mage.cards.Cards;
|
||||||
import mage.cards.CardsImpl;
|
import mage.cards.CardsImpl;
|
||||||
import mage.cards.SplitCard;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.ExileZone;
|
import mage.game.ExileZone;
|
||||||
|
@ -148,11 +146,8 @@ class CascadeEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean cardThatCostsLess(int value, Card card, Game game) {
|
private boolean cardThatCostsLess(int value, Card card, Game game) {
|
||||||
if (card instanceof SplitCard) {
|
|
||||||
return ((SplitCard) card).getLeftHalfCard().getConvertedManaCost() < value
|
|
||||||
|| ((SplitCard) card).getRightHalfCard().getConvertedManaCost() < value;
|
|
||||||
} else {
|
|
||||||
return card.getConvertedManaCost() < value;
|
return card.getConvertedManaCost() < value;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue