mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
[STX] fixed Plumb the Forbidden ability not triggering (fixes #7755)
This commit is contained in:
parent
cbc949c08e
commit
af0178962d
2 changed files with 49 additions and 0 deletions
|
@ -50,6 +50,10 @@ class PlumbTheForbiddenCost extends SacrificeTargetCost {
|
|||
"copy this spell for each creature sacrificed this way";
|
||||
}
|
||||
|
||||
private PlumbTheForbiddenCost(final PlumbTheForbiddenCost cost) {
|
||||
super(cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean pay(Ability ability, Game game, Ability source, UUID controllerId, boolean noMana, Cost costToPay) {
|
||||
if (!super.pay(ability, game, source, controllerId, noMana, costToPay)) {
|
||||
|
@ -69,4 +73,9 @@ class PlumbTheForbiddenCost extends SacrificeTargetCost {
|
|||
public boolean canPay(Ability ability, Ability source, UUID controllerId, Game game) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlumbTheForbiddenCost copy() {
|
||||
return new PlumbTheForbiddenCost(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
package org.mage.test.cards.single.stx;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class PlumbTheForbiddenTest extends CardTestPlayerBase {
|
||||
|
||||
private static final String plumb = "Plumb the Forbidden";
|
||||
private static final String bear = "Grizzly Bears";
|
||||
private static final String lion = "Silvercoat Lion";
|
||||
private static final String corpse = "Walking Corpse";
|
||||
|
||||
@Test
|
||||
public void testPlumbTheForbidden() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, bear);
|
||||
addCard(Zone.BATTLEFIELD, playerA, lion);
|
||||
addCard(Zone.BATTLEFIELD, playerA, corpse);
|
||||
addCard(Zone.HAND, playerA, plumb);
|
||||
|
||||
setChoice(playerA, String.join("^", bear, lion, corpse));
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, plumb);
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertGraveyardCount(playerA, bear, 1);
|
||||
assertGraveyardCount(playerA, lion, 1);
|
||||
assertGraveyardCount(playerA, corpse, 1);
|
||||
assertGraveyardCount(playerA, plumb, 1);
|
||||
assertLife(playerA, 20 - 4);
|
||||
assertHandCount(playerA, 4);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue