mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
* Offering - Fixed handling of hybrid mana in casting costs of offered creatures (fixes #6961).
This commit is contained in:
parent
0cda2d9635
commit
27b5c920f7
3 changed files with 93 additions and 6 deletions
|
|
@ -75,4 +75,68 @@ public class OfferingTest extends CardTestPlayerBase {
|
|||
assertGraveyardCount(playerA, "Akki Drillmaster", 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testCastWithBorosRecruit() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
// Goblin offering (You may cast this card any time you could cast an instant by sacrificing a Goblin and paying the difference in mana costs between this and the sacrificed Goblin. Mana cost includes color.)
|
||||
// Whenever Patron of the Akki attacks, creatures you control get +2/+0 until end of turn.
|
||||
String patron = "Patron of the Akki"; // Creature {4}{R}{R} (5/5)
|
||||
|
||||
addCard(Zone.HAND, playerA, patron, 1);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
|
||||
|
||||
// First strike
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Boros Recruit"); // Creature Goblin {R/W} (1/1)
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, patron);
|
||||
setChoice(playerA, "Yes");
|
||||
addTarget(playerA, "Boros Recruit");
|
||||
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertAllCommandsUsed();
|
||||
assertPermanentCount(playerA, patron, 1);
|
||||
|
||||
assertGraveyardCount(playerA, "Boros Recruit", 1);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCastWithMultipleOptions() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
// Goblin offering (You may cast this card any time you could cast an instant by sacrificing a Goblin and paying the difference in mana costs between this and the sacrificed Goblin. Mana cost includes color.)
|
||||
// Whenever Patron of the Akki attacks, creatures you control get +2/+0 until end of turn.
|
||||
String patron = "Patron of the Akki"; // Creature {4}{R}{R} (5/5)
|
||||
|
||||
addCard(Zone.HAND, playerA, patron, 1);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 3);
|
||||
|
||||
// First strike
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Boros Recruit"); // Creature Goblin {R/W} (1/1)
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Akki Drillmaster"); // Creature Goblin {2}{R} (2/2)
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Boggart Ram-Gang"); // Creature Goblin Warrior {R/G}{R/G}{R/G} (3/3)
|
||||
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, patron);
|
||||
setChoice(playerA, "Yes");
|
||||
addTarget(playerA, "Boggart Ram-Gang");
|
||||
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertAllCommandsUsed();
|
||||
assertPermanentCount(playerA, patron, 1);
|
||||
|
||||
assertGraveyardCount(playerA, "Boggart Ram-Gang", 1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue