mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
fixed Chainer, Nightmare Adept not triggering off of creatures owned by other players
This commit is contained in:
parent
5f8919e787
commit
e65d769e47
2 changed files with 25 additions and 1 deletions
|
@ -189,6 +189,6 @@ class ChainerNightmareAdeptTriggeredAbility extends EntersBattlefieldAllTriggere
|
|||
}
|
||||
|
||||
CastFromHandWatcher watcher = game.getState().getWatcher(CastFromHandWatcher.class);
|
||||
return watcher != null && !watcher.spellWasCastFromHand(event.getSourceId());
|
||||
return watcher != null && !watcher.spellWasCastFromHand(event.getTargetId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,8 @@ public class ChainerNightmareAdeptTest extends CardTestPlayerBase {
|
|||
private static final String maaka = "Feral Maaka";
|
||||
private static final String khenra = "Defiant Khenra";
|
||||
private static final String rings = "Rings of Brighthearth";
|
||||
private static final String swamp = "Swamp";
|
||||
private static final String reanimate = "Reanimate";
|
||||
|
||||
@Test
|
||||
public void testChainer() {
|
||||
|
@ -69,4 +71,26 @@ public class ChainerNightmareAdeptTest extends CardTestPlayerBase {
|
|||
|
||||
assertLife(playerB, 20 - 2 - 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testChainerOpponent() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, chainer);
|
||||
addCard(Zone.BATTLEFIELD, playerA, swamp);
|
||||
addCard(Zone.HAND, playerA, reanimate);
|
||||
addCard(Zone.GRAVEYARD, playerB, maaka);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, reanimate, maaka);
|
||||
|
||||
attack(1, playerA, maaka);
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, maaka, 1);
|
||||
assertGraveyardCount(playerB, maaka, 0);
|
||||
assertAbility(playerA, maaka, HasteAbility.getInstance(), true);
|
||||
assertLife(playerA, 20 - 2);
|
||||
assertLife(playerB, 20 - 2);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue