From af3bca1138a593d976f5aa71338d45cf6e79d2a3 Mon Sep 17 00:00:00 2001 From: Agetian Date: Wed, 25 Jan 2017 08:33:05 +0000 Subject: [PATCH] - Added some AI sac preferences and logic specifications to cards. - TODO: couldn't figure out why Phyrexian Dreadnought stopped working for the AI, it correctly specifies cards to sac but Dreadnought still dies despite that. Marked RemAIDeck temporarily until this is figured out. --- forge-gui/res/cardsfolder/a/altar_of_bone.txt | 4 ++-- forge-gui/res/cardsfolder/a/apprentice_wizard.txt | 3 +-- forge-gui/res/cardsfolder/a/arensons_aura.txt | 2 +- forge-gui/res/cardsfolder/b/brine_shaman.txt | 1 + forge-gui/res/cardsfolder/c/circle_of_despair.txt | 1 + forge-gui/res/cardsfolder/g/goblin_chirurgeon.txt | 2 ++ forge-gui/res/cardsfolder/g/goblin_grenade.txt | 1 + forge-gui/res/cardsfolder/g/goblin_warrens.txt | 3 ++- forge-gui/res/cardsfolder/h/hells_caretaker.txt | 1 + forge-gui/res/cardsfolder/h/heroism.txt | 1 + forge-gui/res/cardsfolder/n/necrosavant.txt | 1 + forge-gui/res/cardsfolder/p/phyrexian_dreadnought.txt | 6 ++++++ forge-gui/res/cardsfolder/p/phyrexian_tribute.txt | 1 + forge-gui/res/cardsfolder/p/phyrexian_vault.txt | 1 + forge-gui/res/cardsfolder/s/skull_catapult.txt | 1 + forge-gui/res/cardsfolder/t/thelonite_druid.txt | 3 ++- forge-gui/res/cardsfolder/t/thelonite_monk.txt | 1 + forge-gui/res/cardsfolder/w/wicked_reward.txt | 1 + 18 files changed, 27 insertions(+), 7 deletions(-) diff --git a/forge-gui/res/cardsfolder/a/altar_of_bone.txt b/forge-gui/res/cardsfolder/a/altar_of_bone.txt index 9387b823148..7e5ccd910e7 100644 --- a/forge-gui/res/cardsfolder/a/altar_of_bone.txt +++ b/forge-gui/res/cardsfolder/a/altar_of_bone.txt @@ -1,7 +1,7 @@ Name:Altar of Bone ManaCost:G W Types:Sorcery -A:SP$ ChangeZone | Cost$ G W Sac<1/Creature> | Origin$ Library | Destination$ Hand | ChangeType$ Creature | ChangeNum$ 1 | SpellDescription$ Search your library for a creature card, reveal that card, and put it into your hand. Then shuffle your library. -SVar:RemAIDeck:True +A:SP$ ChangeZone | Cost$ G W Sac<1/Creature> | Origin$ Library | Destination$ Hand | ChangeType$ Creature | ChangeNum$ 1 | AILogic$ SacAndUpgrade+SacWorst | SpellDescription$ Search your library for a creature card, reveal that card, and put it into your hand. Then shuffle your library. +SVar:AIPreference:SacCost$Creature SVar:Picture:http://www.wizards.com/global/images/magic/general/altar_of_bone.jpg Oracle:As an additional cost to cast Altar of Bone, sacrifice a creature.\nSearch your library for a creature card, reveal that card, and put it into your hand. Then shuffle your library. diff --git a/forge-gui/res/cardsfolder/a/apprentice_wizard.txt b/forge-gui/res/cardsfolder/a/apprentice_wizard.txt index 0ee43c48f8c..cf1eec4ae0b 100644 --- a/forge-gui/res/cardsfolder/a/apprentice_wizard.txt +++ b/forge-gui/res/cardsfolder/a/apprentice_wizard.txt @@ -2,7 +2,6 @@ Name:Apprentice Wizard ManaCost:1 U U Types:Creature Human Wizard PT:0/1 -A:AB$ Mana | Cost$ U T | Produced$ C | Amount$ 3 | SpellDescription$ Add {C}{C}{C} to your mana pool. -SVar:RemAIDeck:True +A:AB$ Mana | Cost$ U T | Produced$ C | Amount$ 3 | AILogic$ ManaRitual | SpellDescription$ Add {C}{C}{C} to your mana pool. SVar:Picture:http://www.wizards.com/global/images/magic/general/apprentice_wizard.jpg Oracle:{U}, {T}: Add {C}{C}{C} to your mana pool. diff --git a/forge-gui/res/cardsfolder/a/arensons_aura.txt b/forge-gui/res/cardsfolder/a/arensons_aura.txt index 9e4bbfd2662..934db41c06a 100644 --- a/forge-gui/res/cardsfolder/a/arensons_aura.txt +++ b/forge-gui/res/cardsfolder/a/arensons_aura.txt @@ -4,6 +4,6 @@ Types:Enchantment A:AB$ Destroy | Cost$ W Sac<1/Enchantment> | ValidTgts$ Enchantment | TgtPrompt$ Select target enchantment | SpellDescription$ Destroy target enchantment. A:AB$ Counter | Cost$ 3 U U | TargetType$ Spell | TgtPrompt$ Select target Enchantment | ValidTgts$ Enchantment | SpellDescription$ Counter target enchantment spell. SVar:NonStackingEffect:True -SVar:RemAIDeck:True +SVar:AIPreference:SacCost$Card.Self SVar:Picture:http://www.wizards.com/global/images/magic/general/arensons_aura.jpg Oracle:{W}, Sacrifice an enchantment: Destroy target enchantment.\n{3}{U}{U}: Counter target enchantment spell. diff --git a/forge-gui/res/cardsfolder/b/brine_shaman.txt b/forge-gui/res/cardsfolder/b/brine_shaman.txt index 8e46ae0c203..bbb73d605e0 100644 --- a/forge-gui/res/cardsfolder/b/brine_shaman.txt +++ b/forge-gui/res/cardsfolder/b/brine_shaman.txt @@ -4,6 +4,7 @@ Types:Creature Human Cleric Shaman PT:1/1 A:AB$ Pump | Cost$ T Sac<1/Creature> | NumAtt$ +2 | NumDef$ +2 | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Target creature gets +2/+2 until end of turn. A:AB$ Counter | Cost$ 1 U U Sac<1/Creature> | TargetType$ Spell | ValidTgts$ Creature | TgtPrompt$ Select target Creature Spell | SpellDescription$ Counter target creature spell. +SVar:AIPreference:SacCost$Creature.token SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/brine_shaman.jpg Oracle:{T}, Sacrifice a creature: Target creature gets +2/+2 until end of turn.\n{1}{U}{U}, Sacrifice a creature: Counter target creature spell. diff --git a/forge-gui/res/cardsfolder/c/circle_of_despair.txt b/forge-gui/res/cardsfolder/c/circle_of_despair.txt index 714cd69edd6..6a578a3dd5f 100644 --- a/forge-gui/res/cardsfolder/c/circle_of_despair.txt +++ b/forge-gui/res/cardsfolder/c/circle_of_despair.txt @@ -8,6 +8,7 @@ SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.ChosenCard | V SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True SVar:NonStackingEffect:True +SVar:AIPreference:SacCost$Creature.namedBrood of Cockroaches,Creature.token SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/circle_of_despair.jpg Oracle:{1}, Sacrifice a creature: The next time a source of your choice would deal damage to target creature or player this turn, prevent that damage. diff --git a/forge-gui/res/cardsfolder/g/goblin_chirurgeon.txt b/forge-gui/res/cardsfolder/g/goblin_chirurgeon.txt index a0b5d1317c9..ac39bb62df6 100644 --- a/forge-gui/res/cardsfolder/g/goblin_chirurgeon.txt +++ b/forge-gui/res/cardsfolder/g/goblin_chirurgeon.txt @@ -3,5 +3,7 @@ ManaCost:R Types:Creature Goblin Shaman PT:0/2 A:AB$ Regenerate | Cost$ Sac<1/Goblin> | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Regenerate target creature. +SVar:AIPreference:SacCost$Creature.Goblin+cmcLE1 +DeckNeeds:Type$Goblin SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_chirurgeon.jpg Oracle:Sacrifice a Goblin: Regenerate target creature. diff --git a/forge-gui/res/cardsfolder/g/goblin_grenade.txt b/forge-gui/res/cardsfolder/g/goblin_grenade.txt index 3819b7fa2b8..6b349362446 100644 --- a/forge-gui/res/cardsfolder/g/goblin_grenade.txt +++ b/forge-gui/res/cardsfolder/g/goblin_grenade.txt @@ -2,6 +2,7 @@ Name:Goblin Grenade ManaCost:R Types:Sorcery A:SP$ DealDamage | Cost$ R Sac<1/Goblin> | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 5 | SpellDescription$ CARDNAME deals 5 damage to target creature or player. +SVar:AIPreference:SacCost$Creature.Goblin+cmcLE1 SVar:RemRandomDeck:True DeckNeeds:Type$Goblin SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_grenade.jpg diff --git a/forge-gui/res/cardsfolder/g/goblin_warrens.txt b/forge-gui/res/cardsfolder/g/goblin_warrens.txt index 25cfc550ebf..1e9926844c8 100644 --- a/forge-gui/res/cardsfolder/g/goblin_warrens.txt +++ b/forge-gui/res/cardsfolder/g/goblin_warrens.txt @@ -2,7 +2,8 @@ Name:Goblin Warrens ManaCost:2 R Types:Enchantment A:AB$ Token | Cost$ 2 R Sac<2/Goblin> | TokenAmount$ 3 | TokenName$ Goblin | TokenTypes$ Creature,Goblin | TokenOwner$ You | TokenColors$ Red | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put three 1/1 red Goblin Soldier creature tokens onto the battlefield. -SVar:RemAIDeck:True +SVar:AIPreference:SacCost$Creature.Goblin+cmcLE1 SVar:RemRandomDeck:True +DeckNeeds:Type$Goblin SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_warrens.jpg Oracle:{2}{R}, Sacrifice two Goblins: Put three 1/1 red Goblin creature tokens onto the battlefield. diff --git a/forge-gui/res/cardsfolder/h/hells_caretaker.txt b/forge-gui/res/cardsfolder/h/hells_caretaker.txt index 7630d7b933f..ae1847c5119 100644 --- a/forge-gui/res/cardsfolder/h/hells_caretaker.txt +++ b/forge-gui/res/cardsfolder/h/hells_caretaker.txt @@ -3,6 +3,7 @@ ManaCost:3 B Types:Creature Horror PT:1/1 A:AB$ ChangeZone | Cost$ T Sac<1/Creature> | TgtPrompt$ Choose target creature card in your graveyard | ValidTgts$ Creature.YouCtrl | Origin$ Graveyard | Destination$ Battlefield | PlayerTurn$ True | ActivationPhases$ Upkeep | SpellDescription$ Return target creature card from your graveyard to the battlefield. Activate this ability only during your upkeep. +SVar:AIPreference:SacCost$Creature.cmcLE3 SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/hells_caretaker.jpg Oracle:{T}, Sacrifice a creature: Return target creature card from your graveyard to the battlefield. Activate this ability only during your upkeep. diff --git a/forge-gui/res/cardsfolder/h/heroism.txt b/forge-gui/res/cardsfolder/h/heroism.txt index 86b1653db3c..2b1d3a39504 100644 --- a/forge-gui/res/cardsfolder/h/heroism.txt +++ b/forge-gui/res/cardsfolder/h/heroism.txt @@ -3,6 +3,7 @@ ManaCost:2 W Types:Enchantment A:AB$ RepeatEach | Cost$ Sac<1/Creature.White/White Creature> | RepeatCards$ Creature.attacking+Red | RepeatSubAbility$ DBPump | SpellDescription$ For each attacking red creature, prevent all combat damage that would be dealt by that creature this turn unless its controller pays {2}{R}. SVar:DBPump:DB$ Pump | Defined$ Remembered | KW$ HIDDEN Prevent all combat damage that would be dealt by CARDNAME. | UnlessCost$ 2 R | UnlessPayer$ RememberedController | ShowCurrentCard$ Remembered +SVar:AIPreference:SacCost$Creature.token SVar:RemRandomDeck:True SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/heroism.jpg diff --git a/forge-gui/res/cardsfolder/n/necrosavant.txt b/forge-gui/res/cardsfolder/n/necrosavant.txt index c5bfa3cf908..20f9f0dc92c 100644 --- a/forge-gui/res/cardsfolder/n/necrosavant.txt +++ b/forge-gui/res/cardsfolder/n/necrosavant.txt @@ -3,6 +3,7 @@ ManaCost:3 B B B Types:Creature Zombie Giant PT:5/5 A:AB$ ChangeZone | Cost$3 B B Sac<1/Creature> | Origin$ Graveyard | Destination$ Battlefield | ActivationZone$ Graveyard | PlayerTurn$ True | ActivationPhases$ Upkeep | SpellDescription$ Return CARDNAME from your graveyard to the battlefield. Activate this ability only during your upkeep. +SVar:AIPreference:SacCost$Creature.cmcLE4 SVar:DiscardMe:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/necrosavant.jpg Oracle:{3}{B}{B}, Sacrifice a creature: Return Necrosavant from your graveyard to the battlefield. Activate this ability only during your upkeep. diff --git a/forge-gui/res/cardsfolder/p/phyrexian_dreadnought.txt b/forge-gui/res/cardsfolder/p/phyrexian_dreadnought.txt index d66b15601de..ca533254337 100644 --- a/forge-gui/res/cardsfolder/p/phyrexian_dreadnought.txt +++ b/forge-gui/res/cardsfolder/p/phyrexian_dreadnought.txt @@ -10,6 +10,12 @@ SVar:SacrificeCreatures:DB$ SacrificeAll | Defined$ Remembered | ConditionCheckS SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:TotalPower:Remembered$CardPower SVar:X:Count$Valid Creature.YouCtrl +SVar:NeedsToPlayVar:Y GE12 +SVar:Y:Count$SumPower_Creature.YouCtrl SVar:RemRandomDeck:True + +# TODO: why does this card not work for the AI? It correctly specifies targets but Phyrexian Dreadnought is still sacrificed. +SVar:RemAIDeck:True + SVar:Picture:http://www.wizards.com/global/images/magic/general/phyrexian_dreadnought.jpg Oracle:Trample\nWhen Phyrexian Dreadnought enters the battlefield, sacrifice it unless you sacrifice any number of creatures with total power 12 or greater. diff --git a/forge-gui/res/cardsfolder/p/phyrexian_tribute.txt b/forge-gui/res/cardsfolder/p/phyrexian_tribute.txt index 45cbc465a11..7a1c1bb589a 100644 --- a/forge-gui/res/cardsfolder/p/phyrexian_tribute.txt +++ b/forge-gui/res/cardsfolder/p/phyrexian_tribute.txt @@ -2,6 +2,7 @@ Name:Phyrexian Tribute ManaCost:2 B Types:Sorcery A:SP$ Destroy | Cost$ 2 B Sac<2/Creature> | ValidTgts$ Artifact | TgtPrompt$ Select target artifact | SpellDescription$ Destroy target artifact. +SVar:AIPreference:SacCost$Creature.token,Creature.cmcLE1 SVar:RemRandomDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/phyrexian_tribute.jpg Oracle:As an additional cost to cast Phyrexian Tribute, sacrifice two creatures.\nDestroy target artifact. diff --git a/forge-gui/res/cardsfolder/p/phyrexian_vault.txt b/forge-gui/res/cardsfolder/p/phyrexian_vault.txt index 56e0230160b..3290b87092b 100644 --- a/forge-gui/res/cardsfolder/p/phyrexian_vault.txt +++ b/forge-gui/res/cardsfolder/p/phyrexian_vault.txt @@ -2,6 +2,7 @@ Name:Phyrexian Vault ManaCost:3 Types:Artifact A:AB$ Draw | Cost$ 2 T Sac<1/Creature> | NumCards$ 1 | SpellDescription$ Draw a card. +SVar:AIPreference:SacCost$Creature.cmcLE2 SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/phyrexian_vault.jpg Oracle:{2}, {T}, Sacrifice a creature: Draw a card. diff --git a/forge-gui/res/cardsfolder/s/skull_catapult.txt b/forge-gui/res/cardsfolder/s/skull_catapult.txt index 684323bdc9c..648c12af738 100644 --- a/forge-gui/res/cardsfolder/s/skull_catapult.txt +++ b/forge-gui/res/cardsfolder/s/skull_catapult.txt @@ -2,6 +2,7 @@ Name:Skull Catapult ManaCost:4 Types:Artifact A:AB$ DealDamage | Cost$ 1 T Sac<1/Creature> | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 2 | SpellDescription$ CARDNAME deals 2 damage to target creature or player. +SVar:AIPreference:SacCost$Creature.cmcLE2 SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/skull_catapult.jpg Oracle:{1}, {T}, Sacrifice a creature: Skull Catapult deals 2 damage to target creature or player. diff --git a/forge-gui/res/cardsfolder/t/thelonite_druid.txt b/forge-gui/res/cardsfolder/t/thelonite_druid.txt index b231d437462..6e0ced4578a 100644 --- a/forge-gui/res/cardsfolder/t/thelonite_druid.txt +++ b/forge-gui/res/cardsfolder/t/thelonite_druid.txt @@ -3,6 +3,7 @@ ManaCost:2 G Types:Creature Human Cleric Druid PT:1/1 A:AB$ AnimateAll | Cost$ 1 G T Sac<1/Creature> | ValidCards$ Forest.YouCtrl | Types$ Creature | Power$ 2 | Toughness$ 3 | SpellDescription$ Forests you control become 2/3 creatures until end of turn. They're still lands. -SVar:RemAIDeck:True +SVar:AIPreference:SacCost$Creature.token +SVar:RemRandomDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/thelonite_druid.jpg Oracle:{1}{G}, {T}, Sacrifice a creature: Forests you control become 2/3 creatures until end of turn. They're still lands. diff --git a/forge-gui/res/cardsfolder/t/thelonite_monk.txt b/forge-gui/res/cardsfolder/t/thelonite_monk.txt index 3a28a357e06..c17d9afed8c 100644 --- a/forge-gui/res/cardsfolder/t/thelonite_monk.txt +++ b/forge-gui/res/cardsfolder/t/thelonite_monk.txt @@ -3,6 +3,7 @@ ManaCost:2 G G Types:Creature Insect Monk Cleric PT:1/2 A:AB$ Animate | Cost$ T Sac<1/Creature.Green/green creature> | ValidTgts$ Land | TgtPrompt$ Select target land | Types$ Forest | OverwriteTypes$ True | KeepSupertypes$ True | KeepCardTypes$ True | RemoveAllAbilities$ True | Permanent$ True | SpellDescription$ Target land becomes a Forest. (This effect lasts indefinitely.) +SVar:AIPreference:SacCost$Creature.Green+token SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/thelonite_monk.jpg Oracle:{T}, Sacrifice a green creature: Target land becomes a Forest. (This effect lasts indefinitely.) diff --git a/forge-gui/res/cardsfolder/w/wicked_reward.txt b/forge-gui/res/cardsfolder/w/wicked_reward.txt index 77174bece80..43ee87d8476 100644 --- a/forge-gui/res/cardsfolder/w/wicked_reward.txt +++ b/forge-gui/res/cardsfolder/w/wicked_reward.txt @@ -2,6 +2,7 @@ Name:Wicked Reward ManaCost:1 B Types:Instant A:SP$ Pump | Cost$ 1 B Sac<1/Creature> | ValidTgts$ Creature | TgtPrompt$ Select target creature. | NumAtt$ +4 | NumDef$ +2 | SpellDescription$ Target creature gets +4/+2 until end of turn. +SVar:AIPreference:SacCost$Creature.namedBrood of Cockroaches,Creature.token SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/wicked_reward.jpg Oracle:As an additional cost to cast Wicked Reward, sacrifice a creature.\nTarget creature gets +4/+2 until end of turn.