From e0b7ea4960b61d3cdc5a69fa26357ba949b2b185 Mon Sep 17 00:00:00 2001 From: Agetian Date: Sat, 29 Feb 2020 16:49:53 +0300 Subject: [PATCH 1/3] - Added puzzle PS_THB5. --- forge-gui/res/puzzle/PS_THB5.pzl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 forge-gui/res/puzzle/PS_THB5.pzl diff --git a/forge-gui/res/puzzle/PS_THB5.pzl b/forge-gui/res/puzzle/PS_THB5.pzl new file mode 100644 index 00000000000..a418d543eff --- /dev/null +++ b/forge-gui/res/puzzle/PS_THB5.pzl @@ -0,0 +1,17 @@ +[metadata] +Name:Possibility Storm - Theros Beyond Death #05 +URL:https://i2.wp.com/www.possibilitystorm.com/wp-content/uploads/2020/02/148.-THB5-scaled.jpg +Goal:Win +Turns:1 +Difficulty:Rare +Description:Win this turn. You have eight cards remaining in your library. Assume these cards are not relevant to the solution. +[state] +humanlife=20 +ailife=10 +turn=1 +activeplayer=human +activephase=MAIN1 +humanhand=Devious Cover-Up;Dawn of Hope;Frogify;Phoenix of Ash;Sentinel's Eyes +humanlibrary=Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt +humanbattlefield=Fblthp, the Lost;Elspeth, Sun's Nemesis|Counters:LOYALTY=4;Glint-Horn Buccaneer|Id:1;Benthic Biomancer;Heliod, Sun-Crowned;Hallowed Fountain|NoETBTrigs;Hallowed Fountain|NoETBTrigs;Hallowed Fountain|NoETBTrigs;Sacred Foundry|NoETBTrigs;Sacred Foundry|NoETBTrigs;Sacred Foundry|NoETBTrigs +aibattlefield=Hushbringer|Tapped;Bishop of Wings;Gilded Goose;Setessan Champion;Arboreal Grazer;Demotion|AttachedTo:1 From f49d5e23526c3371eca4ed28abed7d4d861eeed4 Mon Sep 17 00:00:00 2001 From: Agetian Date: Sat, 29 Feb 2020 19:25:24 +0300 Subject: [PATCH 2/3] - Better AI targeting for Kenrith, the Returned King's {4}{B} ability. --- forge-gui/res/cardsfolder/k/kenrith_the_returned_king.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui/res/cardsfolder/k/kenrith_the_returned_king.txt b/forge-gui/res/cardsfolder/k/kenrith_the_returned_king.txt index 558bf60f15e..65f72325fcb 100644 --- a/forge-gui/res/cardsfolder/k/kenrith_the_returned_king.txt +++ b/forge-gui/res/cardsfolder/k/kenrith_the_returned_king.txt @@ -6,6 +6,6 @@ A:AB$ PumpAll | Cost$ R | ValidCards$ Creature | KW$ Trample & Haste | SpellDesc A:AB$ PutCounter | Cost$ 1 G | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Put a +1/+1 counter on target creature. A:AB$ GainLife | Cost$ 2 W | LifeAmount$ 5 | ValidTgts$ Player | TgtPrompt$ Choose a player | SpellDescription$ Target player gains 5 life. A:AB$ Draw | Cost$ 3 U | NumCards$ 1 | ValidTgts$ Player | TgtPrompt$ Choose a player | SpellDescription$ Target player draws a card. -A:AB$ ChangeZone | Cost$ 4 B | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Creature | ChangeNum$ 1 | SpellDescription$ Put target creature card from a graveyard onto the battlefield under its owner's control. +A:AB$ ChangeZone | Cost$ 4 B | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Creature | AITgts$ Creature.YouOwn | ChangeNum$ 1 | SpellDescription$ Put target creature card from a graveyard onto the battlefield under its owner's control. DeckHas:Ability$Counters & Ability$LifeGain Oracle:{R}: All creatures gain trample and haste until end of turn.\n{1}{G}: Put a +1/+1 counter on target creature.\n{2}{W}: Target player gains 5 life.\n{3}{U}: Target player draws a card.\n{4}{B}: Put target creature card from a graveyard onto the battlefield under its owner's control. From 4880d70129790c4d144a32ac3a127cb419d63b1c Mon Sep 17 00:00:00 2001 From: Agetian Date: Sat, 29 Feb 2020 19:33:35 +0300 Subject: [PATCH 3/3] - Simple modification for AI PumpAll on Kenrith --- forge-ai/src/main/java/forge/ai/ComputerUtilCard.java | 3 ++- forge-gui/res/cardsfolder/k/kenrith_the_returned_king.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/ComputerUtilCard.java b/forge-ai/src/main/java/forge/ai/ComputerUtilCard.java index 01385c3ca4e..b27476cae09 100644 --- a/forge-ai/src/main/java/forge/ai/ComputerUtilCard.java +++ b/forge-ai/src/main/java/forge/ai/ComputerUtilCard.java @@ -1447,7 +1447,8 @@ public class ComputerUtilCard { } if (pumpedDmg > dmg) { if ((!c.hasKeyword(Keyword.INFECT) && pumpedDmg >= opp.getLife()) - || (c.hasKeyword(Keyword.INFECT) && opp.canReceiveCounters(CounterType.POISON) && pumpedDmg >= opp.getPoisonCounters())) { + || (c.hasKeyword(Keyword.INFECT) && opp.canReceiveCounters(CounterType.POISON) && pumpedDmg >= opp.getPoisonCounters()) + || ("PumpForTrample".equals(sa.getParam("AILogic")))) { return true; } } diff --git a/forge-gui/res/cardsfolder/k/kenrith_the_returned_king.txt b/forge-gui/res/cardsfolder/k/kenrith_the_returned_king.txt index 65f72325fcb..66ff09b0ee5 100644 --- a/forge-gui/res/cardsfolder/k/kenrith_the_returned_king.txt +++ b/forge-gui/res/cardsfolder/k/kenrith_the_returned_king.txt @@ -2,7 +2,7 @@ Name:Kenrith, the Returned King ManaCost:4 W Types:Legendary Creature Human Noble PT:5/5 -A:AB$ PumpAll | Cost$ R | ValidCards$ Creature | KW$ Trample & Haste | SpellDescription$ All creatures gain trample and haste until end of turn. +A:AB$ PumpAll | Cost$ R | ValidCards$ Creature | KW$ Trample & Haste | AILogic$ PumpForTrample | SpellDescription$ All creatures gain trample and haste until end of turn. A:AB$ PutCounter | Cost$ 1 G | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Put a +1/+1 counter on target creature. A:AB$ GainLife | Cost$ 2 W | LifeAmount$ 5 | ValidTgts$ Player | TgtPrompt$ Choose a player | SpellDescription$ Target player gains 5 life. A:AB$ Draw | Cost$ 3 U | NumCards$ 1 | ValidTgts$ Player | TgtPrompt$ Choose a player | SpellDescription$ Target player draws a card.