- Fixed NPE

This commit is contained in:
swordshine
2014-03-21 12:13:33 +00:00
parent 748356b8bf
commit f470120924
2 changed files with 2 additions and 2 deletions

View File

@@ -94,7 +94,7 @@ public class CountersPutAi extends SpellAbilityAi {
// TODO handle proper calculation of X values based on Cost
int amount = AbilityUtils.calculateAmount(source, amountStr, sa);
if (sa.getParam("AILogic").equals("Fight")) {
if ("Fight".equals(sa.getParam("AILogic"))) {
int nPump = 0;
if (type.equals("P1P1")) {
nPump = amount;

View File

@@ -23,7 +23,7 @@ public class PeekAndRevealAi extends SpellAbilityAi {
if (sa instanceof AbilityStatic) {
return false;
}
if (sa.getParam("AILogic").equals("Main2")) {
if ("Main2".equals(sa.getParam("AILogic"))) {
if (aiPlayer.getGame().getPhaseHandler().getPhase().isBefore(PhaseType.MAIN2)) {
return false;
}