mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 06:22:01 -08:00
Test that reproduces Issue 411.
This commit is contained in:
parent
13c5177d54
commit
c5d2d41f60
1 changed files with 39 additions and 0 deletions
|
|
@ -0,0 +1,39 @@
|
|||
package org.mage.test.ai;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import mage.Constants;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestBase;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Make sure AI uses level up ability, but not too much (over the max useful level - Issue 441).
|
||||
*
|
||||
* @author ayratn
|
||||
*/
|
||||
public class LevelUpAbilityTest extends CardTestBase {
|
||||
|
||||
@Test
|
||||
public void testLevelUpAbilityUsage() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Transcendent Master");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Swamp", 15);
|
||||
setStopOnTurn(3);
|
||||
|
||||
execute();
|
||||
|
||||
Permanent master = getPermanent("Transcendent Master", playerA.getId());
|
||||
Assert.assertNotNull(master);
|
||||
|
||||
System.out.println("Results:");
|
||||
for (Map.Entry<String, Counter> counter : master.getCounters().entrySet()) {
|
||||
System.out.println(counter.getKey() + " : " + counter.getValue().getName() + " : " + counter.getValue().getCount());
|
||||
}
|
||||
|
||||
Assert.assertFalse(master.getCounters().isEmpty());
|
||||
Assert.assertEquals(12, master.getCounters().getCount(CounterType.LEVEL));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue