mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
* Angel of Jubilation - Fixed that it did not only prevent life payment from casting spells or activating abilities (fixes #3663).
This commit is contained in:
parent
57de10d609
commit
ffa837ae95
14 changed files with 118 additions and 40 deletions
|
|
@ -177,4 +177,71 @@ public class AngelOfJubilationTest extends CardTestPlayerBase {
|
|||
assertPermanentCount(playerB, "Wasteland", 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* https://github.com/magefree/mage/issues/3663
|
||||
*
|
||||
* Angel of Jubilation should just prevent paying life for activating
|
||||
* abilities, but currently when it is out the opponent is not prompted to
|
||||
* choose whether or not to pay life for Athreos.
|
||||
*/
|
||||
@Test
|
||||
public void testAthreosLifePayNotPrevented() {
|
||||
setStrictChooseMode(true);
|
||||
// Other nonblack creatures you control get +1/+1.
|
||||
// Players can't pay life or sacrifice creatures to cast spells or activate abilities
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Angel of Jubilation");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion");
|
||||
|
||||
// Indestructible
|
||||
// As long as your devotion to white and black is less than seven, Athreos isn't a creature.
|
||||
// Whenever another creature you own dies, return it to your hand unless target opponent pays 3 life.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Athreos, God of Passage");
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Mountain");
|
||||
addCard(Zone.HAND, playerB, "Lightning Bolt");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", "Silvercoat Lion");
|
||||
setChoice(playerB, "Yes"); // Pay 3 life to prevent that returns to PlayerA's hand?
|
||||
|
||||
addTarget(playerA, playerB);
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertGraveyardCount(playerB, "Lightning Bolt", 1);
|
||||
assertGraveyardCount(playerA, "Silvercoat Lion", 1);
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 17);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 5/1/2012
|
||||
*
|
||||
* If a spell or activated ability has a cost that requires a player to pay
|
||||
* life (as Griselbrand’s activated ability does) or sacrifice a creature
|
||||
* (as Fling does), that spell or ability can’t be cast or activated.
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testGriselbrandCantPay() {
|
||||
setStrictChooseMode(true);
|
||||
// Other nonblack creatures you control get +1/+1.
|
||||
// Players can't pay life or sacrifice creatures to cast spells or activate abilities
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Angel of Jubilation");
|
||||
|
||||
// Pay 7 life: Draw seven cards.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Griselbrand");
|
||||
|
||||
checkPlayableAbility("activated ability", 1, PhaseStep.PRECOMBAT_MAIN, playerB, "Pay 7 life", false);
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertAllCommandsUsed();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3362,8 +3362,8 @@ public class TestPlayer implements Player {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canPayLifeCost() {
|
||||
return computerPlayer.canPayLifeCost();
|
||||
public boolean canPayLifeCost(Ability ability) {
|
||||
return computerPlayer.canPayLifeCost(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ public class PlayerStub implements Player {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canPayLifeCost() {
|
||||
public boolean canPayLifeCost(Ability ability) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue