mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
Fix Twinning Staff to only happen when one or more copies would be made, and not zero. (#9843)
* Fix Twinning Staff to only apply when you're copying the spell at least one time. * Fix test so it works
This commit is contained in:
parent
7b8dd44e7a
commit
3044bf2e23
2 changed files with 19 additions and 1 deletions
|
@ -82,7 +82,8 @@ class TwinningStaffEffect extends ReplacementEffectImpl {
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return event.getPlayerId().equals(source.getControllerId())
|
||||
&& game.getSpellOrLKIStack(event.getTargetId()) != null;
|
||||
&& game.getSpellOrLKIStack(event.getTargetId()) != null
|
||||
&& event.getAmount() >= 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -85,4 +85,21 @@ public class TwinningStaffTest extends CardTestPlayerBase {
|
|||
assertGraveyardCount(playerA, bear, 1);
|
||||
assertGraveyardCount(playerA, elite, 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testThousandYearStormZeroCopies() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Badlands", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Thousand-Year Storm");
|
||||
addCard(Zone.BATTLEFIELD, playerA, staff);
|
||||
addCard(Zone.HAND, playerA, "Lightning Bolt", 2);
|
||||
|
||||
castSpell(1, PhaseStep.UPKEEP, playerA, "Lightning Bolt", playerB);
|
||||
checkLife("before", 1, PhaseStep.PRECOMBAT_MAIN, playerB, 20 - 3);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
setStrictChooseMode(false);
|
||||
checkLife("copy", 1, PhaseStep.END_COMBAT, playerB, 20 - 3 - 3 * 3);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue