mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +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
|
@Override
|
||||||
protected boolean checkAiLogic(final Player ai, final SpellAbility sa, final String aiLogic) {
|
protected boolean checkAiLogic(final Player ai, final SpellAbility sa, final String aiLogic) {
|
||||||
|
PhaseHandler ph = ai.getGame().getPhaseHandler();
|
||||||
|
|
||||||
if (aiLogic.equals("Main1")) {
|
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)) {
|
&& !ComputerUtil.castSpellInMain1(ai, sa)) {
|
||||||
return false;
|
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")) {
|
} else if (aiLogic.equals("LilianaMill")) {
|
||||||
// Only mill if a "Raise Dead" target is available, in case of control decks with few creatures
|
// 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) {
|
if (CardLists.filter(ai.getCardsIn(ZoneType.Graveyard), CardPredicates.Presets.CREATURES).size() < 1) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Embalmer's Tools
|
|||||||
ManaCost:2
|
ManaCost:2
|
||||||
Types:Artifact
|
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.
|
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
|
SVar:RemRandomDeck:True
|
||||||
DeckHints:Type$Zombie
|
DeckHints:Type$Zombie
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/embalmers_tools.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/embalmers_tools.jpg
|
||||||
|
|||||||
Reference in New Issue
Block a user