Forgot to commit

This commit is contained in:
magenoxx 2014-08-15 10:27:17 +04:00
parent 186f29d0cc
commit ef92e006d0
2 changed files with 10 additions and 48 deletions

View file

@ -105,7 +105,7 @@ public class LastKnownInformationTest extends CardTestPlayerBase {
execute();
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);
}
}

View file

@ -371,6 +371,14 @@ public class TestPlayer extends ComputerPlayer {
}
}
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;
}
@ -385,14 +393,6 @@ public class TestPlayer extends ComputerPlayer {
}
}
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;
}
@ -401,7 +401,7 @@ public class TestPlayer extends ComputerPlayer {
boolean result = true;
for (int i = 1; i < groups.length; i++) {
String group = groups[i];
if (group.startsWith("spellOnStack") || group.startsWith("spellOnTopOfStack")) {
if (group.startsWith("spellOnStack") || group.startsWith("spellOnTopOfStack") || group.startsWith("!spellOnStack")) {
break;
}
if (ability instanceof SpellAbility && ((SpellAbility) ability).getSpellAbilityType().equals(SpellAbilityType.SPLIT_FUSED)) {