mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 19:11:59 -08:00
[OTC] Implement 2 cards, refactor some exile effects ("Gonti-like") (#12118)
[OTC] Implement Gonti, Canny Acquisitor [OTC] Implement Dream Thief's Bandana
This commit is contained in:
parent
c77634c843
commit
607d55f16b
20 changed files with 487 additions and 1252 deletions
|
|
@ -0,0 +1,41 @@
|
|||
package org.mage.test.cards.single.otc;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class GontiCannyAcquisitorTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.g.GontiCannyAcquisitor Gonti, Canny Acquisitor} {2}{B}{G}{U}
|
||||
* Legendary Creature — Aetherborn Rogue
|
||||
* Spells you cast but don’t own cost {1} less to cast.
|
||||
* Whenever one or more creatures you control deal combat damage to a player, look at the top card of that player’s library, then exile it face down. You may play that card for as long as it remains exiled, and mana of any type can be spent to cast that spell.
|
||||
* 5/5
|
||||
*/
|
||||
private static final String gonti = "Gonti, Canny Acquisitor";
|
||||
|
||||
@Test
|
||||
public void test_Simple() {
|
||||
setStrictChooseMode(true);
|
||||
skipInitShuffling();
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, gonti);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain");
|
||||
addCard(Zone.LIBRARY, playerB, "Grizzly Bears", 1); // {1}{G}
|
||||
|
||||
attack(1, playerA, gonti, playerB);
|
||||
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Grizzly Bears");
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Grizzly Bears", 1);
|
||||
assertTapped("Mountain", true);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package org.mage.test.cards.single.woc;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class BlightwingBanditTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.b.BlightwingBandit Blightwing Bandit} {3}{B}
|
||||
* Creature — Faerie Rogue
|
||||
* Flying, deathtouch
|
||||
* Whenever you cast your first spell during each opponent’s turn, look at the top card of that player’s library, then exile it face down. You may play that card for as long as it remains exiled, and mana of any type can be spent to cast it.
|
||||
* 2/2
|
||||
*/
|
||||
private static final String bandit = "Blightwing Bandit";
|
||||
|
||||
@Test
|
||||
public void test_Simple() {
|
||||
setStrictChooseMode(true);
|
||||
skipInitShuffling();
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, bandit);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||
addCard(Zone.HAND, playerA, "Lightning Bolt");
|
||||
addCard(Zone.LIBRARY, playerB, "Fire // Ice", 1); // split card just to check it works on both faces
|
||||
|
||||
castSpell(2, PhaseStep.UPKEEP, playerA, "Lightning Bolt", playerB);
|
||||
waitStackResolved(2, PhaseStep.UPKEEP); // resolve trigger from bandit
|
||||
checkPlayableAbility("can cast fire", 2, PhaseStep.UPKEEP, playerA, "Cast Fire", true);
|
||||
checkPlayableAbility("can cast ice", 2, PhaseStep.UPKEEP, playerA, "Cast Ice", true);
|
||||
castSpell(2, PhaseStep.UPKEEP, playerA, "Ice", bandit);
|
||||
|
||||
setStopAt(2, PhaseStep.DRAW);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerB, "Fire // Ice", 1);
|
||||
assertTappedCount("Mountain", true, 3);
|
||||
assertHandCount(playerA, 1); // draw from Ice
|
||||
assertTapped(bandit, true); // tapped from Ice
|
||||
assertLife(playerB, 20 - 3);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package org.mage.test.cards.single.woe;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class DecadentDragonTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.d.DecadentDragon Decadent Dragon} {2}{R}{R}
|
||||
* Creature — Dragon
|
||||
* Flying, trample
|
||||
* Whenever Decadent Dragon attacks, create a Treasure token.
|
||||
* 4/4
|
||||
* Expensive Taste {2}{B}
|
||||
* Instant — Adventure
|
||||
* Exile the top two cards of target opponent’s library face down. You may look at and play those cards for as long as they remain exiled.
|
||||
*/
|
||||
private static final String dragon = "Decadent Dragon";
|
||||
|
||||
@Test
|
||||
public void test_MDFC_And_Split() {
|
||||
setStrictChooseMode(true);
|
||||
skipInitShuffling();
|
||||
|
||||
addCard(Zone.HAND, playerA, dragon);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3 + 4);
|
||||
addCard(Zone.LIBRARY, playerB, "Pain // Suffering", 1); // can cast Pain, but Suffering cost {3}{R} so can't be cast
|
||||
addCard(Zone.LIBRARY, playerB, "Blackbloom Rogue", 1); // mdfc {2}{B} with land Blackbloom Bog on the back.
|
||||
addCard(Zone.HAND, playerB, "Abandon Hope"); // to discard to Pain
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Expensive Taste", playerB);
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
|
||||
checkPlayableAbility("can cast Pain", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Pain", true);
|
||||
checkPlayableAbility("can not cast Suffering", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Suffering", false);
|
||||
checkPlayableAbility("can cast Blackbloom Rogue", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Blackbloom Rogue", true);
|
||||
checkPlayableAbility("can play Blackbloom Bog", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Play Blackbloom Bog", true);
|
||||
|
||||
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Blackbloom Bog");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Pain", playerB);
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerB, "Pain // Suffering", 1);
|
||||
assertGraveyardCount(playerB, "Abandon Hope", 1);
|
||||
assertTappedCount("Blackbloom Bog", true, 1);
|
||||
assertTappedCount("Swamp", true, 4);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue