From 3662bb8e8427fc96d80507d89999eb687bf02485 Mon Sep 17 00:00:00 2001 From: Seravy Date: Sun, 11 Feb 2018 17:31:20 +0100 Subject: [PATCH 1/8] Implements Feature --- .../java/forge/ai/AiAttackController.java | 27 ++++++++++++++++++- .../res/cardsfolder/e/ertai_wizard_adept.txt | 1 + 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/forge-ai/src/main/java/forge/ai/AiAttackController.java b/forge-ai/src/main/java/forge/ai/AiAttackController.java index 8d9c231e8d7..ab13ace79a2 100644 --- a/forge-ai/src/main/java/forge/ai/AiAttackController.java +++ b/forge-ai/src/main/java/forge/ai/AiAttackController.java @@ -1082,7 +1082,32 @@ public class AiAttackController { boolean isWorthLessThanAllKillers = true; boolean canBeBlocked = false; int numberOfPossibleBlockers = 0; - + + // Is it a creature that has a more valuable ability with a tap cost than what it can do by attacking? + if (attacker.hasSVar("NonCombatPriority")) { + // For each level of priority, enemy has to have life as much as the creature's power + // so a priority of 4 means the creature will not attack unless it can defeat that player in 4 successful attacks. + // the lower the priroity, the less willing the AI is to use the creature for attacking. + if (attacker.getCurrentPower() < ai.getOpponentsSmallestLifeTotal() / Integer.parseInt(attacker.getSVar("NonCombatPriority"))) { + // Check if the card actually has an ability the AI can and wants to play, if not, attacking is fine! + boolean wantability = false; + for (SpellAbility sa : attacker.getSpellAbilities()) { + if (sa.isAbility()) { + if (ai.getController().isAI()) { + AiPlayDecision canplay = ((PlayerControllerAi) ai.getController()).getAi().canPlaySa(sa); + switch (canplay) { + case WillPlay: + case WaitForMain2: + case AnotherTime: + // Might be an ability that requires a target not present right now, like Ertai, Wizard Adept + case TargetingFailed: + return false; + } + } + } + } + } + } if (!this.isEffectiveAttacker(ai, attacker, combat)) { return false; diff --git a/forge-gui/res/cardsfolder/e/ertai_wizard_adept.txt b/forge-gui/res/cardsfolder/e/ertai_wizard_adept.txt index e660ee12a09..832c1168974 100644 --- a/forge-gui/res/cardsfolder/e/ertai_wizard_adept.txt +++ b/forge-gui/res/cardsfolder/e/ertai_wizard_adept.txt @@ -4,4 +4,5 @@ Types:Legendary Creature Human Wizard PT:1/1 A:AB$ Counter | Cost$ 2 U U T | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | SpellDescription$ Counter target spell. SVar:Picture:http://www.wizards.com/global/images/magic/general/ertai_wizard_adept.jpg +SVar:NonCombatPriority:1 Oracle:{2}{U}{U}, {T}: Counter target spell. From 15715cec1019de066f735fa372ae3dabe65bd563 Mon Sep 17 00:00:00 2001 From: Seravy Date: Sun, 11 Feb 2018 18:34:33 +0100 Subject: [PATCH 2/8] Tested and now it works, unfortunately it's not as smart as I originally wanted, but it'll do. --- .../src/main/java/forge/ai/AiAttackController.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/AiAttackController.java b/forge-ai/src/main/java/forge/ai/AiAttackController.java index ab13ace79a2..51fc355cac3 100644 --- a/forge-ai/src/main/java/forge/ai/AiAttackController.java +++ b/forge-ai/src/main/java/forge/ai/AiAttackController.java @@ -1092,18 +1092,12 @@ public class AiAttackController { // Check if the card actually has an ability the AI can and wants to play, if not, attacking is fine! boolean wantability = false; for (SpellAbility sa : attacker.getSpellAbilities()) { + // Do not attack if we can afford using the ability. if (sa.isAbility()) { - if (ai.getController().isAI()) { - AiPlayDecision canplay = ((PlayerControllerAi) ai.getController()).getAi().canPlaySa(sa); - switch (canplay) { - case WillPlay: - case WaitForMain2: - case AnotherTime: - // Might be an ability that requires a target not present right now, like Ertai, Wizard Adept - case TargetingFailed: - return false; - } + if (ComputerUtilCost.canPayCost(sa, ai)) { + return false; } + // TODO Eventually The Ai will need to learn to predict if they have any use for the ability before next untap or not. } } } From 94eda92d21d4d172b5fc9c17ba84ece0bb1ec53d Mon Sep 17 00:00:00 2001 From: Seravy Date: Sun, 11 Feb 2018 20:15:51 +0100 Subject: [PATCH 3/8] Adding to cards A-C --- forge-gui/res/cardsfolder/a/abuna_acolyte.txt | 1 + forge-gui/res/cardsfolder/a/abyssal_hunter.txt | 1 + forge-gui/res/cardsfolder/a/adun_oakenshield.txt | 1 + forge-gui/res/cardsfolder/a/akroan_jailer.txt | 1 + forge-gui/res/cardsfolder/a/akroan_mastiff.txt | 1 + forge-gui/res/cardsfolder/a/angus_mackenzie.txt | 1 + forge-gui/res/cardsfolder/a/archivist.txt | 1 + forge-gui/res/cardsfolder/a/avacynian_priest.txt | 1 + forge-gui/res/cardsfolder/b/ballista_squad.txt | 1 + forge-gui/res/cardsfolder/b/ben_ben_akki_hermit.txt | 1 + forge-gui/res/cardsfolder/b/benalish_trapper.txt | 1 + forge-gui/res/cardsfolder/b/blinding_drone.txt | 1 + forge-gui/res/cardsfolder/b/blinding_mage.txt | 1 + forge-gui/res/cardsfolder/b/blinding_souleater.txt | 1 + forge-gui/res/cardsfolder/b/bomb_squad.txt | 1 + forge-gui/res/cardsfolder/b/bounty_hunter.txt | 1 + forge-gui/res/cardsfolder/c/captain_of_the_mists.txt | 1 + forge-gui/res/cardsfolder/c/captain_sisay.txt | 1 + forge-gui/res/cardsfolder/c/clergy_en_vec.txt | 1 + forge-gui/res/cardsfolder/d/daring_apprentice.txt | 1 + 20 files changed, 20 insertions(+) diff --git a/forge-gui/res/cardsfolder/a/abuna_acolyte.txt b/forge-gui/res/cardsfolder/a/abuna_acolyte.txt index 85a9e93ac2d..b90aaf536f7 100644 --- a/forge-gui/res/cardsfolder/a/abuna_acolyte.txt +++ b/forge-gui/res/cardsfolder/a/abuna_acolyte.txt @@ -4,5 +4,6 @@ Types:Creature Cat Cleric PT:1/1 A:AB$ PreventDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | Amount$ 1 | SpellDescription$ Prevent the next 1 damage that would be dealt to target creature or player this turn. A:AB$ PreventDamage | Cost$ T | ValidTgts$ Creature.Artifact | Amount$ 2 | TgtPrompt$ Select target artifact creature | SpellDescription$ Prevent the next 2 damage that would be dealt to target artifact creature this turn. +SVar:NonCombatPriority:10 SVar:Picture:http://www.wizards.com/global/images/magic/general/abuna_acolyte.jpg Oracle:{T}: Prevent the next 1 damage that would be dealt to target creature or player this turn.\n{T}: Prevent the next 2 damage that would be dealt to target artifact creature this turn. diff --git a/forge-gui/res/cardsfolder/a/abyssal_hunter.txt b/forge-gui/res/cardsfolder/a/abyssal_hunter.txt index 0477aa78f79..ebe92dab0ae 100644 --- a/forge-gui/res/cardsfolder/a/abyssal_hunter.txt +++ b/forge-gui/res/cardsfolder/a/abyssal_hunter.txt @@ -5,5 +5,6 @@ PT:1/1 A:AB$ DealDamage | Cost$ B T | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ X | SubAbility$ DBTap | References$ X | SpellDescription$ Tap target creature. CARDNAME deals damage equal to CARDNAME's power to that creature. SVar:DBTap:DB$ Tap | Defined$ Targeted SVar:X:Count$CardPower +SVar:NonCombatPriority:4 SVar:Picture:http://www.wizards.com/global/images/magic/general/abyssal_hunter.jpg Oracle:{B}, {T}: Tap target creature. Abyssal Hunter deals damage equal to Abyssal Hunter's power to that creature. diff --git a/forge-gui/res/cardsfolder/a/adun_oakenshield.txt b/forge-gui/res/cardsfolder/a/adun_oakenshield.txt index 3ac8f2de0a5..716a2c5927b 100644 --- a/forge-gui/res/cardsfolder/a/adun_oakenshield.txt +++ b/forge-gui/res/cardsfolder/a/adun_oakenshield.txt @@ -3,5 +3,6 @@ ManaCost:B R G Types:Legendary Creature Human Knight PT:1/2 A:AB$ ChangeZone | Cost$ B R G T | Origin$ Graveyard | Destination$ Hand | TgtPrompt$ Select target creature card in your graveyard | ValidTgts$ Creature.YouCtrl | SpellDescription$ Return target creature card from your graveyard to your hand. +SVar:NonCombatPriority:3 SVar:Picture:http://www.wizards.com/global/images/magic/general/adun_oakenshield.jpg Oracle:{B}{R}{G}, {T}: Return target creature card from your graveyard to your hand. diff --git a/forge-gui/res/cardsfolder/a/akroan_jailer.txt b/forge-gui/res/cardsfolder/a/akroan_jailer.txt index 0faa1e575fe..02c4dd6de94 100644 --- a/forge-gui/res/cardsfolder/a/akroan_jailer.txt +++ b/forge-gui/res/cardsfolder/a/akroan_jailer.txt @@ -3,5 +3,6 @@ ManaCost:W Types:Creature Human Soldier PT:1/1 A:AB$ Tap | Cost$ 2 W T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature. +SVar:NonCombatPriority:5 SVar:Picture:http://www.wizards.com/global/images/magic/general/akroan_jailer.jpg Oracle:{2}{W}, {T}: Tap target creature. \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/a/akroan_mastiff.txt b/forge-gui/res/cardsfolder/a/akroan_mastiff.txt index 1b01c43c27b..1e047f29d77 100644 --- a/forge-gui/res/cardsfolder/a/akroan_mastiff.txt +++ b/forge-gui/res/cardsfolder/a/akroan_mastiff.txt @@ -4,4 +4,5 @@ Types:Creature Hound PT:2/2 A:AB$ Tap | Cost$ W T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature. SVar:Picture:http://www.wizards.com/global/images/magic/general/akroan_mastiff.jpg +SVar:NonCombatPriority:10 Oracle:{W}, {T}: Tap target creature. diff --git a/forge-gui/res/cardsfolder/a/angus_mackenzie.txt b/forge-gui/res/cardsfolder/a/angus_mackenzie.txt index ac087fb9eb8..32330360b24 100644 --- a/forge-gui/res/cardsfolder/a/angus_mackenzie.txt +++ b/forge-gui/res/cardsfolder/a/angus_mackenzie.txt @@ -3,5 +3,6 @@ ManaCost:G W U Types:Legendary Creature Human Cleric PT:2/2 A:AB$ Fog | Cost$ G W U T | ActivationPhases$ Upkeep->Declare Blockers | SpellDescription$ Prevent all combat damage that would be dealt this turn. Activate this ability only before the combat damage step. +SVar:NonCombatPriority:2 SVar:Picture:http://www.wizards.com/global/images/magic/general/angus_mackenzie.jpg Oracle:{G}{W}{U}, {T}: Prevent all combat damage that would be dealt this turn. Activate this ability only before the combat damage step. diff --git a/forge-gui/res/cardsfolder/a/archivist.txt b/forge-gui/res/cardsfolder/a/archivist.txt index b283f01db5a..783a53ced5b 100644 --- a/forge-gui/res/cardsfolder/a/archivist.txt +++ b/forge-gui/res/cardsfolder/a/archivist.txt @@ -3,5 +3,6 @@ ManaCost:2 U U Types:Creature Human Wizard PT:1/1 A:AB$ Draw | Cost$ T | NumCards$ 1 | SpellDescription$ Draw a card. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/archivist.jpg Oracle:{T}: Draw a card. diff --git a/forge-gui/res/cardsfolder/a/avacynian_priest.txt b/forge-gui/res/cardsfolder/a/avacynian_priest.txt index 22bee2df4bf..5660ff0798d 100644 --- a/forge-gui/res/cardsfolder/a/avacynian_priest.txt +++ b/forge-gui/res/cardsfolder/a/avacynian_priest.txt @@ -3,5 +3,6 @@ ManaCost:1 W Types:Creature Human Cleric PT:1/2 A:AB$ Tap | Cost$ 1 T | ValidTgts$ Creature.nonHuman | TgtPrompt$ Select target non-Human creature | SpellDescription$ Tap target non-Human creature. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/avacynian_priest.jpg Oracle:{1}, {T}: Tap target non-Human creature. diff --git a/forge-gui/res/cardsfolder/b/ballista_squad.txt b/forge-gui/res/cardsfolder/b/ballista_squad.txt index c93c129935f..06b85dd29a7 100644 --- a/forge-gui/res/cardsfolder/b/ballista_squad.txt +++ b/forge-gui/res/cardsfolder/b/ballista_squad.txt @@ -4,5 +4,6 @@ Types:Creature Human Rebel PT:2/2 A:AB$ DealDamage | Cost$ X W T | ValidTgts$ Creature.attacking,Creature.blocking | TgtPrompt$ Select target attacking or blocking creature | NumDmg$ X | References$ X | SpellDescription$ CARDNAME deals X damage to target attacking or blocking creature. SVar:X:Count$xPaid +SVar:NonCombatPriority:4 SVar:Picture:http://www.wizards.com/global/images/magic/general/ballista_squad.jpg Oracle:{X}{W}, {T}: Ballista Squad deals X damage to target attacking or blocking creature. diff --git a/forge-gui/res/cardsfolder/b/ben_ben_akki_hermit.txt b/forge-gui/res/cardsfolder/b/ben_ben_akki_hermit.txt index 4cd329643df..10deb3feeaa 100644 --- a/forge-gui/res/cardsfolder/b/ben_ben_akki_hermit.txt +++ b/forge-gui/res/cardsfolder/b/ben_ben_akki_hermit.txt @@ -4,5 +4,6 @@ Types:Legendary Creature Goblin Shaman PT:1/1 A:AB$ DealDamage | Cost$ T | ValidTgts$ Creature.attacking | TgtPrompt$ Select target attacking Creature | NumDmg$ X | References$ X | SpellDescription$ Ben-Ben, Akki Hermit deals damage to target attacking creature equal to the number of untapped Mountains you control. SVar:X:Count$Valid Mountain.untapped+YouCtrl +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/ben_ben_akki_hermit.jpg Oracle:{T}: Ben-Ben, Akki Hermit deals damage to target attacking creature equal to the number of untapped Mountains you control. diff --git a/forge-gui/res/cardsfolder/b/benalish_trapper.txt b/forge-gui/res/cardsfolder/b/benalish_trapper.txt index f3bc2226fab..94e9b9b3203 100644 --- a/forge-gui/res/cardsfolder/b/benalish_trapper.txt +++ b/forge-gui/res/cardsfolder/b/benalish_trapper.txt @@ -3,5 +3,6 @@ ManaCost:1 W Types:Creature Human Soldier PT:1/2 A:AB$ Tap | Cost$ W T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/benalish_trapper.jpg Oracle:{W}, {T}: Tap target creature. diff --git a/forge-gui/res/cardsfolder/b/blinding_drone.txt b/forge-gui/res/cardsfolder/b/blinding_drone.txt index 929bbd771f0..c91404b2b17 100644 --- a/forge-gui/res/cardsfolder/b/blinding_drone.txt +++ b/forge-gui/res/cardsfolder/b/blinding_drone.txt @@ -5,5 +5,6 @@ PT:1/3 K:Devoid A:AB$ Tap | Cost$ C T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature. DeckHints:Ability$Mana.Colorless +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/blinding_drone.jpg Oracle:Devoid (This card has no color.)\n{C}, {T}: Tap target creature. ({C} represents colorless mana.) diff --git a/forge-gui/res/cardsfolder/b/blinding_mage.txt b/forge-gui/res/cardsfolder/b/blinding_mage.txt index 84cc21b98f6..743ec5b251b 100644 --- a/forge-gui/res/cardsfolder/b/blinding_mage.txt +++ b/forge-gui/res/cardsfolder/b/blinding_mage.txt @@ -3,5 +3,6 @@ ManaCost:1 W Types:Creature Human Wizard PT:1/2 A:AB$ Tap | Cost$ W T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/blinding_mage.jpg Oracle:{W}, {T}: Tap target creature. diff --git a/forge-gui/res/cardsfolder/b/blinding_souleater.txt b/forge-gui/res/cardsfolder/b/blinding_souleater.txt index cd7f6050615..9970a00a3a7 100644 --- a/forge-gui/res/cardsfolder/b/blinding_souleater.txt +++ b/forge-gui/res/cardsfolder/b/blinding_souleater.txt @@ -5,5 +5,6 @@ PT:1/3 A:AB$ Tap | Cost$ PW T | ValidTgts$ Creature | TgtPrompt$ Select target creature | AIPhyrexianPayment$ Never | SpellDescription$ Tap target creature. SVar:RemRandomDeck:True DeckNeeds:Color$white +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/blinding_souleater.jpg Oracle:{P/W}, {T}: Tap target creature. ({P/W} can be paid with either {W} or 2 life.) diff --git a/forge-gui/res/cardsfolder/b/bomb_squad.txt b/forge-gui/res/cardsfolder/b/bomb_squad.txt index c828af9ecc4..cfdbcdd6fe7 100644 --- a/forge-gui/res/cardsfolder/b/bomb_squad.txt +++ b/forge-gui/res/cardsfolder/b/bomb_squad.txt @@ -11,4 +11,5 @@ SVar:DBRemove:DB$ RemoveCounter | Defined$ Remembered | CounterType$ FUSE | Coun SVar:DBDestroy:DB$ Destroy | Defined$ Remembered | SubAbility$ DBDmg SVar:DBDmg:DB$ DealDamage | Defined$ RememberedController | NumDmg$ 4 | DamageSource$ Remembered SVar:Picture:http://www.wizards.com/global/images/magic/general/bomb_squad.jpg +SVar:NonCombatPriority:4 Oracle:{T}: Put a fuse counter on target creature.\nAt the beginning of your upkeep, put a fuse counter on each creature with a fuse counter on it.\nWhenever a creature has four or more fuse counters on it, remove all fuse counters from it and destroy it. That creature deals 4 damage to its controller. diff --git a/forge-gui/res/cardsfolder/b/bounty_hunter.txt b/forge-gui/res/cardsfolder/b/bounty_hunter.txt index 7859251d1f0..dfeb353bd9e 100644 --- a/forge-gui/res/cardsfolder/b/bounty_hunter.txt +++ b/forge-gui/res/cardsfolder/b/bounty_hunter.txt @@ -4,5 +4,6 @@ Types:Creature Human Archer Minion PT:2/2 A:AB$ PutCounter | Cost$ T | ValidTgts$ Creature.nonBlack | TgtPrompt$ Select target nonblack creature | CounterType$ BOUNTY | CounterNum$ 1 | IsCurse$ True | SpellDescription$ Put a bounty counter on target nonblack creature. A:AB$ Destroy | Cost$ T | ValidTgts$ Creature.counters_GE1_BOUNTY | TgtPrompt$ Select target creature with a bounty counter on it | SpellDescription$ Destroy target creature with a bounty counter on it. +SVar:NonCombatPriority:5 SVar:Picture:http://www.wizards.com/global/images/magic/general/bounty_hunter.jpg Oracle:{T}: Put a bounty counter on target nonblack creature.\n{T}: Destroy target creature with a bounty counter on it. diff --git a/forge-gui/res/cardsfolder/c/captain_of_the_mists.txt b/forge-gui/res/cardsfolder/c/captain_of_the_mists.txt index a0f6bd62613..4e4abba2d67 100644 --- a/forge-gui/res/cardsfolder/c/captain_of_the_mists.txt +++ b/forge-gui/res/cardsfolder/c/captain_of_the_mists.txt @@ -6,5 +6,6 @@ T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creatu SVar:TrigUntap:DB$ Untap | Defined$ Self A:AB$ TapOrUntap | Cost$ 1 U T | ValidTgts$ Permanent | TgtPrompt$ Select target permanent | SpellDescription$ You may tap or untap target permanent. SVar:RemAIDeck:True +SVar:NonCombatPriority:7 SVar:Picture:http://www.wizards.com/global/images/magic/general/captain_of_the_mists.jpg Oracle:Whenever another Human enters the battlefield under your control, untap Captain of the Mists.\n{1}{U}, {T}: You may tap or untap target permanent. diff --git a/forge-gui/res/cardsfolder/c/captain_sisay.txt b/forge-gui/res/cardsfolder/c/captain_sisay.txt index 67a44c87bb7..c4a5e42ca42 100644 --- a/forge-gui/res/cardsfolder/c/captain_sisay.txt +++ b/forge-gui/res/cardsfolder/c/captain_sisay.txt @@ -3,5 +3,6 @@ ManaCost:2 G W Types:Legendary Creature Human Soldier PT:2/2 A:AB$ ChangeZone | Cost$ T | Origin$ Library | Destination$ Hand | ChangeType$ Legendary | ChangeNum$ 1 | SpellDescription$ Search your library for a legendary card, reveal that card, and put it into your hand. Then shuffle your library. +SVar:NonCombatPriority:3 SVar:Picture:http://resources.wizards.com/magic/cards/in/en-us/card25976.jpg Oracle:{T}: Search your library for a legendary card, reveal that card, and put it into your hand. Then shuffle your library. diff --git a/forge-gui/res/cardsfolder/c/clergy_en_vec.txt b/forge-gui/res/cardsfolder/c/clergy_en_vec.txt index d21d29ebd56..c6582cfb29e 100644 --- a/forge-gui/res/cardsfolder/c/clergy_en_vec.txt +++ b/forge-gui/res/cardsfolder/c/clergy_en_vec.txt @@ -4,4 +4,5 @@ Types:Creature Human Cleric PT:1/1 A:AB$ PreventDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | Amount$ 1 | SpellDescription$ Prevent the next 1 damage that would be dealt to target creature or player this turn. SVar:Picture:http://www.wizards.com/global/images/magic/general/clergy_en_vec.jpg +SVar:NonCombatPriority:10 Oracle:{T}: Prevent the next 1 damage that would be dealt to target creature or player this turn. diff --git a/forge-gui/res/cardsfolder/d/daring_apprentice.txt b/forge-gui/res/cardsfolder/d/daring_apprentice.txt index 655ac200ad5..df3e7af3496 100644 --- a/forge-gui/res/cardsfolder/d/daring_apprentice.txt +++ b/forge-gui/res/cardsfolder/d/daring_apprentice.txt @@ -3,5 +3,6 @@ ManaCost:1 U U Types:Creature Human Wizard PT:1/1 A:AB$ Counter | Cost$ T Sac<1/CARDNAME> | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | Destination$ Graveyard | SpellDescription$ Counter target spell. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/daring_apprentice.jpg Oracle:{T}, Sacrifice Daring Apprentice: Counter target spell. From 07439cfeeb385dd833705864eaa1d8a706ed9a48 Mon Sep 17 00:00:00 2001 From: Seravy Date: Sun, 11 Feb 2018 20:27:03 +0100 Subject: [PATCH 4/8] Exclude creatures with vigilance - attacking does not prevent using the ability --- forge-ai/src/main/java/forge/ai/AiAttackController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/forge-ai/src/main/java/forge/ai/AiAttackController.java b/forge-ai/src/main/java/forge/ai/AiAttackController.java index 51fc355cac3..f2ca3076b83 100644 --- a/forge-ai/src/main/java/forge/ai/AiAttackController.java +++ b/forge-ai/src/main/java/forge/ai/AiAttackController.java @@ -1084,7 +1084,8 @@ public class AiAttackController { int numberOfPossibleBlockers = 0; // Is it a creature that has a more valuable ability with a tap cost than what it can do by attacking? - if (attacker.hasSVar("NonCombatPriority")) { + if ((attacker.hasSVar("NonCombatPriority")) + && (attacker.hasKeyword("Vigilance"))) { // For each level of priority, enemy has to have life as much as the creature's power // so a priority of 4 means the creature will not attack unless it can defeat that player in 4 successful attacks. // the lower the priroity, the less willing the AI is to use the creature for attacking. From 1f364168e8a82df8f6eb21e5054daa366671b46a Mon Sep 17 00:00:00 2001 From: Seravy Date: Sun, 11 Feb 2018 20:55:44 +0100 Subject: [PATCH 5/8] adding to cards D-K --- forge-gui/res/cardsfolder/d/dawnstrider.txt | 1 + forge-gui/res/cardsfolder/d/devoted_caretaker.txt | 1 + forge-gui/res/cardsfolder/d/disruptive_pitmage.txt | 1 + forge-gui/res/cardsfolder/d/disruptive_student.txt | 1 + forge-gui/res/cardsfolder/f/femeref_healer.txt | 1 + forge-gui/res/cardsfolder/f/frostwielder.txt | 1 + forge-gui/res/cardsfolder/g/gelectrode.txt | 1 + forge-gui/res/cardsfolder/g/gideons_lawkeeper.txt | 1 + forge-gui/res/cardsfolder/g/goblin_fireslinger.txt | 1 + forge-gui/res/cardsfolder/g/goblin_sharpshooter.txt | 1 + forge-gui/res/cardsfolder/g/goldmeadow_harrier.txt | 1 + forge-gui/res/cardsfolder/g/grim_lavamancer.txt | 1 + forge-gui/res/cardsfolder/h/hallowed_healer.txt | 1 + forge-gui/res/cardsfolder/h/hanna_ships_navigator.txt | 1 + forge-gui/res/cardsfolder/h/hermit_druid.txt | 1 + 15 files changed, 15 insertions(+) diff --git a/forge-gui/res/cardsfolder/d/dawnstrider.txt b/forge-gui/res/cardsfolder/d/dawnstrider.txt index e6d614fdf90..307a8bc7a44 100644 --- a/forge-gui/res/cardsfolder/d/dawnstrider.txt +++ b/forge-gui/res/cardsfolder/d/dawnstrider.txt @@ -3,5 +3,6 @@ ManaCost:1 G Types:Creature Dryad Spellshaper PT:1/1 A:AB$ Fog | Cost$ G T Discard<1/Card> | SpellDescription$ Prevent all combat damage that would be dealt this turn. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/dawnstrider.jpg Oracle:{G}, {T}, Discard a card: Prevent all combat damage that would be dealt this turn. diff --git a/forge-gui/res/cardsfolder/d/devoted_caretaker.txt b/forge-gui/res/cardsfolder/d/devoted_caretaker.txt index 643be63045a..67e72561f1d 100644 --- a/forge-gui/res/cardsfolder/d/devoted_caretaker.txt +++ b/forge-gui/res/cardsfolder/d/devoted_caretaker.txt @@ -4,5 +4,6 @@ Types:Creature Human Cleric PT:1/2 A:AB$ Pump | Cost$ W T | KW$ Protection:Spell.Instant,Spell.Sorcery:Protection from instant spells and from sorcery spells | ValidTgts$ Permanent.YouCtrl | TgtPrompt$ Select target permanent you control | SpellDescription$ Target permanent you control gains protection from instant spells and from sorcery spells until end of turn. SVar:RemAIDeck:True +SVar:NonCombatPriority:3 SVar:Picture:http://www.wizards.com/global/images/magic/general/devoted_caretaker.jpg Oracle:{W}, {T}: Target permanent you control gains protection from instant spells and from sorcery spells until end of turn. diff --git a/forge-gui/res/cardsfolder/d/disruptive_pitmage.txt b/forge-gui/res/cardsfolder/d/disruptive_pitmage.txt index 39540fd425c..d6dbe2f5f75 100644 --- a/forge-gui/res/cardsfolder/d/disruptive_pitmage.txt +++ b/forge-gui/res/cardsfolder/d/disruptive_pitmage.txt @@ -4,5 +4,6 @@ Types:Creature Human Wizard PT:1/1 A:AB$ Counter | Cost$ T | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | UnlessCost$ 1 | SpellDescription$ Counter target spell unless its controller pays {1}. K:Morph:U +SVar:NonCombatPriority:5 SVar:Picture:http://www.wizards.com/global/images/magic/general/disruptive_pitmage.jpg Oracle:{T}: Counter target spell unless its controller pays {1}.\nMorph {U} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) diff --git a/forge-gui/res/cardsfolder/d/disruptive_student.txt b/forge-gui/res/cardsfolder/d/disruptive_student.txt index 510cbbd58e6..29d15f3da56 100644 --- a/forge-gui/res/cardsfolder/d/disruptive_student.txt +++ b/forge-gui/res/cardsfolder/d/disruptive_student.txt @@ -3,5 +3,6 @@ ManaCost:2 U Types:Creature Human Wizard PT:1/1 A:AB$ Counter | Cost$ T | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | UnlessCost$ 1 | SpellDescription$ Counter target spell unless its controller pays {1}. +SVar:NonCombatPriority:5 SVar:Picture:http://www.wizards.com/global/images/magic/general/disruptive_student.jpg Oracle:{T}: Counter target spell unless its controller pays {1}. diff --git a/forge-gui/res/cardsfolder/f/femeref_healer.txt b/forge-gui/res/cardsfolder/f/femeref_healer.txt index c14ce9287c8..bdad34736b2 100644 --- a/forge-gui/res/cardsfolder/f/femeref_healer.txt +++ b/forge-gui/res/cardsfolder/f/femeref_healer.txt @@ -3,5 +3,6 @@ ManaCost:1 W Types:Creature Human Cleric PT:1/1 A:AB$ PreventDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | Amount$ 1 | SpellDescription$ Prevent the next 1 damage that would be dealt to target creature or player this turn. +SVar:NonCombatPriority:10 SVar:Picture:http://www.wizards.com/global/images/magic/general/femeref_healer.jpg Oracle:{T}: Prevent the next 1 damage that would be dealt to target creature or player this turn. diff --git a/forge-gui/res/cardsfolder/f/frostwielder.txt b/forge-gui/res/cardsfolder/f/frostwielder.txt index a7a731f3061..2df08e4e4c1 100644 --- a/forge-gui/res/cardsfolder/f/frostwielder.txt +++ b/forge-gui/res/cardsfolder/f/frostwielder.txt @@ -5,5 +5,6 @@ PT:1/2 A:AB$ DealDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature or player. R:Event$ Moved | ValidCard$ Creature.DamagedBy | Destination$ Graveyard | ReplaceWith$ DBExile | Description$ If a creature dealt damage by CARDNAME this turn would die, exile it instead. SVar:DBExile:DB$ ChangeZone | Defined$ ReplacedCard | Origin$ Battlefield | Destination$ Exile +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/frostwielder.jpg Oracle:{T}: Frostwielder deals 1 damage to target creature or player.\nIf a creature dealt damage by Frostwielder this turn would die, exile it instead. diff --git a/forge-gui/res/cardsfolder/g/gelectrode.txt b/forge-gui/res/cardsfolder/g/gelectrode.txt index 40efe49b670..f48f6b01067 100644 --- a/forge-gui/res/cardsfolder/g/gelectrode.txt +++ b/forge-gui/res/cardsfolder/g/gelectrode.txt @@ -5,5 +5,6 @@ PT:0/1 A:AB$ DealDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature or player. T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigUntap | OptionalDecider$ You | TriggerDescription$ Whenever you cast an instant or sorcery spell, you may untap CARDNAME. SVar:TrigUntap:DB$Untap | Defined$ Self +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/gelectrode.jpg Oracle:{T}: Gelectrode deals 1 damage to target creature or player.\nWhenever you cast an instant or sorcery spell, you may untap Gelectrode. diff --git a/forge-gui/res/cardsfolder/g/gideons_lawkeeper.txt b/forge-gui/res/cardsfolder/g/gideons_lawkeeper.txt index 581c951fa0b..fdf70167549 100644 --- a/forge-gui/res/cardsfolder/g/gideons_lawkeeper.txt +++ b/forge-gui/res/cardsfolder/g/gideons_lawkeeper.txt @@ -3,5 +3,6 @@ ManaCost:W Types:Creature Human Soldier PT:1/1 A:AB$ Tap | Cost$ W T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/gideons_lawkeeper.jpg Oracle:{W}, {T}: Tap target creature. diff --git a/forge-gui/res/cardsfolder/g/goblin_fireslinger.txt b/forge-gui/res/cardsfolder/g/goblin_fireslinger.txt index c981efb2d96..198985f6c97 100644 --- a/forge-gui/res/cardsfolder/g/goblin_fireslinger.txt +++ b/forge-gui/res/cardsfolder/g/goblin_fireslinger.txt @@ -3,5 +3,6 @@ ManaCost:R Types:Creature Goblin Warrior PT:1/1 A:AB$ DealDamage | Cost$ T | ValidTgts$ Player | TgtPrompt$ Select target player | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target player. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_fireslinger.jpg Oracle:{T}: Goblin Fireslinger deals 1 damage to target player. diff --git a/forge-gui/res/cardsfolder/g/goblin_sharpshooter.txt b/forge-gui/res/cardsfolder/g/goblin_sharpshooter.txt index 4326ec4bf62..69af6cf8625 100644 --- a/forge-gui/res/cardsfolder/g/goblin_sharpshooter.txt +++ b/forge-gui/res/cardsfolder/g/goblin_sharpshooter.txt @@ -6,5 +6,6 @@ A:AB$ DealDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select targ K:CARDNAME doesn't untap during your untap step. T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature | TriggerZones$ Battlefield | Execute$ TrigUntap | TriggerDescription$ Whenever a creature dies, untap CARDNAME. SVar:TrigUntap:DB$Untap | Defined$ Self +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_sharpshooter.jpg Oracle:Goblin Sharpshooter doesn't untap during your untap step.\nWhenever a creature dies, untap Goblin Sharpshooter.\n{T}: Goblin Sharpshooter deals 1 damage to target creature or player. diff --git a/forge-gui/res/cardsfolder/g/goldmeadow_harrier.txt b/forge-gui/res/cardsfolder/g/goldmeadow_harrier.txt index 4924f513dbc..a020b6e7f59 100644 --- a/forge-gui/res/cardsfolder/g/goldmeadow_harrier.txt +++ b/forge-gui/res/cardsfolder/g/goldmeadow_harrier.txt @@ -3,5 +3,6 @@ ManaCost:W Types:Creature Kithkin Soldier PT:1/1 A:AB$ Tap | Cost$ W T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/goldmeadow_harrier.jpg Oracle:{W}, {T}: Tap target creature. diff --git a/forge-gui/res/cardsfolder/g/grim_lavamancer.txt b/forge-gui/res/cardsfolder/g/grim_lavamancer.txt index 4bdcce8aa81..320f14bc72c 100644 --- a/forge-gui/res/cardsfolder/g/grim_lavamancer.txt +++ b/forge-gui/res/cardsfolder/g/grim_lavamancer.txt @@ -3,5 +3,6 @@ ManaCost:R Types:Creature Human Wizard PT:1/1 A:AB$ DealDamage | Cost$ R T ExileFromGrave<2/Card> | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 2 | SpellDescription$ CARDNAME deals 2 damage to target creature or player. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/grim_lavamancer.jpg Oracle:{R}, {T}, Exile two cards from your graveyard: Grim Lavamancer deals 2 damage to target creature or player. diff --git a/forge-gui/res/cardsfolder/h/hallowed_healer.txt b/forge-gui/res/cardsfolder/h/hallowed_healer.txt index a7a51205d21..f23128f8ade 100644 --- a/forge-gui/res/cardsfolder/h/hallowed_healer.txt +++ b/forge-gui/res/cardsfolder/h/hallowed_healer.txt @@ -4,5 +4,6 @@ Types:Creature Human Cleric PT:1/1 A:AB$ PreventDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | Amount$ 2 | SpellDescription$ Prevent the next 2 damage that would be dealt to target creature or player this turn. A:AB$ PreventDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | Amount$ 4 | Activation$ Threshold | PrecostDesc$ Threshold — | SpellDescription$ Prevent the next 4 damage that would be dealt to target creature or player this turn. Activate this ability only if seven or more cards are in your graveyard. +SVar:NonCombatPriority:3 SVar:Picture:http://www.wizards.com/global/images/magic/general/hallowed_healer.jpg Oracle:{T}: Prevent the next 2 damage that would be dealt to target creature or player this turn.\nThreshold — {T}: Prevent the next 4 damage that would be dealt to target creature or player this turn. Activate this ability only if seven or more cards are in your graveyard. diff --git a/forge-gui/res/cardsfolder/h/hanna_ships_navigator.txt b/forge-gui/res/cardsfolder/h/hanna_ships_navigator.txt index 6fa9058cb76..4d2d3de408c 100644 --- a/forge-gui/res/cardsfolder/h/hanna_ships_navigator.txt +++ b/forge-gui/res/cardsfolder/h/hanna_ships_navigator.txt @@ -3,5 +3,6 @@ ManaCost:1 W U Types:Legendary Creature Human Artificer PT:1/2 A:AB$ ChangeZone | Cost$ 1 W U T | TgtPrompt$ Choose target artifact or enchantment in your graveyard | ValidTgts$ Artifact.YouCtrl,Enchantment.YouCtrl | Origin$ Graveyard | Destination$ Hand | SpellDescription$ Return target artifact or enchantment card from your graveyard to your hand. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/hanna_ships_navigator.jpg Oracle:{1}{W}{U}, {T}: Return target artifact or enchantment card from your graveyard to your hand. diff --git a/forge-gui/res/cardsfolder/h/hermit_druid.txt b/forge-gui/res/cardsfolder/h/hermit_druid.txt index e5c69efdeef..f60f3095f62 100644 --- a/forge-gui/res/cardsfolder/h/hermit_druid.txt +++ b/forge-gui/res/cardsfolder/h/hermit_druid.txt @@ -4,5 +4,6 @@ Types:Creature Human Druid PT:1/1 A:AB$ DigUntil | Cost$ G T | Valid$ Land.Basic | ValidDescription$ basic land | FoundDestination$ Hand | RevealedDestination$ Graveyard | AILogic$ DontMillSelf | SpellDescription$ Reveal cards from the top of your library until you reveal a basic land card. Put that card into your hand and all other cards revealed this way into your graveyard. SVar:RemRandomDeck:True +SVar:NonCombatPriority:4 SVar:Picture:http://www.wizards.com/global/images/magic/general/hermit_druid.jpg Oracle:{G}, {T}: Reveal cards from the top of your library until you reveal a basic land card. Put that card into your hand and all other cards revealed this way into your graveyard. From e04d88977e3ab89d4acc8b62c1c811bf55b2d234 Mon Sep 17 00:00:00 2001 From: Seravy Date: Sun, 11 Feb 2018 22:13:58 +0100 Subject: [PATCH 6/8] adding to cards L-Z Added creatures with low power that have -abilities that tap for something really valuable like drawing a card -abilities that usually need to be saved until enemy turn (counter a spell, tap a creature, prevent damage) -abilities that usually deal equal or more damage if not attacking (prodigal sorcerer, grim lavamancer) Generally avoided abilities where activating before combat is an acceptable choice and thus the attack decision doesn't come up anyway as the AI already used the ability. However, this behavior is unacceptable on certain abilities (mostly those with higher mana costs) which should not be used before the end of main 2 as it prevents the AI from actually playing their cards. (like Hanna Ship Navigator) I suspect this will need quite a bit of improvement in the future but we have to start somewhere. --- forge-ai/src/main/java/forge/ai/AiAttackController.java | 2 ++ forge-gui/res/cardsfolder/l/lady_evangela.txt | 1 + forge-gui/res/cardsfolder/l/lich_lord_of_unx.txt | 1 + forge-gui/res/cardsfolder/l/lin_sivvi_defiant_hero.txt | 1 + forge-gui/res/cardsfolder/m/maddening_imp.txt | 1 + forge-gui/res/cardsfolder/m/master_decoy.txt | 1 + forge-gui/res/cardsfolder/m/minister_of_impediments.txt | 1 + forge-gui/res/cardsfolder/m/moggcatcher.txt | 1 + forge-gui/res/cardsfolder/m/mother_of_runes.txt | 1 + forge-gui/res/cardsfolder/m/mundungu.txt | 1 + forge-gui/res/cardsfolder/n/nomad_decoy.txt | 1 + forge-gui/res/cardsfolder/o/orim_samite_healer.txt | 1 + forge-gui/res/cardsfolder/o/oriss_samite_guardian.txt | 1 + forge-gui/res/cardsfolder/p/prodigal_pyromancer.txt | 1 + forge-gui/res/cardsfolder/p/prodigal_sorcerer.txt | 1 + forge-gui/res/cardsfolder/r/rathi_trapper.txt | 1 + forge-gui/res/cardsfolder/r/razorfin_hunter.txt | 1 + forge-gui/res/cardsfolder/r/riptide_director.txt | 1 + forge-gui/res/cardsfolder/r/rootwater_hunter.txt | 1 + forge-gui/res/cardsfolder/r/royal_assassin.txt | 1 + forge-gui/res/cardsfolder/s/samite_archer.txt | 1 + forge-gui/res/cardsfolder/s/samite_healer.txt | 1 + forge-gui/res/cardsfolder/s/sanctum_custodian.txt | 1 + forge-gui/res/cardsfolder/s/seahunter.txt | 1 + forge-gui/res/cardsfolder/s/serendib_sorcerer.txt | 1 + forge-gui/res/cardsfolder/s/sigardian_priest.txt | 1 + forge-gui/res/cardsfolder/s/skyshroud_poacher.txt | 1 + forge-gui/res/cardsfolder/s/sorceress_queen.txt | 1 + forge-gui/res/cardsfolder/s/squall_drifter.txt | 1 + forge-gui/res/cardsfolder/s/stormscape_apprentice.txt | 1 + forge-gui/res/cardsfolder/s/stun_sniper.txt | 1 + forge-gui/res/cardsfolder/t/temporal_adept.txt | 1 + forge-gui/res/cardsfolder/t/thornscape_apprentice.txt | 1 + forge-gui/res/cardsfolder/t/thornwind_faeries.txt | 1 + forge-gui/res/cardsfolder/t/tradewind_rider.txt | 1 + forge-gui/res/cardsfolder/v/vulshok_sorcerer.txt | 1 + forge-gui/res/cardsfolder/w/whipcorder.txt | 1 + forge-gui/res/cardsfolder/w/witch_hunter.txt | 1 + forge-gui/res/cardsfolder/x/xira_arien.txt | 1 + forge-gui/res/cardsfolder/z/zuran_spellcaster.txt | 1 + 40 files changed, 41 insertions(+) diff --git a/forge-ai/src/main/java/forge/ai/AiAttackController.java b/forge-ai/src/main/java/forge/ai/AiAttackController.java index f2ca3076b83..92e7689b4d2 100644 --- a/forge-ai/src/main/java/forge/ai/AiAttackController.java +++ b/forge-ai/src/main/java/forge/ai/AiAttackController.java @@ -1089,6 +1089,7 @@ public class AiAttackController { // For each level of priority, enemy has to have life as much as the creature's power // so a priority of 4 means the creature will not attack unless it can defeat that player in 4 successful attacks. // the lower the priroity, the less willing the AI is to use the creature for attacking. + // TODO Somehow subtract expected damage of other attacking creatures from enemy life total (how? other attackers not yet declared? Can the AI guesstimate which of their creatures will not get blocked?) if (attacker.getCurrentPower() < ai.getOpponentsSmallestLifeTotal() / Integer.parseInt(attacker.getSVar("NonCombatPriority"))) { // Check if the card actually has an ability the AI can and wants to play, if not, attacking is fine! boolean wantability = false; @@ -1099,6 +1100,7 @@ public class AiAttackController { return false; } // TODO Eventually The Ai will need to learn to predict if they have any use for the ability before next untap or not. + // TODO abilities that tap enemy creatures should probably only be saved if the enemy has nonzero creatures? Haste can be a threat though... } } } diff --git a/forge-gui/res/cardsfolder/l/lady_evangela.txt b/forge-gui/res/cardsfolder/l/lady_evangela.txt index 771b4a68e63..92169bf7e89 100644 --- a/forge-gui/res/cardsfolder/l/lady_evangela.txt +++ b/forge-gui/res/cardsfolder/l/lady_evangela.txt @@ -4,5 +4,6 @@ Types:Legendary Creature Human Cleric PT:1/2 A:AB$ Pump | Cost$ W B T | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ Prevent all combat damage that would be dealt by CARDNAME. | IsCurse$ True | SpellDescription$ Prevent all combat damage that would be dealt by target creature this turn. SVar:RemAIDeck:True +SVar:NonCombatPriority:2 SVar:Picture:http://www.wizards.com/global/images/magic/general/lady_evangela.jpg Oracle:{W}{B}, {T}: Prevent all combat damage that would be dealt by target creature this turn. diff --git a/forge-gui/res/cardsfolder/l/lich_lord_of_unx.txt b/forge-gui/res/cardsfolder/l/lich_lord_of_unx.txt index 55a55041b57..db34270f2c1 100644 --- a/forge-gui/res/cardsfolder/l/lich_lord_of_unx.txt +++ b/forge-gui/res/cardsfolder/l/lich_lord_of_unx.txt @@ -6,5 +6,6 @@ A:AB$ Token | Cost$ U B T | TokenAmount$ 1 | TokenName$ Zombie Wizard | TokenTyp A:AB$ Mill | Cost$ U U B B | ValidTgts$ Player | TgtPrompt$ Select a player | NumCards$ X | SubAbility$ DBLoseLife | References$ X | SpellDescription$ Target player loses X life and puts the top X cards of his or her library into his or her graveyard, where X is the number of Zombies you control. SVar:DBLoseLife:DB$LoseLife | LifeAmount$ X | Defined$ Targeted | References$ X SVar:X:Count$Valid Zombie.YouCtrl +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/lich_lord_of_unx.jpg Oracle:{U}{B}, {T}: Create a 1/1 blue and black Zombie Wizard creature token.\n{U}{U}{B}{B}: Target player loses X life and puts the top X cards of his or her library into his or her graveyard, where X is the number of Zombies you control. diff --git a/forge-gui/res/cardsfolder/l/lin_sivvi_defiant_hero.txt b/forge-gui/res/cardsfolder/l/lin_sivvi_defiant_hero.txt index a1cbcc889cc..47e144b4d07 100644 --- a/forge-gui/res/cardsfolder/l/lin_sivvi_defiant_hero.txt +++ b/forge-gui/res/cardsfolder/l/lin_sivvi_defiant_hero.txt @@ -6,5 +6,6 @@ A:AB$ ChangeZone | Cost$ X T | Origin$ Library | Destination$ Battlefield | Chan A:AB$ ChangeZone | Cost$ 3 | ValidTgts$ Rebel.YouCtrl | Origin$ Graveyard | Destination$ Library | LibraryPosition$ -1 | TgtPrompt$ Select target Rebel card in your graveyard | SpellDescription$ Put target Rebel card in your graveyard on the bottom of your library. SVar:X:Count$xPaid SVar:RemRandomDeck:True +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/lin_sivvi_defiant_hero.jpg Oracle:{X}, {T}: Search your library for a Rebel permanent card with converted mana cost X or less and put it onto the battlefield. Then shuffle your library.\n{3}: Put target Rebel card from your graveyard on the bottom of your library. diff --git a/forge-gui/res/cardsfolder/m/maddening_imp.txt b/forge-gui/res/cardsfolder/m/maddening_imp.txt index 7b1ca2c8e9d..b997f17b2fd 100644 --- a/forge-gui/res/cardsfolder/m/maddening_imp.txt +++ b/forge-gui/res/cardsfolder/m/maddening_imp.txt @@ -9,5 +9,6 @@ SVar:DestroyPacifist:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | Exe SVar:TrigDestroy:DB$ DestroyAll | ValidCards$ Creature.ActivePlayerCtrl+notAttackedThisTurn+nonWall SVar:RemAIDeck:True SVar:RemRandomDeck:True +SVar:NonCombatPriority:5 SVar:Picture:http://www.wizards.com/global/images/magic/general/maddening_imp.jpg Oracle:Flying\n{T}: Non-Wall creatures the active player controls attack this turn if able. At the beginning of the next end step, destroy each of those creatures that didn't attack this turn. Activate this ability only during an opponent's turn and only before combat. diff --git a/forge-gui/res/cardsfolder/m/master_decoy.txt b/forge-gui/res/cardsfolder/m/master_decoy.txt index 0cba96feda0..7172f022078 100644 --- a/forge-gui/res/cardsfolder/m/master_decoy.txt +++ b/forge-gui/res/cardsfolder/m/master_decoy.txt @@ -3,5 +3,6 @@ ManaCost:1 W Types:Creature Human Soldier PT:1/2 A:AB$ Tap | Cost$ W T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/master_decoy.jpg Oracle:{W}, {T}: Tap target creature. diff --git a/forge-gui/res/cardsfolder/m/minister_of_impediments.txt b/forge-gui/res/cardsfolder/m/minister_of_impediments.txt index 595c58b7791..615e9407c1d 100644 --- a/forge-gui/res/cardsfolder/m/minister_of_impediments.txt +++ b/forge-gui/res/cardsfolder/m/minister_of_impediments.txt @@ -3,5 +3,6 @@ ManaCost:2 WU Types:Creature Human Advisor PT:1/1 A:AB$ Tap | Cost$ T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/minister_of_impediments.jpg Oracle:({W/U} can be paid with either {W} or {U}.)\n{T}: Tap target creature. diff --git a/forge-gui/res/cardsfolder/m/moggcatcher.txt b/forge-gui/res/cardsfolder/m/moggcatcher.txt index 8e74571b9a7..c66af716294 100644 --- a/forge-gui/res/cardsfolder/m/moggcatcher.txt +++ b/forge-gui/res/cardsfolder/m/moggcatcher.txt @@ -4,5 +4,6 @@ Types:Creature Human Mercenary PT:2/2 A:AB$ ChangeZone | Cost$ 3 T | Origin$ Library | Destination$ Battlefield | ChangeType$ Permanent.Goblin | ChangeNum$ 1 | SpellDescription$ Search your library for a Goblin permanent card and put it onto the battlefield. Then shuffle your library. SVar:RemRandomDeck:True +SVar:NonCombatPriority:3 SVar:Picture:http://www.wizards.com/global/images/magic/general/moggcatcher.jpg Oracle:{3}, {T}: Search your library for a Goblin permanent card and put it onto the battlefield. Then shuffle your library. diff --git a/forge-gui/res/cardsfolder/m/mother_of_runes.txt b/forge-gui/res/cardsfolder/m/mother_of_runes.txt index 90d01244f6e..2d3178e065c 100644 --- a/forge-gui/res/cardsfolder/m/mother_of_runes.txt +++ b/forge-gui/res/cardsfolder/m/mother_of_runes.txt @@ -3,5 +3,6 @@ ManaCost:W Types:Creature Human Cleric PT:1/1 A:AB$ Protection | Cost$ T | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | Gains$ Choice | Choices$ AnyColor | SpellDescription$ Target creature you control gains protection from the color of your choice until end of turn. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/mother_of_runes.jpg Oracle:{T}: Target creature you control gains protection from the color of your choice until end of turn. diff --git a/forge-gui/res/cardsfolder/m/mundungu.txt b/forge-gui/res/cardsfolder/m/mundungu.txt index a0a824db3be..e3612ef54dc 100644 --- a/forge-gui/res/cardsfolder/m/mundungu.txt +++ b/forge-gui/res/cardsfolder/m/mundungu.txt @@ -4,4 +4,5 @@ Types:Creature Human Wizard PT:1/1 A:AB$ Counter | Cost$ T | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | UnlessCost$ 1 PayLife<1> | SpellDescription$ Counter target spell unless its controller pays {1} and 1 life. SVar:Picture:http://www.wizards.com/global/images/magic/general/mundungu.jpg +SVar:NonCombatPriority:2 Oracle:{T}: Counter target spell unless its controller pays {1} and 1 life. diff --git a/forge-gui/res/cardsfolder/n/nomad_decoy.txt b/forge-gui/res/cardsfolder/n/nomad_decoy.txt index 30a4093b23b..9d200bf5c32 100644 --- a/forge-gui/res/cardsfolder/n/nomad_decoy.txt +++ b/forge-gui/res/cardsfolder/n/nomad_decoy.txt @@ -5,5 +5,6 @@ PT:1/2 A:AB$ Tap | Cost$ W T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature. A:AB$ Tap | Cost$ W W T | ValidTgts$ Creature | TgtPrompt$ Select target creature | TargetMin$ 2 | TargetMax$ 2 | CheckSVar$ X | SVarCompare$ GE7 | References$ X | SpellDescription$ Tap two target creatures. Activate this ability only if seven or more cards are in your graveyard. | PrecostDesc$ Threshold — SVar:X:Count$InYourYard +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/nomad_decoy.jpg Oracle:{W}, {T}: Tap target creature.\nThreshold — {W}{W}, {T}: Tap two target creatures. Activate this ability only if seven or more cards are in your graveyard. diff --git a/forge-gui/res/cardsfolder/o/orim_samite_healer.txt b/forge-gui/res/cardsfolder/o/orim_samite_healer.txt index 8c0a10c40c1..017dee140de 100644 --- a/forge-gui/res/cardsfolder/o/orim_samite_healer.txt +++ b/forge-gui/res/cardsfolder/o/orim_samite_healer.txt @@ -4,4 +4,5 @@ Types:Legendary Creature Human Cleric PT:1/3 A:AB$ PreventDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | Amount$ 3 | SpellDescription$ Prevent the next 3 damage that would be dealt to target creature or player this turn. SVar:Picture:http://www.wizards.com/global/images/magic/general/orim_samite_healer.jpg +SVar:NonCombatPriority:1 Oracle:{T}: Prevent the next 3 damage that would be dealt to target creature or player this turn. diff --git a/forge-gui/res/cardsfolder/o/oriss_samite_guardian.txt b/forge-gui/res/cardsfolder/o/oriss_samite_guardian.txt index 8045afeb97b..79c00c94be0 100644 --- a/forge-gui/res/cardsfolder/o/oriss_samite_guardian.txt +++ b/forge-gui/res/cardsfolder/o/oriss_samite_guardian.txt @@ -7,6 +7,7 @@ A:AB$ Effect | Cost$ Discard<1/Card.namedOriss, Samite Guardian> | CostDesc$ Gra SVar:CantBeCast:Mode$ CantBeCast | EffectZone$ Command | ValidCard$ Card | Caster$ Player.IsRemembered | Description$ Targeted player can't cast spells this turn. SVar:CantAttack:Mode$ Continuous | EffectZone$ Command | AffectedZone$ Battlefield | Affected$ Creature.RememberedPlayerCtrl | AddHiddenKeyword$ CARDNAME can't attack. | Description$ Creatures targeted player controls can't attack this turn. SVar:RemAIDeck:True +SVar:NonCombatPriority:2 DeckHints:Name$Oriss, Samite Guardian SVar:Picture:http://www.wizards.com/global/images/magic/general/oriss_samite_guardian.jpg Oracle:{T}: Prevent all damage that would be dealt to target creature this turn.\nGrandeur — Discard another card named Oriss, Samite Guardian: Target player can't cast spells this turn, and creatures that player controls can't attack this turn. diff --git a/forge-gui/res/cardsfolder/p/prodigal_pyromancer.txt b/forge-gui/res/cardsfolder/p/prodigal_pyromancer.txt index a47543aafe9..5b5347404ee 100644 --- a/forge-gui/res/cardsfolder/p/prodigal_pyromancer.txt +++ b/forge-gui/res/cardsfolder/p/prodigal_pyromancer.txt @@ -4,4 +4,5 @@ Types:Creature Human Wizard PT:1/1 A:AB$ DealDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature or player. SVar:Picture:http://resources.wizards.com/magic/cards/plc/en-us/card122338.jpg +SVar:NonCombatPriority:1 Oracle:{T}: Prodigal Pyromancer deals 1 damage to target creature or player. diff --git a/forge-gui/res/cardsfolder/p/prodigal_sorcerer.txt b/forge-gui/res/cardsfolder/p/prodigal_sorcerer.txt index 73258baec4c..140175ae010 100644 --- a/forge-gui/res/cardsfolder/p/prodigal_sorcerer.txt +++ b/forge-gui/res/cardsfolder/p/prodigal_sorcerer.txt @@ -4,4 +4,5 @@ Types:Creature Human Wizard PT:1/1 A:AB$ DealDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature or player. SVar:Picture:http://resources.wizards.com/magic/cards/tsb/en-us/card108906.jpg +SVar:NonCombatPriority:1 Oracle:{T}: Prodigal Sorcerer deals 1 damage to target creature or player. diff --git a/forge-gui/res/cardsfolder/r/rathi_trapper.txt b/forge-gui/res/cardsfolder/r/rathi_trapper.txt index 16e8b8ae65d..9a974090a2f 100644 --- a/forge-gui/res/cardsfolder/r/rathi_trapper.txt +++ b/forge-gui/res/cardsfolder/r/rathi_trapper.txt @@ -3,5 +3,6 @@ ManaCost:1 B Types:Creature Human Rebel Rogue PT:1/2 A:AB$ Tap | Cost$ B T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/rathi_trapper.jpg Oracle:{B}, {T}: Tap target creature. diff --git a/forge-gui/res/cardsfolder/r/razorfin_hunter.txt b/forge-gui/res/cardsfolder/r/razorfin_hunter.txt index 57b14acf48d..d19e32bb17b 100644 --- a/forge-gui/res/cardsfolder/r/razorfin_hunter.txt +++ b/forge-gui/res/cardsfolder/r/razorfin_hunter.txt @@ -3,5 +3,6 @@ ManaCost:U R Types:Creature Merfolk Goblin PT:1/1 A:AB$ DealDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature or player. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/razorfin_hunter.jpg Oracle:{T}: Razorfin Hunter deals 1 damage to target creature or player. diff --git a/forge-gui/res/cardsfolder/r/riptide_director.txt b/forge-gui/res/cardsfolder/r/riptide_director.txt index afb4ea079f4..2e3280a012e 100644 --- a/forge-gui/res/cardsfolder/r/riptide_director.txt +++ b/forge-gui/res/cardsfolder/r/riptide_director.txt @@ -5,5 +5,6 @@ PT:2/3 A:AB$ Draw | Cost$ 2 U U T | NumCards$ X | References$ X | SpellDescription$ Draw a card for each Wizard you control. SVar:X:Count$TypeYouCtrl.Wizard SVar:RemRandomDeck:True +SVar:NonCombatPriority:3 SVar:Picture:http://www.wizards.com/global/images/magic/general/riptide_director.jpg Oracle:{2}{U}{U}, {T}: Draw a card for each Wizard you control. diff --git a/forge-gui/res/cardsfolder/r/rootwater_hunter.txt b/forge-gui/res/cardsfolder/r/rootwater_hunter.txt index 3099bc2dfae..3f00674517c 100644 --- a/forge-gui/res/cardsfolder/r/rootwater_hunter.txt +++ b/forge-gui/res/cardsfolder/r/rootwater_hunter.txt @@ -3,5 +3,6 @@ ManaCost:2 U Types:Creature Merfolk PT:1/1 A:AB$ DealDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature or player. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/rootwater_hunter.jpg Oracle:{T}: Rootwater Hunter deals 1 damage to target creature or player. diff --git a/forge-gui/res/cardsfolder/r/royal_assassin.txt b/forge-gui/res/cardsfolder/r/royal_assassin.txt index 9ef4ba29dee..d49bbac244b 100644 --- a/forge-gui/res/cardsfolder/r/royal_assassin.txt +++ b/forge-gui/res/cardsfolder/r/royal_assassin.txt @@ -4,4 +4,5 @@ Types:Creature Human Assassin PT:1/1 A:AB$ Destroy | Cost$ T | ValidTgts$ Creature.tapped | TgtPrompt$ Select target tapped creature | SpellDescription$ Destroy target tapped creature. SVar:Picture:http://resources.wizards.com/magic/cards/9ed/en-us/card83235.jpg +SVar:NonCombatPriority:1 Oracle:{T}: Destroy target tapped creature. diff --git a/forge-gui/res/cardsfolder/s/samite_archer.txt b/forge-gui/res/cardsfolder/s/samite_archer.txt index 7d0d7d0a526..956c0b54508 100644 --- a/forge-gui/res/cardsfolder/s/samite_archer.txt +++ b/forge-gui/res/cardsfolder/s/samite_archer.txt @@ -5,4 +5,5 @@ PT:1/1 A:AB$ PreventDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | Amount$ 1 | SpellDescription$ Prevent the next 1 damage that would be dealt to target creature or player this turn. A:AB$ DealDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature or player. SVar:Picture:http://www.wizards.com/global/images/magic/general/samite_archer.jpg +SVar:NonCombatPriority:1 Oracle:{T}: Prevent the next 1 damage that would be dealt to target creature or player this turn.\n{T}: Samite Archer deals 1 damage to target creature or player. diff --git a/forge-gui/res/cardsfolder/s/samite_healer.txt b/forge-gui/res/cardsfolder/s/samite_healer.txt index cb325cfdda4..4773bb85ff7 100644 --- a/forge-gui/res/cardsfolder/s/samite_healer.txt +++ b/forge-gui/res/cardsfolder/s/samite_healer.txt @@ -4,4 +4,5 @@ Types:Creature Human Cleric PT:1/1 A:AB$ PreventDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | Amount$ 1 | SpellDescription$ Prevent the next 1 damage that would be dealt to target creature or player this turn. SVar:Picture:http://www.wizards.com/global/images/magic/general/samite_healer.jpg +SVar:NonCombatPriority:10 Oracle:{T}: Prevent the next 1 damage that would be dealt to target creature or player this turn. diff --git a/forge-gui/res/cardsfolder/s/sanctum_custodian.txt b/forge-gui/res/cardsfolder/s/sanctum_custodian.txt index 5a28bf088c6..2d1e503d540 100644 --- a/forge-gui/res/cardsfolder/s/sanctum_custodian.txt +++ b/forge-gui/res/cardsfolder/s/sanctum_custodian.txt @@ -4,4 +4,5 @@ Types:Creature Human Cleric PT:1/2 A:AB$ PreventDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | Amount$ 2 | SpellDescription$ Prevent the next 2 damage that would be dealt to target creature or player this turn. SVar:Picture:http://www.wizards.com/global/images/magic/general/sanctum_custodian.jpg +SVar:NonCombatPriority:2 Oracle:{T}: Prevent the next 2 damage that would be dealt to target creature or player this turn. diff --git a/forge-gui/res/cardsfolder/s/seahunter.txt b/forge-gui/res/cardsfolder/s/seahunter.txt index 9f9576890fc..a9cb5e9b374 100644 --- a/forge-gui/res/cardsfolder/s/seahunter.txt +++ b/forge-gui/res/cardsfolder/s/seahunter.txt @@ -4,5 +4,6 @@ Types:Creature Human Mercenary PT:2/2 A:AB$ ChangeZone | Cost$ 3 T | Origin$ Library | Destination$ Battlefield | ChangeType$ Permanent.Merfolk | ChangeNum$ 1 | SpellDescription$ Search your library for a Merfolk permanent card and put it onto the battlefield. Then shuffle your library. SVar:RemRandomDeck:True +SVar:NonCombatPriority:3 SVar:Picture:http://www.wizards.com/global/images/magic/general/seahunter.jpg Oracle:{3}, {T}: Search your library for a Merfolk permanent card and put it onto the battlefield. Then shuffle your library. diff --git a/forge-gui/res/cardsfolder/s/serendib_sorcerer.txt b/forge-gui/res/cardsfolder/s/serendib_sorcerer.txt index 150a4f1d5a6..fa2c5704882 100644 --- a/forge-gui/res/cardsfolder/s/serendib_sorcerer.txt +++ b/forge-gui/res/cardsfolder/s/serendib_sorcerer.txt @@ -3,5 +3,6 @@ ManaCost:1 U U Types:Creature Human Wizard PT:1/1 A:AB$ Animate | Cost$ T | ValidTgts$ Creature.Other | TgtPrompt$ Select target creature other than CARDNAME | Power$ 0 | Toughness$ 2 | IsCurse$ True | SpellDescription$ Target creature other than CARDNAME has base power and toughness 0/2 until end of turn. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/serendib_sorcerer.jpg Oracle:{T}: Target creature other than Serendib Sorcerer has base power and toughness 0/2 until end of turn. diff --git a/forge-gui/res/cardsfolder/s/sigardian_priest.txt b/forge-gui/res/cardsfolder/s/sigardian_priest.txt index e93cf755a5b..47fec047677 100644 --- a/forge-gui/res/cardsfolder/s/sigardian_priest.txt +++ b/forge-gui/res/cardsfolder/s/sigardian_priest.txt @@ -3,5 +3,6 @@ ManaCost:1 W Types:Creature Human Cleric PT:1/2 A:AB$ Tap | Cost$ 1 T | ValidTgts$ Creature.nonHuman | TgtPrompt$ Select target non-Human creature | SpellDescription$ Tap target non-Human creature. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/sigardian_priest.jpg Oracle:{1}, {T}: Tap target non-Human creature. diff --git a/forge-gui/res/cardsfolder/s/skyshroud_poacher.txt b/forge-gui/res/cardsfolder/s/skyshroud_poacher.txt index 1a943b1b02f..55b9dcdbea4 100644 --- a/forge-gui/res/cardsfolder/s/skyshroud_poacher.txt +++ b/forge-gui/res/cardsfolder/s/skyshroud_poacher.txt @@ -4,5 +4,6 @@ Types:Creature Human Rebel PT:2/2 A:AB$ ChangeZone | Cost$ 3 T | Origin$ Library | Destination$ Battlefield | ChangeType$ Permanent.Elf | ChangeNum$ 1 | SpellDescription$ Search your library for an Elf permanent card and put it onto the battlefield. Then shuffle your library. SVar:RemRandomDeck:True +SVar:NonCombatPriority:3 SVar:Picture:http://www.wizards.com/global/images/magic/general/skyshroud_poacher.jpg Oracle:{3}, {T}: Search your library for an Elf permanent card and put it onto the battlefield. Then shuffle your library. diff --git a/forge-gui/res/cardsfolder/s/sorceress_queen.txt b/forge-gui/res/cardsfolder/s/sorceress_queen.txt index 466eab47b67..604b22f1144 100644 --- a/forge-gui/res/cardsfolder/s/sorceress_queen.txt +++ b/forge-gui/res/cardsfolder/s/sorceress_queen.txt @@ -3,5 +3,6 @@ ManaCost:1 B B Types:Creature Human Wizard PT:1/1 A:AB$ Animate | Cost$ T | ValidTgts$ Creature.Other | TgtPrompt$ Select target creature other than CARDNAME | Power$ 0 | Toughness$ 2 | IsCurse$ True | SpellDescription$ Target creature other than CARDNAME has base power and toughness 0/2 until end of turn. +SVar:NonCombatPriority:1 SVar:Picture:http://resources.wizards.com/magic/cards/4e/en-us/card2129.jpg Oracle:{T}: Target creature other than Sorceress Queen has base power and toughness 0/2 until end of turn. diff --git a/forge-gui/res/cardsfolder/s/squall_drifter.txt b/forge-gui/res/cardsfolder/s/squall_drifter.txt index 02b9e4b5d50..033525eeeb4 100644 --- a/forge-gui/res/cardsfolder/s/squall_drifter.txt +++ b/forge-gui/res/cardsfolder/s/squall_drifter.txt @@ -4,5 +4,6 @@ Types:Snow Creature Elemental PT:1/1 K:Flying A:AB$ Tap | Cost$ W T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature. +SVar:NonCombatPriority:1 SVar:Picture:http://resources.wizards.com/magic/cards/csp/en-us/card121273.jpg Oracle:Flying\n{W}, {T}: Tap target creature. diff --git a/forge-gui/res/cardsfolder/s/stormscape_apprentice.txt b/forge-gui/res/cardsfolder/s/stormscape_apprentice.txt index 05c5b2c1060..dd80bddcb84 100644 --- a/forge-gui/res/cardsfolder/s/stormscape_apprentice.txt +++ b/forge-gui/res/cardsfolder/s/stormscape_apprentice.txt @@ -4,5 +4,6 @@ Types:Creature Human Wizard PT:1/1 A:AB$ Tap | Cost$ W T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature. A:AB$ LoseLife | Cost$ B T | ValidTgts$ Player | TgtPrompt$ Select a player | LifeAmount$ 1 | SpellDescription$ Target player loses 1 life. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/stormscape_apprentice.jpg Oracle:{W}, {T}: Tap target creature.\n{B}, {T}: Target player loses 1 life. diff --git a/forge-gui/res/cardsfolder/s/stun_sniper.txt b/forge-gui/res/cardsfolder/s/stun_sniper.txt index 4ea7ad716fc..a04f3b4d394 100644 --- a/forge-gui/res/cardsfolder/s/stun_sniper.txt +++ b/forge-gui/res/cardsfolder/s/stun_sniper.txt @@ -4,5 +4,6 @@ Types:Creature Human Archer PT:1/1 A:AB$ DealDamage | Cost$ 1 T | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 1 | SubAbility$ DBTap | SpellDescription$ CARDNAME deals 1 damage to target creature. Tap that creature. SVar:DBTap:DB$Tap | Defined$ Targeted +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/stun_sniper.jpg Oracle:{1}, {T}: Stun Sniper deals 1 damage to target creature. Tap that creature. diff --git a/forge-gui/res/cardsfolder/t/temporal_adept.txt b/forge-gui/res/cardsfolder/t/temporal_adept.txt index 9e9885ba1cf..016bb836059 100644 --- a/forge-gui/res/cardsfolder/t/temporal_adept.txt +++ b/forge-gui/res/cardsfolder/t/temporal_adept.txt @@ -3,5 +3,6 @@ ManaCost:1 U U Types:Creature Human Wizard PT:1/1 A:AB$ ChangeZone | Cost$ U U U T | ValidTgts$ Permanent | TgtPrompt$ Select target permanent | Origin$ Battlefield | Destination$ Hand | SpellDescription$ Return target permanent to its owner's hand. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/temporal_adept.jpg Oracle:{U}{U}{U}, {T}: Return target permanent to its owner's hand. diff --git a/forge-gui/res/cardsfolder/t/thornscape_apprentice.txt b/forge-gui/res/cardsfolder/t/thornscape_apprentice.txt index 3b8acb32e77..5448a13b25b 100644 --- a/forge-gui/res/cardsfolder/t/thornscape_apprentice.txt +++ b/forge-gui/res/cardsfolder/t/thornscape_apprentice.txt @@ -4,5 +4,6 @@ Types:Creature Human Wizard PT:1/1 A:AB$ Pump | Cost$ R T | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ First Strike | SpellDescription$ Target creature gains first strike until end of turn. A:AB$ Tap | Cost$ W T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/thornscape_apprentice.jpg Oracle:{R}, {T}: Target creature gains first strike until end of turn.\n{W}, {T}: Tap target creature. diff --git a/forge-gui/res/cardsfolder/t/thornwind_faeries.txt b/forge-gui/res/cardsfolder/t/thornwind_faeries.txt index c6b814c851d..3f8e7e0478c 100644 --- a/forge-gui/res/cardsfolder/t/thornwind_faeries.txt +++ b/forge-gui/res/cardsfolder/t/thornwind_faeries.txt @@ -4,5 +4,6 @@ Types:Creature Faerie PT:1/1 K:Flying A:AB$ DealDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature or player. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/thornwind_faeries.jpg Oracle:Flying\n{T}: Thornwind Faeries deals 1 damage to target creature or player. diff --git a/forge-gui/res/cardsfolder/t/tradewind_rider.txt b/forge-gui/res/cardsfolder/t/tradewind_rider.txt index 6f044a52d5f..d7e1d1325ab 100644 --- a/forge-gui/res/cardsfolder/t/tradewind_rider.txt +++ b/forge-gui/res/cardsfolder/t/tradewind_rider.txt @@ -4,5 +4,6 @@ Types:Creature Spirit PT:1/4 K:Flying A:AB$ ChangeZone | Cost$ T tapXType<2/Creature> | ValidTgts$ Permanent | TgtPrompt$ Select target permanent | Origin$ Battlefield | Destination$ Hand | SpellDescription$ Return target permanent to its owner's hand. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/tradewind_rider.jpg Oracle:Flying\n{T}, Tap two untapped creatures you control: Return target permanent to its owner's hand. diff --git a/forge-gui/res/cardsfolder/v/vulshok_sorcerer.txt b/forge-gui/res/cardsfolder/v/vulshok_sorcerer.txt index 6f90455d3c5..e2ab337d19b 100644 --- a/forge-gui/res/cardsfolder/v/vulshok_sorcerer.txt +++ b/forge-gui/res/cardsfolder/v/vulshok_sorcerer.txt @@ -4,5 +4,6 @@ Types:Creature Human Shaman PT:1/1 K:Haste A:AB$ DealDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature or player. +SVar:NonCombatPriority:1 SVar:Picture:http://resources.wizards.com/magic/cards/5dn/en-us/card51177.jpg Oracle:Haste\n{T}: Vulshok Sorcerer deals 1 damage to target creature or player. \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/w/whipcorder.txt b/forge-gui/res/cardsfolder/w/whipcorder.txt index b9e7058ba77..4e9b881c62c 100644 --- a/forge-gui/res/cardsfolder/w/whipcorder.txt +++ b/forge-gui/res/cardsfolder/w/whipcorder.txt @@ -4,5 +4,6 @@ Types:Creature Human Soldier Rebel PT:2/2 K:Morph:W A:AB$ Tap | Cost$ W T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/whipcorder.jpg Oracle:{W}, {T}: Tap target creature.\nMorph {W} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) diff --git a/forge-gui/res/cardsfolder/w/witch_hunter.txt b/forge-gui/res/cardsfolder/w/witch_hunter.txt index ab3bab11fc6..e2c780e2260 100644 --- a/forge-gui/res/cardsfolder/w/witch_hunter.txt +++ b/forge-gui/res/cardsfolder/w/witch_hunter.txt @@ -4,5 +4,6 @@ Types:Creature Human Cleric PT:1/1 A:AB$ DealDamage | Cost$ T | NumDmg$ 1 | ValidTgts$ Player | TgtPrompt$ Select target player | SpellDescription$ CARDNAME deals 1 damage to target player. A:AB$ ChangeZone | Cost$ 1 W W T | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Select target creature an opponent controls | Origin$ Battlefield | Destination$ Hand | SpellDescription$ Return target creature you don't control to its owner's hand. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/witch_hunter.jpg Oracle:{T}: Witch Hunter deals 1 damage to target player.\n{1}{W}{W}, {T}: Return target creature an opponent controls to its owner's hand. diff --git a/forge-gui/res/cardsfolder/x/xira_arien.txt b/forge-gui/res/cardsfolder/x/xira_arien.txt index 771402b9af8..7cac59623b3 100644 --- a/forge-gui/res/cardsfolder/x/xira_arien.txt +++ b/forge-gui/res/cardsfolder/x/xira_arien.txt @@ -4,5 +4,6 @@ Types:Legendary Creature Insect Wizard PT:1/2 K:Flying A:AB$ Draw | Cost$ B R G T | NumCards$ 1 | ValidTgts$ Player | TgtPrompt$ Choose a player | SpellDescription$ Target player draws a card. +SVar:NonCombatPriority:2 SVar:Picture:http://www.wizards.com/global/images/magic/general/xira_arien.jpg Oracle:Flying\n{B}{R}{G}, {T}: Target player draws a card. diff --git a/forge-gui/res/cardsfolder/z/zuran_spellcaster.txt b/forge-gui/res/cardsfolder/z/zuran_spellcaster.txt index 049b93bebb3..c2232a46ba8 100644 --- a/forge-gui/res/cardsfolder/z/zuran_spellcaster.txt +++ b/forge-gui/res/cardsfolder/z/zuran_spellcaster.txt @@ -3,5 +3,6 @@ ManaCost:2 U Types:Creature Human Wizard PT:1/1 A:AB$ DealDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature or player. +SVar:NonCombatPriority:1 SVar:Picture:http://www.wizards.com/global/images/magic/general/zuran_spellcaster.jpg Oracle:{T}: Zuran Spellcaster deals 1 damage to target creature or player. From 76bcbc632e0bd2ee9a29e8d21b5a97235d0bdcda Mon Sep 17 00:00:00 2001 From: Seravy Date: Mon, 12 Feb 2018 00:03:09 +0100 Subject: [PATCH 7/8] Rearranged to fix rounding problem --- forge-ai/src/main/java/forge/ai/AiAttackController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-ai/src/main/java/forge/ai/AiAttackController.java b/forge-ai/src/main/java/forge/ai/AiAttackController.java index 92e7689b4d2..e3fe107291f 100644 --- a/forge-ai/src/main/java/forge/ai/AiAttackController.java +++ b/forge-ai/src/main/java/forge/ai/AiAttackController.java @@ -1090,7 +1090,7 @@ public class AiAttackController { // so a priority of 4 means the creature will not attack unless it can defeat that player in 4 successful attacks. // the lower the priroity, the less willing the AI is to use the creature for attacking. // TODO Somehow subtract expected damage of other attacking creatures from enemy life total (how? other attackers not yet declared? Can the AI guesstimate which of their creatures will not get blocked?) - if (attacker.getCurrentPower() < ai.getOpponentsSmallestLifeTotal() / Integer.parseInt(attacker.getSVar("NonCombatPriority"))) { + if (attacker.getCurrentPower() * Integer.parseInt(attacker.getSVar("NonCombatPriority")) < ai.getOpponentsSmallestLifeTotal()) { // Check if the card actually has an ability the AI can and wants to play, if not, attacking is fine! boolean wantability = false; for (SpellAbility sa : attacker.getSpellAbilities()) { From 2ff32d3b9042af2dd1e5a2ebe410d0cf715a7a04 Mon Sep 17 00:00:00 2001 From: Seravy Date: Tue, 13 Feb 2018 03:11:18 +0100 Subject: [PATCH 8/8] MIssing ! in the check for nonvigilence creature. --- forge-ai/src/main/java/forge/ai/AiAttackController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-ai/src/main/java/forge/ai/AiAttackController.java b/forge-ai/src/main/java/forge/ai/AiAttackController.java index e3fe107291f..f497502b85b 100644 --- a/forge-ai/src/main/java/forge/ai/AiAttackController.java +++ b/forge-ai/src/main/java/forge/ai/AiAttackController.java @@ -1085,7 +1085,7 @@ public class AiAttackController { // Is it a creature that has a more valuable ability with a tap cost than what it can do by attacking? if ((attacker.hasSVar("NonCombatPriority")) - && (attacker.hasKeyword("Vigilance"))) { + && (!attacker.hasKeyword("Vigilance"))) { // For each level of priority, enemy has to have life as much as the creature's power // so a priority of 4 means the creature will not attack unless it can defeat that player in 4 successful attacks. // the lower the priroity, the less willing the AI is to use the creature for attacking.