mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
Test and fix for Issue#44: War Falcon - Attack condition does not work properly. Fixed changing controller for game state effects
This commit is contained in:
parent
335462c8c8
commit
f2229f9fd7
4 changed files with 62 additions and 8 deletions
|
|
@ -149,4 +149,32 @@ public class ExchangeControlTest extends CardTestPlayerBase {
|
|||
// this one is still on opponent's side
|
||||
assertPermanentCount(playerB, "Elite Vanguard", 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests switching controls will affect restriction effect
|
||||
*/
|
||||
@Test
|
||||
public void testRestrictionEffect() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 5);
|
||||
addCard(Constants.Zone.HAND, playerA, "Switcheroo");
|
||||
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "War Falcon");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Elite Vanguard");
|
||||
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerB, "Llanowar Elves");
|
||||
|
||||
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Switcheroo", "War Falcon^Llanowar Elves");
|
||||
|
||||
attack(2, playerB, "War Falcon");
|
||||
|
||||
setStopAt(2, Constants.PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
// check creatures changes their controllers
|
||||
assertPermanentCount(playerA, "Llanowar Elves", 1);
|
||||
assertPermanentCount(playerB, "War Falcon", 1);
|
||||
|
||||
// War Falcon can't attack
|
||||
assertLife(playerA, 20);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue