- Improved LifeLoseAi.

This commit is contained in:
Sloth
2013-05-15 18:01:52 +00:00
parent 274e2e904c
commit d62941f5ad

View File

@@ -109,7 +109,8 @@ public class LifeLoseAi extends SpellAbilityAi {
// Don't use loselife before main 2 if possible // Don't use loselife before main 2 if possible
if (ai.getGame().getPhaseHandler().getPhase().isBefore(PhaseType.MAIN2) if (ai.getGame().getPhaseHandler().getPhase().isBefore(PhaseType.MAIN2)
&& !sa.hasParam("ActivationPhases") && !priority) { && !sa.hasParam("ActivationPhases") && !priority
&& !ComputerUtil.castSpellInMain1(ai, sa)) {
return false; return false;
} }
@@ -129,12 +130,13 @@ public class LifeLoseAi extends SpellAbilityAi {
} }
} }
boolean randomReturn = r.nextFloat() <= .6667; if (priority || SpellAbilityAi.isSorcerySpeed(sa)
if (priority || SpellAbilityAi.playReusable(ai, sa)) { || sa.hasParam("ActivationPhases")
randomReturn = true; || SpellAbilityAi.playReusable(ai, sa)) {
return true;
} }
return (randomReturn); return false;
} }
@Override @Override