mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Merge origin/master
This commit is contained in:
commit
e862e7c5b5
4 changed files with 43 additions and 18 deletions
|
@ -27,29 +27,32 @@
|
|||
*/
|
||||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.InfectAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class TriumphOfTheHordes extends CardImpl {
|
||||
|
||||
private FilterCreaturePermanent filterCreaturePermanent = new FilterCreaturePermanent();
|
||||
|
||||
public TriumphOfTheHordes(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}{G}");
|
||||
|
||||
|
||||
this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(InfectAbility.getInstance(), Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, filterCreaturePermanent));
|
||||
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(InfectAbility.getInstance(), Duration.EndOfTurn, filterCreaturePermanent));
|
||||
}
|
||||
|
||||
public TriumphOfTheHordes(final TriumphOfTheHordes card) {
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
@ -231,9 +231,9 @@ public class CascadeTest extends CardTestPlayerBase {
|
|||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Ardent Plea", 1);
|
||||
assertGraveyardCount(playerA, "Breaking // Entering", 1);
|
||||
assertGraveyardCount(playerA, "Breaking // Entering", 0);
|
||||
|
||||
assertGraveyardCount(playerB, 8);
|
||||
assertGraveyardCount(playerB, 0);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
package org.mage.test.cards.single;
|
||||
|
||||
import mage.abilities.keyword.InfectAbility;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
public class TriumphOfTheHordesTest extends CardTestPlayerBase {
|
||||
|
||||
//issue 3292, Triumph of the Hordes gives a Chromatic Lantern Infect + Trample
|
||||
@Test
|
||||
public void triumphOfTheHordesNonCreatureTest() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 10);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Chromatic Lantern", 1);
|
||||
addCard(Zone.HAND, playerA, "Triumph of the Hordes", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Triumph of the Hordes");
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
|
||||
execute();
|
||||
|
||||
assertAbility(playerA, "Chromatic Lantern", InfectAbility.getInstance(), false);
|
||||
assertAbility(playerA, "Grizzly Bears", InfectAbility.getInstance(), true);
|
||||
}
|
||||
}
|
|
@ -33,8 +33,6 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.cards.SplitCard;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.ExileZone;
|
||||
|
@ -148,11 +146,8 @@ class CascadeEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
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