- Added Loxodon Peacekeeper

This commit is contained in:
swordshine
2013-03-18 01:51:55 +00:00
parent c3172c6aba
commit 84cdfcc107
5 changed files with 35 additions and 1 deletions

View File

@@ -63,6 +63,8 @@ public class ChoosePlayerEffect extends SpellAbilityEffect {
System.out.println("No good curse choices. Picking first available: " + choices.get(0));
card.setChosenPlayer(choices.get(0));
}
} else if ("Pump".equals(sa.getParam("AILogic"))) {
card.setChosenPlayer(choices.contains(p) ? p : choices.get(0));
} else {
card.setChosenPlayer(p);
}

View File

@@ -2521,6 +2521,23 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
return false;
}
}
} else if (property.startsWith("withLowest")) {
if (property.substring(10).equals("Life")) {
int lowestLife = 1000;
List<Player> lowestlifep = new ArrayList<Player>();
for (final Player p : Singletons.getModel().getGame().getPlayers()) {
if (p.getLife() == lowestLife) {
lowestlifep.add(p);
} else if (p.getLife() < lowestLife) {
lowestLife = p.getLife();
lowestlifep.clear();
lowestlifep.add(p);
}
}
if (!lowestlifep.contains(this)) {
return false;
}
}
}
return true;