mirror of
https://github.com/correl/mage.git
synced 2025-04-11 01:01:05 -09:00
test for ai bug not attacking
This commit is contained in:
parent
fb4c0ceccf
commit
b636f4d342
1 changed files with 36 additions and 0 deletions
|
@ -0,0 +1,36 @@
|
||||||
|
package org.mage.test.serverside.ai;
|
||||||
|
|
||||||
|
import mage.Constants;
|
||||||
|
import mage.filter.Filter;
|
||||||
|
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 BugDoesntAttackWithKnightTest extends CardTestBase {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testVersusInfectCreature() throws Exception {
|
||||||
|
useRedDefault();
|
||||||
|
addCard(Constants.Zone.HAND, computerA, "Zephyr Sprite");
|
||||||
|
addCard(Constants.Zone.HAND, computerA, "Island");
|
||||||
|
addCard(Constants.Zone.HAND, computerA, "Rupture Spire");
|
||||||
|
setLife(computerB, 1);
|
||||||
|
|
||||||
|
setStopOnTurn(4);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
// life:ComputerB:0
|
||||||
|
assertLife(computerB, 0);
|
||||||
|
// turn:1
|
||||||
|
assertTurn(3);
|
||||||
|
// result:won
|
||||||
|
assertResult(computerA, GameResult.WON);
|
||||||
|
// life:ComputerA:20
|
||||||
|
assertLife(computerA, 20);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue