diff --git a/.gitattributes b/.gitattributes index 4f57391bfdb..9008842c1d8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9163,10 +9163,10 @@ forge-gui/res/cardsfolder/l/lightning_volley.txt -text forge-gui/res/cardsfolder/l/lightwalker.txt -text forge-gui/res/cardsfolder/l/lightwielder_paladin.txt svneol=native#text/plain forge-gui/res/cardsfolder/l/lignify.txt svneol=native#text/plain -forge-gui/res/cardsfolder/l/liliana,_the_last_hope.txt -text forge-gui/res/cardsfolder/l/liliana_heretical_healer.txt -text forge-gui/res/cardsfolder/l/liliana_of_the_dark_realms.txt -text forge-gui/res/cardsfolder/l/liliana_of_the_veil.txt -text +forge-gui/res/cardsfolder/l/liliana_the_last_hope.txt -text forge-gui/res/cardsfolder/l/liliana_vess.txt svneol=native#text/plain forge-gui/res/cardsfolder/l/lilianas_caress.txt svneol=native#text/plain forge-gui/res/cardsfolder/l/lilianas_elite.txt -text 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 07ddd020d1a..6a56a2f28a8 100644 --- a/forge-ai/src/main/java/forge/ai/ability/MillAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/MillAi.java @@ -1,11 +1,15 @@ package forge.ai.ability; +import com.google.common.base.Predicates; + import forge.ai.ComputerUtil; import forge.ai.ComputerUtilMana; import forge.ai.SpellAbilityAi; import forge.game.ability.AbilityUtils; import forge.game.card.Card; import forge.game.card.CardCollectionView; +import forge.game.card.CardLists; +import forge.game.card.CardPredicates; import forge.game.phase.PhaseHandler; import forge.game.phase.PhaseType; import forge.game.player.Player; @@ -23,6 +27,11 @@ public class MillAi extends SpellAbilityAi { && !ComputerUtil.castSpellInMain1(ai, sa)) { 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) { + return false; + } } return true; } diff --git a/forge-gui/res/cardsfolder/l/liliana,_the_last_hope.txt b/forge-gui/res/cardsfolder/l/liliana_the_last_hope.txt similarity index 88% rename from forge-gui/res/cardsfolder/l/liliana,_the_last_hope.txt rename to forge-gui/res/cardsfolder/l/liliana_the_last_hope.txt index d8137eac8e9..d6d6d182285 100644 --- a/forge-gui/res/cardsfolder/l/liliana,_the_last_hope.txt +++ b/forge-gui/res/cardsfolder/l/liliana_the_last_hope.txt @@ -2,23 +2,14 @@ Name:Liliana, the Last Hope ManaCost:1 B B Types:Planeswalker Liliana Loyalty:3 - A:AB$ Pump | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | NumAtt$ -2 | NumDef$ -1 | IsCurse$ True | UntilYourNextTurn$ True | TargetMin$ 0 | TargetMax$ 1 | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Up to one target creature gets -2/-1 until your next turn. - -A:AB$ Mill | Cost$ SubCounter<2/LOYALTY> | NumCards$ 2 | Planeswalker$ True | Defined$ You | SubAbility$ DBChooseCard | SpellDescription$ Put the top two cards of your library into your graveyard, then you may return a creature card from your graveyard to your hand. - +A:AB$ Mill | Cost$ SubCounter<2/LOYALTY> | NumCards$ 2 | AILogic$ LilianaMill | Planeswalker$ True | Defined$ You | SubAbility$ DBChooseCard | SpellDescription$ Put the top two cards of your library into your graveyard, then you may return a creature card from your graveyard to your hand. SVar:DBChooseCard:DB$ ChooseCard | Choices$ Creature.YouOwn | Optional$ Yes | ChoiceZone$ Graveyard | Amount$ 1 | SubAbility$ DBChangeZone - SVar:DBChangeZone:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | Defined$ ChosenCard | SubAbility$ DBCleanup - SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True - A:AB$ Effect | Cost$ SubCounter<7/LOYALTY> | Name$ Liliana, the Last Hope emblem | Image$ liliana_the_last_hope_emblem | Triggers$ TrigToken | SVars$ DBToken,X | Planeswalker$ True | Ultimate$ True | Stackable$ False | Duration$ Permanent | AILogic$ Always | SpellDescription$ You get an emblem with "At the beginning of your end step, put X 2/2 black Zombie creature tokens onto the battlefield, where X is two plus the number of Zombies you control." - SVar:TrigToken:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Command | Execute$ DBToken | TriggerDescription$ At the beginning of your end step, put X 2/2 black Zombie creature tokens onto the battlefield, where X is two plus the number of Zombies you control. - SVar:DBToken:AB$ Token | Cost$ 0 | TokenAmount$ X | References$ X | TokenName$ Zombie | TokenTypes$ Creature,Zombie | TokenOwner$ You | TokenColors$ Black | TokenPower$ 2 | TokenToughness$ 2 | TokenImage$ b 2 2 zombie EMN | TokenAltImages$ b_2_2_zombie2_EMN,b_2_2_zombie3_EMN - SVar:X:Count$Valid Card.Zombie+YouCtrl/Plus.2 SVar:PlayMain1:TRUE SVar:Picture:http://www.wizards.com/global/images/magic/general/liliana_the_last_hope.jpg