- 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), GenericChoice (ChooseGenericEffect.class, CannotPlayAi.class),
LoseLife (LifeLoseEffect.class, LifeLoseAi.class), LoseLife (LifeLoseEffect.class, LifeLoseAi.class),
LosesGame (GameLossEffect.class, GameLossAi.class), LosesGame (GameLossEffect.class, GameLossAi.class),
Mana (ManaEffect.class, CannotPlayAi.class), Mana (ManaEffect.class, CanPlayAsDrawbackAi.class),
ManaReflected (ManaReflectedEffect.class, CannotPlayAi.class), ManaReflected (ManaReflectedEffect.class, CannotPlayAi.class),
Mill (MillEffect.class, MillAi.class), Mill (MillEffect.class, MillAi.class),
MoveCounter (CountersMoveEffect.class, CountersMoveAi.class), MoveCounter (CountersMoveEffect.class, CountersMoveAi.class),

View File

@@ -71,7 +71,8 @@ public class StaticAbilityPreventDamage {
return restDamage; return restDamage;
} }
if (!isTest && params.containsKey("Optional")) { //Assume if param is present it should be optional 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 logic = params.containsKey("AILogic") ? params.get("AILogic") : "";
final String message = "Apply the effect of " + hostCard + "? (Affected: " + target + ")"; final String message = "Apply the effect of " + hostCard + "? (Affected: " + target + ")";
boolean confirmed = hostCard.getController().getController().confirmStaticApplication(hostCard, target, logic, message); boolean confirmed = hostCard.getController().getController().confirmStaticApplication(hostCard, target, logic, message);
@@ -79,6 +80,11 @@ public class StaticAbilityPreventDamage {
if (!confirmed) { if (!confirmed) {
return restDamage; return restDamage;
} }
} else { //test
if (!hostCard.getController().equals(target)) {
return restDamage;
}
}
} }
// no amount means all // no amount means all