mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Embalmer's Tools: AI should generally use its activated ability at opponent's end of turn and before its own turn.
This commit is contained in:
@@ -28,11 +28,17 @@ public class MillAi extends SpellAbilityAi {
|
||||
|
||||
@Override
|
||||
protected boolean checkAiLogic(final Player ai, final SpellAbility sa, final String aiLogic) {
|
||||
PhaseHandler ph = ai.getGame().getPhaseHandler();
|
||||
|
||||
if (aiLogic.equals("Main1")) {
|
||||
if (ai.getGame().getPhaseHandler().getPhase().isBefore(PhaseType.MAIN2) && !sa.hasParam("ActivationPhases")
|
||||
if (ph.getPhase().isBefore(PhaseType.MAIN2) && !sa.hasParam("ActivationPhases")
|
||||
&& !ComputerUtil.castSpellInMain1(ai, sa)) {
|
||||
return false;
|
||||
}
|
||||
} else if (aiLogic.equals("EndOfOppTurn")) {
|
||||
if (!(ph.is(PhaseType.END_OF_TURN) && ph.getNextTurn().equals(ai))) {
|
||||
return false;
|
||||
}
|
||||
} else if (aiLogic.equals("LilianaMill")) {
|
||||
// Only mill if a "Raise Dead" target is available, in case of control decks with few creatures
|
||||
if (CardLists.filter(ai.getCardsIn(ZoneType.Graveyard), CardPredicates.Presets.CREATURES).size() < 1) {
|
||||
|
||||
Reference in New Issue
Block a user