mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Improved LifeLoseAi.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user