mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
b3a235392f
3 changed files with 55 additions and 7 deletions
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.i;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
|
@ -52,6 +51,8 @@ import mage.game.Game;
|
|||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
|
@ -92,7 +93,11 @@ class IchoridTriggerdAbility extends BeginningOfUpkeepTriggeredAbility{
|
|||
|
||||
public IchoridTriggerdAbility(FilterCard filter){
|
||||
super(Zone.GRAVEYARD,
|
||||
new DoIfCostPaid(new ReturnSourceFromGraveyardToBattlefieldEffect(), new ExileFromGraveCost(new TargetCardInYourGraveyard(filter))),
|
||||
new DoIfCostPaid(new ReturnSourceFromGraveyardToBattlefieldEffect(),
|
||||
new ExileFromGraveCost(
|
||||
new TargetCardInYourGraveyard(1, 1, filter, true)
|
||||
)
|
||||
),
|
||||
TargetController.YOU, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ package org.mage.test.cards.requirement;
|
|||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.permanent.Permanent;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
|
@ -66,7 +68,7 @@ public class BlockRequirementTest extends CardTestPlayerBase {
|
|||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Oppressive Rays", "Silvercoat Lion");
|
||||
|
||||
// Silvercoat Lion has not to block because it has to pay {3} to block
|
||||
// Silvercoat Lion cannot block because it has to pay {3} to block
|
||||
attack(2, playerB, "Prized Unicorn");
|
||||
|
||||
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
|
||||
|
@ -247,4 +249,39 @@ public class BlockRequirementTest extends CardTestPlayerBase {
|
|||
assertGraveyardCount(playerB, "Dimensional Infiltrator", 1);
|
||||
assertGraveyardCount(playerB, "Llanowar Elves", 1);
|
||||
}
|
||||
|
||||
/*
|
||||
Reported bug: Nacatl War-pride unable to be blocked ?
|
||||
*/
|
||||
@Test
|
||||
public void testNacatlWarPrideBlockOneCreature() {
|
||||
/*
|
||||
Nacatl War-Pride {3}{G}{G}{G}
|
||||
Creature - Cat Warrior 3/3
|
||||
Nacatl War-Pride must be blocked by exactly one creature if able.
|
||||
Whenever Nacatl War-Pride attacks, create X tokens that are copies of Nacatl War-Pride and that are tapped and attacking,
|
||||
where X is the number of creatures defending player controls. Exile the tokens at the beginning of the next end step.
|
||||
*/
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Nacatl War-Pride");
|
||||
|
||||
/*
|
||||
Primeval Titan {4}{G}{G}
|
||||
Creature - Giant 6/6
|
||||
Trample. Whenever Primeval Titan enters the battlefield or attacks, you may search your library for up to two land cards,
|
||||
put them onto the battlefield tapped, then shuffle your library.
|
||||
*/
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Primeval Titan");
|
||||
|
||||
attack(1, playerA, "Nacatl War-Pride");
|
||||
block(1, playerB, "Primeval Titan", "Nacatl War-Pride");
|
||||
|
||||
setStopAt(1, PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 17); // one 3/3 tokens attacking got through still
|
||||
assertGraveyardCount(playerA, "Nacatl War-Pride", 1);
|
||||
|
||||
Permanent primetime = getPermanent("Primeval Titan", playerB);
|
||||
Assert.assertEquals("Damage to Primeval should be 3 not 0", 3, primetime.getDamage());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,9 +27,6 @@
|
|||
*/
|
||||
package mage.target.common;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.Cards;
|
||||
|
@ -40,6 +37,10 @@ import mage.game.events.GameEvent;
|
|||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
@ -59,7 +60,12 @@ public class TargetCardInYourGraveyard extends TargetCard {
|
|||
}
|
||||
|
||||
public TargetCardInYourGraveyard(int minNumTargets, int maxNumTargets, FilterCard filter) {
|
||||
super(minNumTargets, maxNumTargets, Zone.GRAVEYARD, filter);
|
||||
this(minNumTargets, maxNumTargets, filter, false);
|
||||
}
|
||||
|
||||
public TargetCardInYourGraveyard(int minNumTarget, int maxNumTargets, FilterCard filter, boolean notTarget) {
|
||||
super(minNumTarget, maxNumTargets, Zone.GRAVEYARD, filter);
|
||||
this.setNotTarget(notTarget);
|
||||
}
|
||||
|
||||
public TargetCardInYourGraveyard(final TargetCardInYourGraveyard target) {
|
||||
|
|
Loading…
Reference in a new issue