mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
Forgot to commit
This commit is contained in:
parent
186f29d0cc
commit
ef92e006d0
2 changed files with 10 additions and 48 deletions
|
@ -105,7 +105,7 @@ public class LastKnownInformationTest extends CardTestPlayerBase {
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Grizzly Bears", 1);
|
assertPermanentCount(playerA, "Grizzly Bears", 1);
|
||||||
assertLife(playerA, 27);
|
assertLife(playerA, 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -137,43 +137,5 @@ public class LastKnownInformationTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testCardTestPlayerAPIImpl1() {
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears");
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
|
||||||
|
|
||||||
addCard(Zone.HAND, playerA, "Last Breath");
|
|
||||||
addCard(Zone.HAND, playerA, "Shock");
|
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Last Breath", "Grizzly Bears");
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Shock", "Grizzly Bears");
|
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.END_TURN);
|
|
||||||
execute();
|
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Grizzly Bears", 0);
|
|
||||||
assertLife(playerA, 20);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testCardTestPlayerAPIImpl2() {
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears");
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
|
||||||
|
|
||||||
addCard(Zone.HAND, playerA, "Last Breath");
|
|
||||||
addCard(Zone.HAND, playerA, "Shock");
|
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Last Breath", "Grizzly Bears");
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Shock", "Grizzly Bears", "Last Breath",
|
|
||||||
StackClause.WHILE_NOT_ON_STACK);
|
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.END_TURN);
|
|
||||||
execute();
|
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Grizzly Bears", 0);
|
|
||||||
assertLife(playerA, 24);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -371,6 +371,14 @@ public class TestPlayer extends ComputerPlayer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
} else if (groups.length > 2 && groups[2].startsWith("!spellOnStack=")) {
|
||||||
|
String spellNotOnStack = groups[2].substring(14);
|
||||||
|
for (StackObject stackObject: game.getStack()) {
|
||||||
|
if (stackObject.getStackAbility().toString().equals(spellNotOnStack)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -385,14 +393,6 @@ public class TestPlayer extends ComputerPlayer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
} else if (groups.length > 2 && groups[2].startsWith("!spellOnStack=")) {
|
|
||||||
String spellNotOnStack = groups[2].substring(14);
|
|
||||||
for (StackObject stackObject: game.getStack()) {
|
|
||||||
if (stackObject.getStackAbility().toString().equals(spellNotOnStack)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -401,7 +401,7 @@ public class TestPlayer extends ComputerPlayer {
|
||||||
boolean result = true;
|
boolean result = true;
|
||||||
for (int i = 1; i < groups.length; i++) {
|
for (int i = 1; i < groups.length; i++) {
|
||||||
String group = groups[i];
|
String group = groups[i];
|
||||||
if (group.startsWith("spellOnStack") || group.startsWith("spellOnTopOfStack")) {
|
if (group.startsWith("spellOnStack") || group.startsWith("spellOnTopOfStack") || group.startsWith("!spellOnStack")) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (ability instanceof SpellAbility && ((SpellAbility) ability).getSpellAbilityType().equals(SpellAbilityType.SPLIT_FUSED)) {
|
if (ability instanceof SpellAbility && ((SpellAbility) ability).getSpellAbilityType().equals(SpellAbilityType.SPLIT_FUSED)) {
|
||||||
|
|
Loading…
Reference in a new issue