diff --git a/.gitattributes b/.gitattributes index 602eafdb496..044c02014bb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8270,6 +8270,7 @@ res/cardsfolder/p/prototype_portal.txt svneol=native#text/plain res/cardsfolder/p/provoke.txt svneol=native#text/plain res/cardsfolder/p/prowess_of_the_fair.txt svneol=native#text/plain res/cardsfolder/p/prowling_nightstalker.txt svneol=native#text/plain +res/cardsfolder/p/prowling_pangolin.txt -text res/cardsfolder/p/psionic_blast.txt svneol=native#text/plain res/cardsfolder/p/psionic_entity.txt svneol=native#text/plain res/cardsfolder/p/psionic_gift.txt svneol=native#text/plain diff --git a/res/cardsfolder/p/prowling_pangolin.txt b/res/cardsfolder/p/prowling_pangolin.txt new file mode 100644 index 00000000000..16e360ee0ee --- /dev/null +++ b/res/cardsfolder/p/prowling_pangolin.txt @@ -0,0 +1,9 @@ +Name:Prowling Pangolin +ManaCost:3 B B +Types:Creature Anteater Beast +PT:6/5 +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | Execute$ TrigSac | TriggerDescription$ When CARDNAME enters the battlefield, any player may sacrifice two creatures. If a player does, sacrifice CARDNAME. +SVar:TrigSac:AB$ Sacrifice | Cost$ 0 | Defined$ Self | UnlessCost$ Sac<2/Creature> | UnlessPayer$ Player | UnlessSwitched$ True +SVar:Picture:http://www.wizards.com/global/images/magic/general/prowling_pangolin.jpg +Oracle:When Prowling Pangolin enters the battlefield, any player may sacrifice two creatures. If a player does, sacrifice Prowling Pangolin. +SetInfo:ONS Uncommon \ No newline at end of file diff --git a/src/main/java/forge/game/ai/ComputerUtil.java b/src/main/java/forge/game/ai/ComputerUtil.java index 88f2916d079..ce40596f933 100644 --- a/src/main/java/forge/game/ai/ComputerUtil.java +++ b/src/main/java/forge/game/ai/ComputerUtil.java @@ -364,6 +364,18 @@ public class ComputerUtil { CardLists.shuffle(sacMeList); return sacMeList.get(0); } + + // Sac lands + final List landsInPlay = CardLists.getType(typeList, "Land"); + if (!landsInPlay.isEmpty()) { + final List landsInHand = CardLists.getType(ai.getCardsIn(ZoneType.Battlefield), "Land"); + final List nonLandsInHand = CardLists.getNotType(ai.getCardsIn(ZoneType.Hand), "Land"); + final int highestCMC = Math.max(6, Aggregates.max(nonLandsInHand, CardPredicates.Accessors.fnGetCmc)); + if (landsInPlay.size() + landsInHand.size() >= highestCMC) { + // Don't need more land. + return ComputerUtilCard.getWorstLand(landsInPlay); + } + } } } diff --git a/src/main/java/forge/game/ai/ComputerUtilCost.java b/src/main/java/forge/game/ai/ComputerUtilCost.java index c7aca5f5a3a..cccb46ca8cb 100644 --- a/src/main/java/forge/game/ai/ComputerUtilCost.java +++ b/src/main/java/forge/game/ai/ComputerUtilCost.java @@ -410,6 +410,7 @@ public class ComputerUtilCost { return checkLifeCost(payer, cost, source, 4, sa) && checkDamageCost(payer, cost, source, 4) + && (isMine || checkSacrificeCost(payer, cost, source)) && (isMine || checkDiscardCost(payer, cost, source)) && (!source.getName().equals("Tyrannize") || payer.getCardsIn(ZoneType.Hand).size() > 2) && (!source.getName().equals("Perplex") || payer.getCardsIn(ZoneType.Hand).size() < 2)