mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
* Reworked ENTERS_THE_BATTLEFIELD event for replacement effects. Some rework to card movement.
This commit is contained in:
parent
c642165020
commit
59ef2a2889
247 changed files with 1842 additions and 2287 deletions
|
|
@ -9,23 +9,19 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
|
||||
public class MasterBiomancerTest extends CardTestPlayerBase {
|
||||
|
||||
/* Master Biomancer {2}{G}{U}
|
||||
* Creature - Elf Wizard
|
||||
* 2/4
|
||||
* Each other creature you control enters the battlefield with a number of additional +1/+1 counters
|
||||
* Each other creature you control enters the battlefield with a number of additional +1/+1 counters
|
||||
* on it equal to Master Biomancer's power and as a Mutant in addition to its other types.
|
||||
*
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testCreatureGetsCounters() {
|
||||
|
||||
// a creature enters the battlefield and gets a counter for each point of power of Master Biomancer
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 5);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Master Biomancer", 1);
|
||||
addCard(Zone.HAND, playerA, "Mindeye Drake");
|
||||
|
|
@ -52,12 +48,12 @@ public class MasterBiomancerTest extends CardTestPlayerBase {
|
|||
// a creature enters the battlefield and gets a counter for each point of power of Master Biomancer
|
||||
// doubled by Corpsejack Menace (when he ist cast, his own ability will not apply)
|
||||
// http://blogs.magicjudges.org/rulestips/2013/03/corpsejack-menace-and-master-biomancer/
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Master Biomancer", 1);
|
||||
|
||||
// If one or more +1/+1 counters would be placed on a creature you control, twice that many +1/+1 counters are placed on it instead.
|
||||
addCard(Zone.HAND, playerA, "Corpsejack Menace");
|
||||
addCard(Zone.HAND, playerA, "Mindeye Drake");
|
||||
|
||||
|
|
@ -83,30 +79,28 @@ public class MasterBiomancerTest extends CardTestPlayerBase {
|
|||
assertPowerToughness(playerA, "Mindeye Drake", 6, 9);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Progenitor Mimic
|
||||
* Creature - Shapeshifter
|
||||
* 0/0
|
||||
* You may have Progenitor Mimic enter the battlefield as a copy of any creature on
|
||||
* the battlefield except it gains "At the beginning of your upkeep, if this creature
|
||||
* isn't a token, put a token onto the battlefield that's a copy of this creature."
|
||||
* Progenitor Mimic Creature - Shapeshifter 0/0 You may have Progenitor
|
||||
* Mimic enter the battlefield as a copy of any creature on the battlefield
|
||||
* except it gains "At the beginning of your upkeep, if this creature isn't
|
||||
* a token, put a token onto the battlefield that's a copy of this
|
||||
* creature."
|
||||
*
|
||||
* If Progenitor Mimic comes into play, it gets two +1/+1 counters from
|
||||
* the Master Biomancer already in play. It copies the Master Biomancer and
|
||||
* is therfore a 4/6 creature.
|
||||
* The Token generated next round from Progenitor Mimic has to get 2 + 4 counters
|
||||
* and is therefore a 8/10 creature.
|
||||
* If Progenitor Mimic comes into play, it gets two +1/+1 counters from the
|
||||
* Master Biomancer already in play. It copies the Master Biomancer and is
|
||||
* therfore a 4/6 creature. The Token generated next round from Progenitor
|
||||
* Mimic has to get 2 + 4 counters and is therefore a 8/10 creature.
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testWithProgenitorMimic() {
|
||||
|
||||
// a creature enters the battlefield and gets a counter for each point of power of Master Biomancer
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Master Biomancer", 1);
|
||||
// You may have Progenitor Mimic enter the battlefield as a copy of any creature on the battlefield
|
||||
// except it gains "At the beginning of your upkeep, if this creature isn't a token,
|
||||
// put a token onto the battlefield that's a copy of this creature."
|
||||
addCard(Zone.HAND, playerA, "Progenitor Mimic");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Progenitor Mimic");
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ public class SuspendTest extends CardTestPlayerBase {
|
|||
public void testEpochrasite() {
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
||||
// Epochrasite enters the battlefield with three +1/+1 counters on it if you didn't cast it from your hand.
|
||||
// When Epochrasite dies, exile it with three time counters on it and it gains suspend.
|
||||
addCard(Zone.HAND, playerA, "Epochrasite", 1);
|
||||
addCard(Zone.HAND, playerB, "Lightning Bolt", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1);
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ public class KikiJikiMirrorBreakerTest extends CardTestPlayerBase {
|
|||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 5);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Kiki-Jiki, Mirror Breaker", 1);
|
||||
// {T}: Draw two cards. Target opponent gains control of Humble Defector. Activate this ability only during your turn.
|
||||
// You may have Body Double enter the battlefield as a copy of any creature card in a graveyard.
|
||||
addCard(Zone.HAND, playerB, "Body Double", 1); // {4}{U}
|
||||
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Body Double");
|
||||
|
|
|
|||
|
|
@ -92,7 +92,6 @@ public class VesuvaTest extends CardTestPlayerBase {
|
|||
execute();
|
||||
|
||||
assertPermanentCount(playerB, "Dark Depths", 1);
|
||||
assertPermanentCount(playerA, "Vesuva", 0);
|
||||
assertPermanentCount(playerA, "Dark Depths", 1);
|
||||
|
||||
Permanent darkDepth = getPermanent("Dark Depths", playerA);
|
||||
|
|
|
|||
|
|
@ -6,22 +6,30 @@ import org.junit.Test;
|
|||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* Pillar of Flame:
|
||||
* Pillar of Flame deals 2 damage to target creature or player. If a creature dealt damage this way would die this turn, exile it instead.
|
||||
* Pillar of Flame: Pillar of Flame deals 2 damage to target creature or player.
|
||||
* If a creature dealt damage this way would die this turn, exile it instead.
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class PillarOfFlameTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* Tests when cast Pillar of Flame targeting opponent there is no influence on dying creature of opponent
|
||||
* Tests when cast Pillar of Flame targeting opponent there is no influence
|
||||
* on dying creature of opponent
|
||||
*/
|
||||
@Test
|
||||
public void testNotTriggeringExileItInstead() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Lightning Mauler");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Rakdos Cackler");
|
||||
// Soulbond
|
||||
// As long as Lightning Mauler is paired with another creature, both creatures have haste.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Lightning Mauler"); // 2/1
|
||||
// Unleash (You may have this creature enter the battlefield with a +1/+1 counter on it. It can't block as long as it has a +1/+1 counter on it.)
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Rakdos Cackler"); // 1/1
|
||||
|
||||
// Pillar of Flame deals 2 damage to target creature or player.
|
||||
// If a creature dealt damage this way would die this turn, exile it instead.
|
||||
addCard(Zone.HAND, playerA, "Pillar of Flame");
|
||||
// Soulbond
|
||||
// As long as Stonewright is paired with another creature, each of those creatures has "{R}: This creature gets +1/+0 until end of turn."
|
||||
addCard(Zone.HAND, playerA, "Stonewright");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||
|
||||
|
|
@ -49,7 +57,8 @@ public class PillarOfFlameTest extends CardTestPlayerBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Tests when cast Pillar of Flame targeting creature it goes to exile if dying later
|
||||
* Tests when cast Pillar of Flame targeting creature it goes to exile if
|
||||
* dying later
|
||||
*/
|
||||
@Test
|
||||
public void testTriggeringExileItInstead() {
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import org.junit.Test;
|
|||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* Torpor Orb:
|
||||
* Creatures entering the battlefield don't cause abilities to trigger.
|
||||
* Torpor Orb: Creatures entering the battlefield don't cause abilities to
|
||||
* trigger.
|
||||
*
|
||||
* @author noxx
|
||||
*/
|
||||
|
|
@ -15,7 +15,10 @@ public class TorporOrbTest extends CardTestPlayerBase {
|
|||
|
||||
@Test
|
||||
public void testWallOfOmens() {
|
||||
// Creatures entering the battlefield don't cause abilities to trigger.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Torpor Orb");
|
||||
// Defender
|
||||
// When Wall of Omens enters the battlefield, draw a card.
|
||||
addCard(Zone.HAND, playerA, "Wall of Omens");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
||||
|
||||
|
|
@ -33,7 +36,8 @@ public class TorporOrbTest extends CardTestPlayerBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Treacherous Pit-Dweller doesnt function properly with Torpor Orb and Hushwing Gryff
|
||||
* Treacherous Pit-Dweller doesnt function properly with Torpor Orb and
|
||||
* Hushwing Gryff
|
||||
*/
|
||||
@Test
|
||||
public void testPitTweller() {
|
||||
|
|
@ -42,8 +46,8 @@ public class TorporOrbTest extends CardTestPlayerBase {
|
|||
|
||||
addCard(Zone.HAND, playerA, "Lightning Bolt");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||
|
||||
attack(2, playerB, "Treacherous Pit-Dweller");
|
||||
|
||||
attack(2, playerB, "Treacherous Pit-Dweller");
|
||||
castSpell(2, PhaseStep.DECLARE_ATTACKERS, playerA, "Lightning Bolt", "Treacherous Pit-Dweller");
|
||||
|
||||
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
|
||||
|
|
@ -53,9 +57,9 @@ public class TorporOrbTest extends CardTestPlayerBase {
|
|||
assertLife(playerB, 20);
|
||||
|
||||
assertGraveyardCount(playerA, "Lightning Bolt", 1);
|
||||
|
||||
|
||||
assertPermanentCount(playerB, "Treacherous Pit-Dweller", 1);
|
||||
assertPowerToughness(playerB, "Treacherous Pit-Dweller", 5,4);
|
||||
assertPowerToughness(playerB, "Treacherous Pit-Dweller", 5, 4);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,14 +13,16 @@ public class FathomMageTest extends CardTestPlayerBase {
|
|||
/**
|
||||
* Fathom Mage - Creature — Human Wizard 1/1, 2UG
|
||||
*
|
||||
* Evolve (Whenever a creature enters the battlefield under your control, if that creature has greater power or toughness than this creature, put a +1/+1 counter on this creature.)
|
||||
* Whenever a +1/+1 counter is placed on Fathom Mage, you may draw a card.
|
||||
* Evolve (Whenever a creature enters the battlefield under your control, if
|
||||
* that creature has greater power or toughness than this creature, put a
|
||||
* +1/+1 counter on this creature.) Whenever a +1/+1 counter is placed on
|
||||
* Fathom Mage, you may draw a card.
|
||||
*
|
||||
*
|
||||
|
||||
*/
|
||||
@Test
|
||||
public void testDrawCardsAddedCounters() {
|
||||
// card draw triggered ability will trigger once for each of those counters from Blessings of Nature.
|
||||
// card draw triggered ability will trigger once for each of those counters from Blessings of Nature.
|
||||
|
||||
addCard(Zone.HAND, playerA, "Blessings of Nature");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Fathom Mage", 1);
|
||||
|
|
@ -38,14 +40,14 @@ public class FathomMageTest extends CardTestPlayerBase {
|
|||
|
||||
@Test
|
||||
public void testDrawCardsEntersTheBattlefield() {
|
||||
// card draw triggered ability will trigger once for each of those counters from Master Biomancer.
|
||||
// card draw triggered ability will trigger once for each of those counters from Master Biomancer.
|
||||
|
||||
addCard(Zone.HAND, playerA, "Fathom Mage");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Master Biomancer", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 4);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 4);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Fathom Mage");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Fathom Mage"); // {2}{G}{U}
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
|
|
|||
|
|
@ -1970,11 +1970,26 @@ public class TestPlayer implements Player {
|
|||
return computerPlayer.scry(value, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Card card, Zone toZone, Ability source, Game game) {
|
||||
return computerPlayer.moveCards(card, toZone, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Card card, Zone toZone, Ability source, Game game, boolean tapped, boolean faceDown, boolean byOwner, ArrayList<UUID> appliedEffects) {
|
||||
return computerPlayer.moveCards(card, toZone, source, game, tapped, faceDown, byOwner, appliedEffects);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Cards cards, Zone toZone, Ability source, Game game) {
|
||||
return computerPlayer.moveCards(cards, toZone, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Set<Card> cards, Zone toZone, Ability source, Game game) {
|
||||
return computerPlayer.moveCards(cards, toZone, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Set<Card> cards, Zone toZone, Ability source, Game game, boolean tapped, boolean faceDown, boolean byOwner, ArrayList<UUID> appliedEffects) {
|
||||
return computerPlayer.moveCards(cards, toZone, source, game, tapped, faceDown, byOwner, appliedEffects);
|
||||
|
|
|
|||
|
|
@ -533,10 +533,10 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
|
|||
|
||||
if (flag) {
|
||||
Assert.assertTrue("No such ability=" + ability.toString() + ", player=" + player.getName()
|
||||
+ ", cardName" + cardName, found.getAbilities().containsRule(ability));
|
||||
+ ", cardName" + cardName, found.getAbilities(currentGame).containsRule(ability));
|
||||
} else {
|
||||
Assert.assertFalse("Card shouldn't have such ability=" + ability.toString() + ", player=" + player.getName()
|
||||
+ ", cardName" + cardName, found.getAbilities().containsRule(ability));
|
||||
+ ", cardName" + cardName, found.getAbilities(currentGame).containsRule(ability));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -574,7 +574,7 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
|
|||
}
|
||||
}
|
||||
}
|
||||
Assert.assertEquals("(Battlefield) Card counts for " + player.getName() + " are not equal (" + cardName + ")", count, actualCount);
|
||||
Assert.assertEquals("(Battlefield) Permanents counts for " + player.getName() + " are not equal (" + cardName + ")", count, actualCount);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue