mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Update test for attacking AI. Sometime reproduces not attacking with Zephyr Sprite.
This commit is contained in:
parent
a0866ef602
commit
86bd2d3c40
2 changed files with 39 additions and 34 deletions
|
@ -0,0 +1,39 @@
|
|||
package org.mage.test.ai.bugs;
|
||||
|
||||
import mage.Constants;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestBase;
|
||||
|
||||
/**
|
||||
* Reproduces bug when AI didn't attack with one of the creatures.
|
||||
*
|
||||
* @ayratn
|
||||
*/
|
||||
public class BugDoesntAttackTest extends CardTestBase {
|
||||
|
||||
@Test
|
||||
public void testAttackWithZephyrSprite() throws Exception {
|
||||
addCard(Constants.Zone.HAND, playerA, "Zephyr Sprite");
|
||||
addCard(Constants.Zone.HAND, playerA, "Island");
|
||||
addCard(Constants.Zone.HAND, playerA, "Rupture Spire");
|
||||
setLife(playerB, 1);
|
||||
setStopOnTurn(4);
|
||||
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAttackWithGoblinGuide() throws Exception {
|
||||
addCard(Constants.Zone.HAND, playerA, "Goblin Guide");
|
||||
addCard(Constants.Zone.HAND, playerA, "Mountain");
|
||||
|
||||
playLand(playerA, "Mountain");
|
||||
castSpell(playerA, "Goblin Guide");
|
||||
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 18);
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
package org.mage.test.ai.bugs;
|
||||
|
||||
import mage.Constants;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestBase;
|
||||
|
||||
/**
|
||||
* Reproduces bug when AI didn't attack with one of the creatures.
|
||||
*
|
||||
* @ayratn
|
||||
*/
|
||||
public class BugDoesntAttackWithZephyrSpriteTest extends CardTestBase {
|
||||
|
||||
@Test
|
||||
public void testVersusInfectCreature() throws Exception {
|
||||
useRedDefault();
|
||||
addCard(Constants.Zone.HAND, playerA, "Zephyr Sprite");
|
||||
addCard(Constants.Zone.HAND, playerA, "Island");
|
||||
addCard(Constants.Zone.HAND, playerA, "Rupture Spire");
|
||||
setLife(playerB, 1);
|
||||
|
||||
setStopOnTurn(4);
|
||||
execute();
|
||||
|
||||
// life:ComputerB:0
|
||||
assertLife(playerB, 0);
|
||||
// turn:1
|
||||
assertTurn(3);
|
||||
// result:won
|
||||
assertResult(playerA, GameResult.WON);
|
||||
// life:ComputerA:20
|
||||
assertLife(playerA, 20);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue