mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Improved the AI of the type changing auras.
This commit is contained in:
@@ -3,7 +3,7 @@ ManaCost:1 B
|
|||||||
Types:Enchantment Aura
|
Types:Enchantment Aura
|
||||||
Text:no text
|
Text:no text
|
||||||
K:Enchant land
|
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.
|
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.
|
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
|
SVar:TrigLose:AB$LoseLife | Cost$ 0 | Defined$ TriggeredCardController | LifeAmount$ 2
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:B
|
|||||||
Types:Enchantment Aura
|
Types:Enchantment Aura
|
||||||
Text:no text
|
Text:no text
|
||||||
K:Enchant land
|
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.
|
S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddType$ Swamp | RemoveSubTypes$ True | RemoveAllAbilities$ True | Description$ Enchanted land is a Swamp.
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/evil_presence.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/evil_presence.jpg
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:1 U
|
|||||||
Types:Enchantment Aura
|
Types:Enchantment Aura
|
||||||
Text:no text
|
Text:no text
|
||||||
K:Enchant land
|
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.
|
S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddType$ Island | RemoveSubTypes$ True | RemoveAllAbilities$ True | Description$ Enchanted land is an Island.
|
||||||
K:Cycling:2
|
K:Cycling:2
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:U
|
|||||||
Types:Enchantment Aura
|
Types:Enchantment Aura
|
||||||
Text:no text
|
Text:no text
|
||||||
K:Enchant land
|
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.
|
S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddType$ Island | RemoveSubTypes$ True | RemoveAllAbilities$ True | Description$ Enchanted land is an Island.
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/seas_claim.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/seas_claim.jpg
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:1 U
|
|||||||
Types:Enchantment Aura
|
Types:Enchantment Aura
|
||||||
Text:no text
|
Text:no text
|
||||||
K:Enchant land
|
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.
|
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.
|
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
|
SVar:TrigDraw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:2 B
|
|||||||
Types:Enchantment Aura
|
Types:Enchantment Aura
|
||||||
Text:no text
|
Text:no text
|
||||||
K:Enchant land
|
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.
|
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.
|
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
|
SVar:TrigDraw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package forge.card.abilityFactory;
|
package forge.card.abilityFactory;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
@@ -467,14 +468,19 @@ public class AbilityFactory_Attach {
|
|||||||
public static Card attachAIChangeTypePreference(final SpellAbility sa, CardList list, boolean mandatory, Card attachSource){
|
public static Card attachAIChangeTypePreference(final SpellAbility sa, CardList list, boolean mandatory, Card attachSource){
|
||||||
// AI For Cards like Evil Presence or Spreading Seas
|
// AI For Cards like Evil Presence or Spreading Seas
|
||||||
|
|
||||||
// A few of these cards are actually good, most of the Animate to Creature ones
|
String type = "";
|
||||||
// One or two of the give basic land types
|
|
||||||
// Maybe require Curse$ on the specific ones and filter the list that way
|
for (StaticAbility stAb : attachSource.getStaticAbilities()) {
|
||||||
|
HashMap<String, String> params = stAb.getMapParams();
|
||||||
|
if (params.get("Mode").equals("Continuous") && params.containsKey("AddType"))
|
||||||
|
type = params.get("AddType");
|
||||||
|
}
|
||||||
|
|
||||||
|
list.getNotType(type);// Filter out Basic Lands that have the same type as the changing type
|
||||||
|
|
||||||
Card c = CardFactoryUtil.AI_getBest(list);
|
Card c = CardFactoryUtil.AI_getBest(list);
|
||||||
|
|
||||||
// TODO: Port over some of the existing code, but rewrite most of it.
|
// 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
|
// 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)
|
if (c == null)
|
||||||
|
|||||||
@@ -116,20 +116,11 @@ class CardFactory_Auras {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
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.
|
//Only query player, AI will have decided already.
|
||||||
if (card.getController().isHuman()) {
|
if (card.getController().isHuman()) {
|
||||||
newType[0] = GuiUtils.getChoice("Select land type.",
|
newType[0] = GuiUtils.getChoice("Select land type.",
|
||||||
"Plains", "Island", "Swamp", "Mountain", "Forest");
|
"Plains", "Island", "Swamp", "Mountain", "Forest");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
AllZone.getGameAction().moveToPlay(card);
|
AllZone.getGameAction().moveToPlay(card);
|
||||||
|
|
||||||
Card c = getTargetCard();
|
Card c = getTargetCard();
|
||||||
|
|||||||
Reference in New Issue
Block a user