- Fixed AI predicting Battletide Alchemist wrongly.

This commit is contained in:
Sloth
2013-03-20 20:06:31 +00:00
parent 33efc81ce2
commit 8f35ae4961
2 changed files with 14 additions and 8 deletions

View File

@@ -155,7 +155,7 @@ public enum ApiType {
GenericChoice (ChooseGenericEffect.class, CannotPlayAi.class),
LoseLife (LifeLoseEffect.class, LifeLoseAi.class),
LosesGame (GameLossEffect.class, GameLossAi.class),
Mana (ManaEffect.class, CannotPlayAi.class),
Mana (ManaEffect.class, CanPlayAsDrawbackAi.class),
ManaReflected (ManaReflectedEffect.class, CannotPlayAi.class),
Mill (MillEffect.class, MillAi.class),
MoveCounter (CountersMoveEffect.class, CountersMoveAi.class),

View File

@@ -71,13 +71,19 @@ public class StaticAbilityPreventDamage {
return restDamage;
}
if (!isTest && params.containsKey("Optional")) { //Assume if param is present it should be optional
final String logic = params.containsKey("AILogic") ? params.get("AILogic") : "";
final String message = "Apply the effect of " + hostCard + "? (Affected: " + target + ")";
boolean confirmed = hostCard.getController().getController().confirmStaticApplication(hostCard, target, logic, message);
if (params.containsKey("Optional")) { //Assume if param is present it should be optional
if (!isTest) {
final String logic = params.containsKey("AILogic") ? params.get("AILogic") : "";
final String message = "Apply the effect of " + hostCard + "? (Affected: " + target + ")";
boolean confirmed = hostCard.getController().getController().confirmStaticApplication(hostCard, target, logic, message);
if (!confirmed) {
return restDamage;
if (!confirmed) {
return restDamage;
}
} else { //test
if (!hostCard.getController().equals(target)) {
return restDamage;
}
}
}