diff --git a/forge-ai/src/main/java/forge/ai/ability/MillAi.java b/forge-ai/src/main/java/forge/ai/ability/MillAi.java index 41ab39b7b5d..fd849395a82 100644 --- a/forge-ai/src/main/java/forge/ai/ability/MillAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/MillAi.java @@ -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) { diff --git a/forge-gui/res/cardsfolder/e/embalmers_tools.txt b/forge-gui/res/cardsfolder/e/embalmers_tools.txt index 9dcd0d4362e..de066242678 100644 --- a/forge-gui/res/cardsfolder/e/embalmers_tools.txt +++ b/forge-gui/res/cardsfolder/e/embalmers_tools.txt @@ -2,8 +2,8 @@ Name:Embalmer's Tools ManaCost:2 Types:Artifact S:Mode$ ReduceCost | ValidCard$ Creature.YouOwn+inZoneGraveyard | Type$ Ability | Amount$ 1 | Description$ Activated abilities of creature cards in your graveyard cost {1} less to activate. -A:AB$ Mill | Cost$ tapXType<1/Zombie> | NumCards$ 1 | ValidTgts$ Player | TgtPrompt$ Choose a player | SpellDescription$ Target player puts the top card of his or her library into his or her graveyard. +A:AB$ Mill | Cost$ tapXType<1/Zombie> | NumCards$ 1 | ValidTgts$ Player | TgtPrompt$ Choose a player | AILogic$ EndOfOppTurn | SpellDescription$ Target player puts the top card of his or her library into his or her graveyard. SVar:RemRandomDeck:True -DeckHints:Type$Zombie +DeckHints:Type$Zombie SVar:Picture:http://www.wizards.com/global/images/magic/general/embalmers_tools.jpg Oracle:Activated abilities of creature cards in your graveyard cost {1} less to activate.\nTap an untapped Zombie you control: Target player puts the top card of his or her library into his or her graveyard. \ No newline at end of file