From e8646000581c840ea9c9ac0669ca5642f79882a1 Mon Sep 17 00:00:00 2001 From: Agetian Date: Sat, 21 Jan 2017 14:30:02 +0000 Subject: [PATCH] - Preventing the AI from spending Phyrexian mana on some abilities on CMC 1 cards with Phyrexian-only mana that are not typically wise to spend Phyrexian on and the AI would generally use the possibility at inappropriate times. --- forge-ai/src/main/java/forge/ai/ComputerUtilMana.java | 3 +++ forge-gui/res/cardsfolder/b/blinding_souleater.txt | 2 +- forge-gui/res/cardsfolder/g/gitaxian_probe.txt | 2 +- forge-gui/res/cardsfolder/g/gut_shot.txt | 2 +- forge-gui/res/cardsfolder/m/marrow_shards.txt | 2 +- forge-gui/res/cardsfolder/m/mental_misstep.txt | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java b/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java index 5091f64313e..8a75abdee08 100644 --- a/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java +++ b/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java @@ -383,6 +383,9 @@ public class ComputerUtilMana { if (!toPay.isPhyrexian() || !ai.canPayLife(2) || (ai.getLife() <= 2 && !ai.cantLoseForZeroOrLessLife())) { break; // cannot pay } + if ("Never".equals(sa.getParam("AIPhyrexianPayment"))) { + break; // unwise to pay + } cost.payPhyrexian(); if (!test) { diff --git a/forge-gui/res/cardsfolder/b/blinding_souleater.txt b/forge-gui/res/cardsfolder/b/blinding_souleater.txt index a98e09a0b9f..cd7f6050615 100644 --- a/forge-gui/res/cardsfolder/b/blinding_souleater.txt +++ b/forge-gui/res/cardsfolder/b/blinding_souleater.txt @@ -2,7 +2,7 @@ Name:Blinding Souleater ManaCost:3 Types:Artifact Creature Cleric PT:1/3 -A:AB$ Tap | Cost$ PW T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature. +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:Picture:http://www.wizards.com/global/images/magic/general/blinding_souleater.jpg diff --git a/forge-gui/res/cardsfolder/g/gitaxian_probe.txt b/forge-gui/res/cardsfolder/g/gitaxian_probe.txt index 2c032cbfe82..8b63d1aaa2d 100644 --- a/forge-gui/res/cardsfolder/g/gitaxian_probe.txt +++ b/forge-gui/res/cardsfolder/g/gitaxian_probe.txt @@ -1,7 +1,7 @@ Name:Gitaxian Probe ManaCost:PU Types:Sorcery -A:SP$ RevealHand | Cost$ PU | ValidTgts$ Player | TgtPrompt$ Select target player | SubAbility$ DBDraw | SpellDescription$ Look at target player's hand. +A:SP$ RevealHand | Cost$ PU | ValidTgts$ Player | TgtPrompt$ Select target player | SubAbility$ DBDraw | AIPhyrexianPayment$ Never | SpellDescription$ Look at target player's hand. SVar:DBDraw:DB$Draw | NumCards$ 1 | SpellDescription$ Draw a card. SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/gitaxian_probe.jpg diff --git a/forge-gui/res/cardsfolder/g/gut_shot.txt b/forge-gui/res/cardsfolder/g/gut_shot.txt index 9b3c7a5af04..870880ef952 100644 --- a/forge-gui/res/cardsfolder/g/gut_shot.txt +++ b/forge-gui/res/cardsfolder/g/gut_shot.txt @@ -1,6 +1,6 @@ Name:Gut Shot ManaCost:PR Types:Instant -A:SP$ DealDamage | Cost$ PR | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature or player. +A:SP$ DealDamage | Cost$ PR | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | AIPhyrexianPayment$ Never | SpellDescription$ CARDNAME deals 1 damage to target creature or player. SVar:Picture:http://www.wizards.com/global/images/magic/general/gut_shot.jpg Oracle:({P/R} can be paid with either {R} or 2 life.)\nGut Shot deals 1 damage to target creature or player. diff --git a/forge-gui/res/cardsfolder/m/marrow_shards.txt b/forge-gui/res/cardsfolder/m/marrow_shards.txt index 0b6a64e36b8..7ba2629f9a5 100644 --- a/forge-gui/res/cardsfolder/m/marrow_shards.txt +++ b/forge-gui/res/cardsfolder/m/marrow_shards.txt @@ -1,6 +1,6 @@ Name:Marrow Shards ManaCost:PW Types:Instant -A:SP$ DamageAll | Cost$ PW | ValidCards$ Creature.attacking | ValidDescription$ each attacking creature. | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to each attacking creature. +A:SP$ DamageAll | Cost$ PW | ValidCards$ Creature.attacking | ValidDescription$ each attacking creature. | NumDmg$ 1 | AIPhyrexianPayment$ Never | SpellDescription$ CARDNAME deals 1 damage to each attacking creature. SVar:Picture:http://www.wizards.com/global/images/magic/general/marrow_shards.jpg Oracle:({P/W} can be paid with either {W} or 2 life.)\nMarrow Shards deals 1 damage to each attacking creature. diff --git a/forge-gui/res/cardsfolder/m/mental_misstep.txt b/forge-gui/res/cardsfolder/m/mental_misstep.txt index 0db68dce71b..2b602649246 100644 --- a/forge-gui/res/cardsfolder/m/mental_misstep.txt +++ b/forge-gui/res/cardsfolder/m/mental_misstep.txt @@ -1,6 +1,6 @@ Name:Mental Misstep ManaCost:PU Types:Instant -A:SP$ Counter | Cost$ PU | TargetType$ Spell | TgtPrompt$ Select target spell with CMC 1 | ValidTgts$ Card.cmcEQ1 | SpellDescription$ Counter target spell with converted mana cost 1. +A:SP$ Counter | Cost$ PU | TargetType$ Spell | TgtPrompt$ Select target spell with CMC 1 | ValidTgts$ Card.cmcEQ1 | AIPhyrexianPayment$ Never | SpellDescription$ Counter target spell with converted mana cost 1. SVar:Picture:http://www.wizards.com/global/images/magic/general/mental_misstep.jpg Oracle:({P/U} can be paid with either {U} or 2 life.)\nCounter target spell with converted mana cost 1.