diff --git a/res/cardsfolder/c/contaminated_ground.txt b/res/cardsfolder/c/contaminated_ground.txt index 326b0a2cb7b..7d38fc67b10 100644 --- a/res/cardsfolder/c/contaminated_ground.txt +++ b/res/cardsfolder/c/contaminated_ground.txt @@ -3,7 +3,7 @@ ManaCost:1 B Types:Enchantment Aura Text:no text K:Enchant land -A:SP$ Attach | Cost$ 1 B | ValidTgts$ Land | AILogic$ Curse +A:SP$ Attach | Cost$ 1 B | ValidTgts$ Land | AILogic$ ChangeType S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddType$ Swamp | RemoveSubTypes$ True | RemoveAllAbilities$ True | Description$ Enchanted land is a Swamp. T:Mode$ Taps | ValidCard$ Card.AttachedBy | TriggerZones$ Battlefield | Execute$ TrigLose | TriggerDescription$ Whenever enchanted land becomes tapped, its controller loses 2 life. SVar:TrigLose:AB$LoseLife | Cost$ 0 | Defined$ TriggeredCardController | LifeAmount$ 2 diff --git a/res/cardsfolder/e/evil_presence.txt b/res/cardsfolder/e/evil_presence.txt index 42d8822d983..8476e045074 100644 --- a/res/cardsfolder/e/evil_presence.txt +++ b/res/cardsfolder/e/evil_presence.txt @@ -3,7 +3,7 @@ ManaCost:B Types:Enchantment Aura Text:no text K:Enchant land -A:SP$ Attach | Cost$ B | ValidTgts$ Land | AILogic$ Curse +A:SP$ Attach | Cost$ B | ValidTgts$ Land | AILogic$ ChangeType S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddType$ Swamp | RemoveSubTypes$ True | RemoveAllAbilities$ True | Description$ Enchanted land is a Swamp. SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/evil_presence.jpg diff --git a/res/cardsfolder/l/lingering_mirage.txt b/res/cardsfolder/l/lingering_mirage.txt index 15e4a2ad632..920a407428b 100644 --- a/res/cardsfolder/l/lingering_mirage.txt +++ b/res/cardsfolder/l/lingering_mirage.txt @@ -3,7 +3,7 @@ ManaCost:1 U Types:Enchantment Aura Text:no text K:Enchant land -A:SP$ Attach | Cost$ 1 U | ValidTgts$ Land | AILogic$ Curse +A:SP$ Attach | Cost$ 1 U | ValidTgts$ Land | AILogic$ ChangeType S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddType$ Island | RemoveSubTypes$ True | RemoveAllAbilities$ True | Description$ Enchanted land is an Island. K:Cycling:2 SVar:Rarity:Uncommon diff --git a/res/cardsfolder/s/seas_claim.txt b/res/cardsfolder/s/seas_claim.txt index 46eac282d58..c60378997db 100644 --- a/res/cardsfolder/s/seas_claim.txt +++ b/res/cardsfolder/s/seas_claim.txt @@ -3,7 +3,7 @@ ManaCost:U Types:Enchantment Aura Text:no text K:Enchant land -A:SP$ Attach | Cost$ 1 U | ValidTgts$ Land | AILogic$ Curse +A:SP$ Attach | Cost$ 1 U | ValidTgts$ Land | AILogic$ ChangeType S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddType$ Island | RemoveSubTypes$ True | RemoveAllAbilities$ True | Description$ Enchanted land is an Island. SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/seas_claim.jpg diff --git a/res/cardsfolder/s/spreading_seas.txt b/res/cardsfolder/s/spreading_seas.txt index ac872d16e4d..e992cd12b28 100644 --- a/res/cardsfolder/s/spreading_seas.txt +++ b/res/cardsfolder/s/spreading_seas.txt @@ -3,7 +3,7 @@ ManaCost:1 U Types:Enchantment Aura Text:no text K:Enchant land -A:SP$ Attach | Cost$ 1 U | ValidTgts$ Land | AILogic$ Curse +A:SP$ Attach | Cost$ 1 U | ValidTgts$ Land | AILogic$ ChangeType S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddType$ Island | RemoveSubTypes$ True | RemoveAllAbilities$ True | Description$ Enchanted land is an Island. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ When CARDNAME enters the battlefield, draw a card. SVar:TrigDraw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1 diff --git a/res/cardsfolder/t/tainted_well.txt b/res/cardsfolder/t/tainted_well.txt index 17bee2b2d8b..5c513499870 100644 --- a/res/cardsfolder/t/tainted_well.txt +++ b/res/cardsfolder/t/tainted_well.txt @@ -3,7 +3,7 @@ ManaCost:2 B Types:Enchantment Aura Text:no text K:Enchant land -A:SP$ Attach | Cost$ 2 B | ValidTgts$ Land | AILogic$ Curse +A:SP$ Attach | Cost$ 2 B | ValidTgts$ Land | AILogic$ ChangeType S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddType$ Swamp | RemoveSubTypes$ True | RemoveAllAbilities$ True | Description$ Enchanted land is a Swamp. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ When CARDNAME enters the battlefield, draw a card. SVar:TrigDraw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1 diff --git a/src/main/java/forge/card/abilityFactory/AbilityFactory_Attach.java b/src/main/java/forge/card/abilityFactory/AbilityFactory_Attach.java index 15bf4c575fc..9ee7b5e9c16 100644 --- a/src/main/java/forge/card/abilityFactory/AbilityFactory_Attach.java +++ b/src/main/java/forge/card/abilityFactory/AbilityFactory_Attach.java @@ -1,6 +1,7 @@ package forge.card.abilityFactory; import java.util.ArrayList; +import java.util.HashMap; import java.util.Map; import java.util.Iterator; import java.util.Random; @@ -466,15 +467,20 @@ public class AbilityFactory_Attach { public static Card attachAIChangeTypePreference(final SpellAbility sa, CardList list, boolean mandatory, Card attachSource){ // AI For Cards like Evil Presence or Spreading Seas + + String type = ""; + + for (StaticAbility stAb : attachSource.getStaticAbilities()) { + HashMap params = stAb.getMapParams(); + if (params.get("Mode").equals("Continuous") && params.containsKey("AddType")) + type = params.get("AddType"); + } - // A few of these cards are actually good, most of the Animate to Creature ones - // One or two of the give basic land types - // Maybe require Curse$ on the specific ones and filter the list that way + list.getNotType(type);// Filter out Basic Lands that have the same type as the changing type Card c = CardFactoryUtil.AI_getBest(list); // TODO: Port over some of the existing code, but rewrite most of it. - // Filter out Basic Lands that have the same type as the changing type // Ultimately, these spells need to be used to reduce mana base of a color. So it might be better to choose a Basic over a Nonbasic if (c == null) diff --git a/src/main/java/forge/card/cardFactory/CardFactory_Auras.java b/src/main/java/forge/card/cardFactory/CardFactory_Auras.java index 242767692da..a04f04ecd5b 100644 --- a/src/main/java/forge/card/cardFactory/CardFactory_Auras.java +++ b/src/main/java/forge/card/cardFactory/CardFactory_Auras.java @@ -116,19 +116,10 @@ class CardFactory_Auras { @Override public void resolve() { - if (card.getName().equals("Spreading Seas") - || card.getName().equals("Lingering Mirage") - || card.getName().equals("Sea's Claim")) - { - newType[0] = "Island"; - } else if (card.getName().equals("Convincing Mirage") - || card.getName().equals("Phantasmal Terrain")) - { - //Only query player, AI will have decided already. - if (card.getController().isHuman()) { - newType[0] = GuiUtils.getChoice("Select land type.", - "Plains", "Island", "Swamp", "Mountain", "Forest"); - } + //Only query player, AI will have decided already. + if (card.getController().isHuman()) { + newType[0] = GuiUtils.getChoice("Select land type.", + "Plains", "Island", "Swamp", "Mountain", "Forest"); } AllZone.getGameAction().moveToPlay(card);