diff --git a/.gitattributes b/.gitattributes index 6625622ba43..3e6927132e4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7973,6 +7973,7 @@ res/cardsfolder/t/teferis_care.txt -text res/cardsfolder/t/teferis_drake.txt -text res/cardsfolder/t/teferis_honor_guard.txt -text res/cardsfolder/t/teferis_isle.txt -text +res/cardsfolder/t/teferis_moat.txt -text res/cardsfolder/t/teferis_puzzle_box.txt svneol=native#text/plain res/cardsfolder/t/teferis_response.txt svneol=native#text/plain res/cardsfolder/t/tek.txt svneol=native#text/plain diff --git a/res/cardsfolder/t/teferis_moat.txt b/res/cardsfolder/t/teferis_moat.txt new file mode 100644 index 00000000000..c1c8ed9496c --- /dev/null +++ b/res/cardsfolder/t/teferis_moat.txt @@ -0,0 +1,13 @@ +Name:Teferi's Moat +ManaCost:3 W U +Types:Enchantment +Text:no text +T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ ChooseColor | Static$ True| TriggerDescription$ As CARDNAME enters the battlefield, choose a color. +SVar:ChooseColor:AB$ ChooseColor | Cost$ 0 | Defined$ You | AILogic$ MostProminentHumanCreatures +S:Mode$ Continuous | Affected$ Creature.withoutFlying+ChosenColor | AddHiddenKeyword$ HIDDEN CARDNAME can't attack. | Description$ Creatures of the chosen color without flying can't attack you. +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/teferis_moat.jpg +SetInfo:INV|Rare|http://magiccards.info/scans/en/in/279.jpg +SetInfo:TSB|Special|http://magiccards.info/scans/en/tsts/103.jpg +Oracle:As Teferi's Moat enters the battlefield, choose a color.\nCreatures of the chosen color without flying can't attack you. +End \ No newline at end of file diff --git a/src/main/java/forge/card/abilityFactory/AbilityFactory_Choose.java b/src/main/java/forge/card/abilityFactory/AbilityFactory_Choose.java index af79f060680..cca7fd7610c 100644 --- a/src/main/java/forge/card/abilityFactory/AbilityFactory_Choose.java +++ b/src/main/java/forge/card/abilityFactory/AbilityFactory_Choose.java @@ -4,6 +4,7 @@ package forge.card.abilityFactory; import forge.AllZone; import forge.AllZoneUtil; import forge.Card; +import forge.CardList; import forge.CardUtil; import forge.ComputerUtil; import forge.Constant; @@ -588,6 +589,12 @@ public class AbilityFactory_Choose { if (logic.equals("MostProminentInGame")) { chosen = CardFactoryUtil.getMostProminentColor(AllZoneUtil.getCardsInGame()); } + if (logic.equals("MostProminentHumanCreatures")) { + CardList list = AllZoneUtil.getCreaturesInPlay(AllZone.getHumanPlayer()); + if(list.isEmpty()) + list = AllZoneUtil.getCardsInGame().getController(AllZone.getHumanPlayer()).getType("Creature"); + chosen = CardFactoryUtil.getMostProminentColor(list); + } } if (chosen.equals("")) { chosen = Constant.Color.Green;