Finished change of delimter from ";" to "$" for internal handling of tests to prevent problems from rules containing — code.

This commit is contained in:
LevelX2 2015-03-11 14:04:56 +01:00
parent 41f878c9ad
commit bda106d5eb
2 changed files with 6 additions and 4 deletions

View file

@ -106,6 +106,8 @@ public class CloudshiftTest extends CardTestPlayerBase {
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 3);
addCard(Zone.HAND, playerA, "Cloudshift");
// Haste
// When Fervent Cathar enters the battlefield, target creature can't block this turn.
addCard(Zone.HAND, playerB, "Fervent Cathar");
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Fervent Cathar");

View file

@ -148,7 +148,7 @@ public class TestPlayer extends ComputerPlayer {
if (action.getAction().startsWith("manaActivate:")) {
String command = action.getAction();
command = command.substring(command.indexOf("manaActivate:") + 13);
String[] groups = command.split("$");
String[] groups = command.split("\\$");
List<Permanent> manaPerms = this.getAvailableManaProducers(game);
for (Permanent perm: manaPerms) {
for (Ability manaAbility: perm.getAbilities().getAvailableManaAbilities(Zone.BATTLEFIELD, game)) {
@ -176,7 +176,7 @@ public class TestPlayer extends ComputerPlayer {
if (action.getAction().startsWith("addCounters:")) {
String command = action.getAction();
command = command.substring(command.indexOf("addCounters:") + 12);
String[] groups = command.split("$");
String[] groups = command.split("\\$");
for (Permanent permanent : game.getBattlefield().getAllActivePermanents()) {
if (permanent.getName().equals(groups[0])) {
Counter counter = new Counter(groups[1], Integer.parseInt(groups[2]));
@ -204,7 +204,7 @@ public class TestPlayer extends ComputerPlayer {
}
String command = action.getAction();
command = command.substring(command.indexOf("attack:") + 7);
String[] groups = command.split("$");
String[] groups = command.split("\\$");
for (int i = 1; i < groups.length; i++) {
String group = groups[i];
if (group.startsWith("planeswalker=")) {
@ -234,7 +234,7 @@ public class TestPlayer extends ComputerPlayer {
if (action.getTurnNum() == game.getTurnNum() && action.getAction().startsWith("block:")) {
String command = action.getAction();
command = command.substring(command.indexOf("block:") + 6);
String[] groups = command.split("$");
String[] groups = command.split("\\$");
FilterCreatureForCombatBlock filterBlocker = new FilterCreatureForCombatBlock();
filterBlocker.add(new NamePredicate(groups[0]));
filterBlocker.add(Predicates.not(new BlockingPredicate()));