mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 20:11:59 -08:00
move static function to CardImpl, and other api fixes
This commit is contained in:
parent
0791283a6b
commit
6f8f10fcc3
32 changed files with 177 additions and 296 deletions
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package org.mage.test.cards.abilities.keywords;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -109,7 +108,7 @@ public class BestowTest extends CardTestPlayerBase {
|
|||
// because Boon Satyr is no creature on the battlefield, evolve may not trigger
|
||||
assertPermanentCount(playerA, "Boon Satyr", 1);
|
||||
Permanent boonSatyr = getPermanent("Boon Satyr", playerA);
|
||||
Assert.assertTrue("Boon Satyr may not be a creature", !boonSatyr.getCardType().contains(CardType.CREATURE));
|
||||
Assert.assertTrue("Boon Satyr may not be a creature", !boonSatyr.isCreature());
|
||||
assertPermanentCount(playerA, "Silent Artisan", 1);
|
||||
assertPermanentCount(playerA, "Experiment One", 1);
|
||||
assertPowerToughness(playerA, "Experiment One", 1, 1);
|
||||
|
|
@ -145,8 +144,8 @@ public class BestowTest extends CardTestPlayerBase {
|
|||
assertPowerToughness(playerA, "Hopeful Eidolon", 1, 1);
|
||||
|
||||
Permanent hopefulEidolon = getPermanent("Hopeful Eidolon", playerA);
|
||||
Assert.assertTrue("Hopeful Eidolon has to be a creature but is not", hopefulEidolon.getCardType().contains(CardType.CREATURE));
|
||||
Assert.assertTrue("Hopeful Eidolon has to be an enchantment but is not", hopefulEidolon.getCardType().contains(CardType.ENCHANTMENT));
|
||||
Assert.assertTrue("Hopeful Eidolon has to be a creature but is not", hopefulEidolon.isCreature());
|
||||
Assert.assertTrue("Hopeful Eidolon has to be an enchantment but is not", hopefulEidolon.isEnchantment());
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -360,7 +359,7 @@ public class BestowTest extends CardTestPlayerBase {
|
|||
assertPowerToughness(playerB, "Nighthowler", 2, 2);
|
||||
Permanent nighthowler = getPermanent("Nighthowler", playerB);
|
||||
|
||||
Assert.assertEquals("Nighthowler has to be a creature", true, nighthowler.getCardType().contains(CardType.CREATURE));
|
||||
Assert.assertEquals("Nighthowler has to be a creature", true, nighthowler.isCreature());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package org.mage.test.cards.control;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -47,7 +46,7 @@ public class BattlefieldTriggeredAbilitiesTest extends CardTestPlayerBase {
|
|||
int playerACount = 0;
|
||||
int playerBCount = 0;
|
||||
for (Permanent p : currentGame.getBattlefield().getAllActivePermanents()) {
|
||||
if (p.getCardType().contains(CardType.LAND)) {
|
||||
if (p.isLand()) {
|
||||
if (p.getControllerId().equals(playerB.getId())) {
|
||||
playerBCount++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package org.mage.test.cards.copy;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.Filter;
|
||||
|
|
@ -42,7 +41,7 @@ public class ProgenitorMimicTest extends CardTestPlayerBase {
|
|||
int nonTokens = 0;
|
||||
for (Permanent permanent : currentGame.getBattlefield().getAllPermanents()) {
|
||||
if (permanent.getControllerId().equals(playerB.getId())) {
|
||||
if (permanent.getCardType().contains(CardType.CREATURE)) {
|
||||
if (permanent.isCreature()) {
|
||||
if (permanent instanceof PermanentToken) {
|
||||
tokens++;
|
||||
} else {
|
||||
|
|
@ -122,7 +121,7 @@ public class ProgenitorMimicTest extends CardTestPlayerBase {
|
|||
int nonTokens = 0;
|
||||
for (Permanent permanent : currentGame.getBattlefield().getAllPermanents()) {
|
||||
if (permanent.getControllerId().equals(playerB.getId())) {
|
||||
if (permanent.getCardType().contains(CardType.CREATURE)) {
|
||||
if (permanent.isCreature()) {
|
||||
if (permanent instanceof PermanentToken) {
|
||||
tokens++;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
*/
|
||||
package org.mage.test.cards.single.ths;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -47,7 +46,7 @@ public class HeliodGodOfTheSun extends CardTestPlayerBase {
|
|||
assertPermanentCount(playerA, "Hold the Gates", 1);
|
||||
|
||||
Permanent heliodGodOfTheSun = getPermanent("Heliod, God of the Sun", playerA);
|
||||
Assert.assertTrue(heliodGodOfTheSun.getCardType().contains(CardType.CREATURE));
|
||||
Assert.assertTrue(heliodGodOfTheSun.isCreature());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue