mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 19:11:59 -08:00
New implementation for LevelUpAbility. All tests ok.
This commit is contained in:
parent
c2ea8246d2
commit
f39d5dbca1
26 changed files with 433 additions and 322 deletions
|
|
@ -1,42 +0,0 @@
|
|||
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;
|
||||
import org.junit.Ignore;
|
||||
|
||||
/**
|
||||
* 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
|
||||
@Ignore
|
||||
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.assertNotNull(master.getCounters());
|
||||
Assert.assertFalse(master.getCounters().isEmpty());
|
||||
Assert.assertEquals(12, master.getCounters().getCount(CounterType.LEVEL));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue