mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
Fixed the causes that triggered abilities were applied more often than they should. Fixed the lose ability bug (test with Master of the Pearl Trident giving island walk). Tests now build without errors. Only rarely the Grounded/Drake Umbra lose ability test fails.
This commit is contained in:
parent
80e9d748a7
commit
bb5b9587e0
11 changed files with 119 additions and 29 deletions
|
|
@ -96,4 +96,25 @@ public class LoseAbilityTest extends CardTestPlayerBase {
|
|||
// should NOT have flying
|
||||
Assert.assertFalse(airElemental.getAbilities().contains(FlyingAbility.getInstance()));
|
||||
}
|
||||
/**
|
||||
* Tests that gaining two times a triggered ability and losing one will result in only one triggering
|
||||
*/
|
||||
@Test
|
||||
public void testMultiGainTriggeredVsLoseAbility() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Sublime Archangel",2);
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Silvercoat Lion");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Plains", 3);
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 3);
|
||||
addCard(Constants.Zone.HAND, playerA, "Turn to Frog");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerB, "Island", 5);
|
||||
|
||||
castSpell(3, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Turn to Frog", "Sublime Archangel");
|
||||
attack(3, playerA, "Silvercoat Lion");
|
||||
|
||||
setStopAt(3, Constants.PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 16);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue