...
 
Commits (34)
......@@ -8,6 +8,10 @@ public class AnimateAllAi extends SpellAbilityAi {
@Override
protected boolean canPlayAI(Player aiPlayer, SpellAbility sa) {
if ("Always".equals(sa.getParam("AILogic"))) {
return true;
}
return false;
} // end animateAllCanPlayAI()
......
......@@ -178,10 +178,16 @@ public class CloneAi extends SpellAbilityAi {
final boolean isOpp = cloneTarget.getController().isOpponentOf(sa.getActivatingPlayer());
final boolean isVesuva = "Vesuva".equals(host.getName());
final boolean canCloneLegendary = "True".equalsIgnoreCase(sa.getParam("NonLegendary"));
final String filter = !isVesuva ? "Permanent.YouDontCtrl,Permanent.nonLegendary"
String filter = !isVesuva ? "Permanent.YouDontCtrl,Permanent.nonLegendary"
: "Permanent.YouDontCtrl+notnamedVesuva,Permanent.nonLegendary+notnamedVesuva";
// TODO: rewrite this block so that this is done somehow more elegantly
if (canCloneLegendary) {
filter = filter.replace(".nonLegendary+", ".").replace(".nonLegendary", "");
}
CardCollection newOptions = CardLists.getValidCards(options, filter.split(","), ctrl, host, sa);
if (!newOptions.isEmpty()) {
options = newOptions;
......
......@@ -74,6 +74,7 @@ public class CopyPermanentAi extends SpellAbilityAi {
final Player activator = sa.getActivatingPlayer();
final Game game = host.getGame();
final String sourceName = ComputerUtilAbility.getAbilitySourceName(sa);
final boolean canCopyLegendary = sa.hasParam("NonLegendary");
// ////
......@@ -114,7 +115,7 @@ public class CopyPermanentAi extends SpellAbilityAi {
list = CardLists.filter(list, new Predicate<Card>() {
@Override
public boolean apply(final Card c) {
return !c.getType().isLegendary() || !c.getController().equals(aiPlayer);
return (!c.getType().isLegendary() || canCopyLegendary) || !c.getController().equals(aiPlayer);
}
});
Card choice;
......@@ -180,7 +181,8 @@ public class CopyPermanentAi extends SpellAbilityAi {
private CardCollection getBetterOptions(Player ai, SpellAbility sa, Iterable<Card> options, boolean isOptional) {
final Card host = sa.getHostCard();
final Player ctrl = host.getController();
final String filter = "Permanent.YouDontCtrl,Permanent.nonLegendary";
final boolean canCopyLegendary = sa.hasParam("NonLegendary");
final String filter = canCopyLegendary ? "Permanent" : "Permanent.YouDontCtrl,Permanent.nonLegendary";
// TODO add filter to not select Legendary from Other Player when ai already have a Legendary with that name
return CardLists.getValidCards(options, filter.split(","), ctrl, host, sa);
}
......
......@@ -26,7 +26,7 @@ public class RearrangeTopOfLibraryAi extends SpellAbilityAi {
final PhaseHandler ph = aiPlayer.getGame().getPhaseHandler();
final Card source = sa.getHostCard();
if (source.isPermanent() && sa.getPayCosts() != null
if (source.isPermanent() && sa.getRestrictions().isInstantSpeed() && sa.getPayCosts() != null
&& (sa.getPayCosts().hasTapCost() || sa.getPayCosts().hasManaCost())) {
// If it has an associated cost, try to only do this before own turn
if (!(ph.is(PhaseType.END_OF_TURN) && ph.getNextTurn() == aiPlayer)) {
......
......@@ -79,4 +79,5 @@ Core Set 2019, 3/6/M19, M19
Guilds of Ravnica, 3/6/GRN, GRN
Ultimate Masters, 3/6/M19, UMA
Ravnica Allegiance, 3/6/RNA, RNA
War of the Spark, 3/6/WAR, WAR
\ No newline at end of file
War of the Spark, 3/6/WAR, WAR
Modern Horizons, 3/6/WAR, MH1
\ No newline at end of file
Name:Ob Nixilis's Cruelty
ManaCost:2 B
Types:Instant
A:SP$ Pump | Cost$ 2 B | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -5 | NumDef$ -5 | IsCurse$ True | ReplaceDyingValid$ Creature | SpellDescription$ Target creature gets -5/-5 until end of turn. If that creature would die this turn, exile it instead.
A:SP$ Pump | Cost$ 2 B | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -5 | NumDef$ -5 | IsCurse$ True | ReplaceDyingDefined$ Targeted | SpellDescription$ Target creature gets -5/-5 until end of turn. If that creature would die this turn, exile it instead.
Oracle:Target creature gets -5/-5 until end of turn. If that creature would die this turn, exile it instead.
......@@ -5,7 +5,7 @@ Loyalty:5
T:Mode$ Attacks | ValidCard$ Creature | Attacked$ You,Planeswalker.YouCtrl | TriggerZones$ Battlefield | Execute$ TrigDamage | TriggerDescription$ Whenever a creature attacks you or a planeswalker you control, each Dragon you control deals 1 damage to that creature.
SVar:TrigDamage:DB$ EachDamage | ValidCards$ Dragon.YouCtrl | DefinedPlayers$ TriggeredAttacker | StackDescription$ Each Dragon you control deals 1 damage to that creature. | References$ X
SVar:X:Number$1
A:AB$ AnimateAll | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | Power$ 4 | Toughness$ 4 | Types$ Creature,Dragon | Colors$ Red | OverwriteColors$ True | RemoveCardTypes$ True | Keywords$ Flying | ValidCards$ Planeswalker.YouCtrl | SpellDescription$ Until end of turn, each planeswalker you control becomes a 4/4 red Dragon creature and gains flying.
A:AB$ AnimateAll | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | Power$ 4 | Toughness$ 4 | Types$ Creature,Dragon | Colors$ Red | OverwriteColors$ True | RemoveCardTypes$ True | Keywords$ Flying | ValidCards$ Planeswalker.YouCtrl | AILogic$ Always | SpellDescription$ Until end of turn, each planeswalker you control becomes a 4/4 red Dragon creature and gains flying.
A:AB$ Token | Cost$ SubCounter<3/LOYALTY> | TokenAmount$ 1 | TokenScript$ r_4_4_dragon_flying | TokenOwner$ You | Planeswalker$ True | SpellDescription$ Create a 4/4 red Dragon creature token with flying.
DeckHas:Ability$Token
Oracle:Whenever a creature attacks you or a planeswalker you control, each Dragon you control deals 1 damage to that creature.\n+1: Until end of turn, each planeswalker you control becomes a 4/4 red Dragon creature and gains flying.\n−3: Create a 4/4 red Dragon creature token with flying.
\ No newline at end of file
Name:Ayula's Influence
ManaCost:G G G
Types:Enchantment
A:AB$ Token | Cost$ Discard<1/Land> | TokenAmount$ 1 | TokenScript$ g_2_2_bear | TokenOwner$ You | LegacyImage$ g 2 2 bear mh1 | SpellDescription$ Create a 2/2 green Bear creature token.
AI:RemoveDeck:Random
Oracle:Discard a land card: Create a 2/2 green Bear creature token.
Name:Changeling Outcast
ManaCost:B
Types:Creature Shapeshifter
PT:1/1
K:Changeling
K:CARDNAME can't block.
K:Unblockable
Oracle:Changeling (This card is every creature type.)\nChangeling Outcast can't block and can't be blocked.
Name:Cloudshredder Sliver
ManaCost:R W
Types:Creature Sliver
PT:1/1
S:Mode$ Continuous | Affected$ Creature.Sliver+YouCtrl | AddKeyword$ Flying & Haste | Description$ Sliver creatures you control have flying and haste.
SVar:PlayMain1:TRUE
Oracle:Sliver creatures you control have flying and haste.
Name:Etchings of the Chosen
ManaCost:1 W B
Types:Enchantment
K:ETBReplacement:Other:ChooseCT
SVar:ChooseCT:DB$ ChooseType | Defined$ You | Type$ Creature | SpellDescription$ As CARDNAME enters the battlefield, choose a creature type. | AILogic$ MostProminentInComputerDeck
S:Mode$ Continuous | Affected$ Creature.ChosenType+YouCtrl | AddPower$ 1 | AddToughness$ 1 | Description$ Creatures you control of the chosen type get +1/+1.
AI:RemoveDeck:Random
SVar:PlayMain1:TRUE
A:AB$ Pump | Cost$ 1 W B Sac<1/Creature.ChosenType/creature of the chosen type> | ValidTgts$ Creature | TgtPrompt$ Select target creature you control | KW$ Indestructible | SpellDescription$ Target creature you control gains indestructible until end of turn.
Oracle:As Etchings of the Chosen enters the battlefield, choose a creature type.\nCreatures you control of the chosen type get +1/+1.\n{1}, Sacrifice a creature of the chosen type: Target creature you control gains indestructible until end of turn.
......@@ -5,4 +5,4 @@ PT:3/3
K:Convoke
K:Flying
K:Devour:2
Oracle:Convoke (Your creatures can help cast this spell. Each creature you tap while casting this spells pays for 1 or one mana of that creature's color.)\nFlying\nDevour 2 (As this enters the battlefield, you may sacrifice any number of creatures. This creature entersthe battlefield with twice that many +1/+1 counters on it.)
Oracle:Convoke (Your creatures can help cast this spell. Each creature you tap while casting this spell pays for {1} or one mana of the creature's color.)\nFlying\nDevour 2 (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with twice that many +1/+1 counters on it.)
Name:Force of Rage
ManaCost:1 R R
Types:Instant
SVar:AltCost:Cost$ ExileFromHand<1/Card.Red> | OpponentTurn$ True | Description$ If it's not your turn, you may exile a red card from your hand rather than pay this spell's mana cost.
A:SP$ Token | Cost$ 1 R R | TokenAmount$ 2 | TokenScript$ r_3_1_elemental_trample_haste | TokenOwner$ You | LegacyImage$ r 3 1 elemental trample haste mh1 | SubAbility$ DelayedSac | RememberTokens$ True | SpellDescription$ Create two 3/1 red Elemental creature tokens with trample and haste. Sacrifice those tokens at the beginning of your next upkeep.
SVar:DelayedSac:DB$ DelayedTrigger | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ DBSacToken | RememberObjects$ Remembered | SubAbility$ DBCleanup | TriggerDescription$ Sacrifice those tokens at the beginning of your next upkeep.
SVar:DBSacToken:DB$ SacrificeAll | Defined$ DelayTriggerRemembered | Controller$ You
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
Oracle:If it's not your turn, you may exile a red card from your hand rather than pay this spell's mana cost.\nCreate two 3/1 red Elemental creature tokens with trample and haste. Sacrifice those tokens at the beginning of your next upkeep.
Name:Frostwalk Bastion
ManaCost:no cost
Types:Snow Land
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
A:AB$ Animate | Cost$ 1 S | Defined$ Self | Power$ 2 | Toughness$ 3 | Types$ Creature,Artifact,Construct | Permanent$ True | SpellDescription$ Until end of turn, CARDNAME becomes a 2/3 Construct artifact creature. It's still a land. ({S} can be paid with one mana from a snow permanent.)
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Creature | CombatDamage$ True | TriggerZones$ Battlefield | Execute$ TrigTap | TriggerDescription$ Whenever CARDNAME deals combat damage to a creature, tap that creature and it doesn't untap during its controller's next untap step.
SVar:TrigTap:DB$Tap | Defined$ TriggeredTarget | SubAbility$ DBPump
SVar:DBPump:DB$Pump | Defined$ TriggeredTarget | KW$ HIDDEN This card doesn't untap during your next untap step. | Permanent$ True | IsCurse$ True
SVar:HasCombatEffect:TRUE
Oracle:{T}: Add {C}.\n{1}{S}: Until end of turn, Frostwalk Bastion becomes a 2/3 Construct artifact creature. It's still a land. ({S} can be paid with one mana from a snow permanent.)\nWhenever Frostwalk Bastion deals combat damage to a creature, tap that creature and it doesn't untap during its controller's next untap step.
Name:Generous Gift
ManaCost:2 W
Types:Instant
A:SP$ Destroy | Cost$ 2 W | ValidTgts$ Permanent | TgtPrompt$ Select target permanent | AITgts$ Card.cmcGE4 | SubAbility$ DBToken | SpellDescription$ Destroy target permanent. Its controller creates a 3/3 green Elephant creature token.
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ g_3_3_elephant | TokenOwner$ TargetedController | LegacyImage$ g 3 3 elephant mh1 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
Oracle:Destroy target permanent. Its controller creates a 3/3 green Elephant creature token.
Name:Goatnap
ManaCost:2 R
Types:Sorcery
A:SP$ GainControl | Cost$ 2 R | ValidTgts$ Creature | TgtPrompt$ Select target creature | Untap$ True | LoseControl$ EOT | SubAbility$ DBPump | SpellDescription$ Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. If that creature is a, it also gets +3/+0 until end of turn.
SVar:DBPump:DB$ Pump | Defined$ Targeted | NumAtt$ 3 | ConditionCheckSVar$ X | ConditionSVarCompare$ GE1 | References$ X
SVar:X:Targeted$Valid Goat
Oracle:Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. If that creature is a goat, it also gets +3/+0 until end of turn.
Name:Hollowhead Sliver
ManaCost:2 R
Types:Creature Sliver
PT:2/2
S:Mode$ Continuous | Affected$ Creature.Sliver+YouCtrl | AddAbility$ Rummage | Description$ Sliver creatures you control have "{T}, Discard a card: Draw a card."
SVar:Rummage:AB$ Draw | Cost$ T Discard<1/Card> | NumCards$ 1 | SpellDescription$ Draw a card.
SVar:PlayMain1:TRUE
SVar:BuffedBy:Sliver
Oracle:Sliver creatures you control have "{T}, Discard a card: Draw a card."
Name:King of the Pride
ManaCost:2 W
Types:Creature Cat
PT:2/1
S:Mode$ Continuous | Affected$ Cat.Other+YouCtrl | AddPower$ 2 | AddToughness$ 1 | Description$ Other Cats you control get +2/+1.
SVar:PlayMain1:TRUE
SVar:BuffedBy:Cat
Oracle:Other Cats you control get +2/+1.
......@@ -4,4 +4,4 @@ Types:Creature Bear
PT:2/2
A:AB$ Token | Cost$ 3 G G ExileFromGrave<1/CARDNAME> | ActivationZone$ Graveyard | SorcerySpeed$ True | TokenAmount$ 2 | TokenScript$ g_2_2_bear | TokenOwner$ You | LegacyImage$ g 2 2 bear mh1 | SpellDescription$ Create two 2/2 green Bear creature tokens. Activate this ability only any time you could cast a sorcery.
DeckHas:Ability$Token
Oracle:{3}{G}{G}, Exile Mother Bear from your graveyard: Create two 2/2 green Bear creature tokens. Activate this ability only any time you could cast a sorcery.
\ No newline at end of file
Oracle:{3}{G}{G}, Exile Mother Bear from your graveyard: Create two 2/2 green Bear creature tokens. Activate this ability only any time you could cast a sorcery.
\ No newline at end of file
......@@ -3,4 +3,4 @@ ManaCost:no cost
Types:Artifact
K:Suspend:3:0
A:AB$ Mana | Cost$ T | Produced$ Any | SpellDescription$ Add one mana of any color.
Oracle:Suspend 3 - 0 (Rather than cast this card from your hand, pay 0 and exile it with three time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost.) \n{T}: Add one mana of any color.
\ No newline at end of file
Oracle:Suspend 3—{0} (Rather than cast this card from your hand, pay {0} and exile it with three time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost.)\n{T}: Add one mana of any color.
Name:Plague Engineer
ManaCost:2 B
Types:Creature Carrier
PT:2/2
K:Deathtouch
K:ETBReplacement:Other:ChooseCT
SVar:ChooseCT:DB$ ChooseType | Defined$ You | Type$ Creature | AILogic$ MostProminentOppControls | SpellDescription$ As CARDNAME enters the battlefield, choose a creature type. | StackDescription$ SpellDescription
AI:RemoveDeck:Random
S:Mode$ Continuous | Affected$ Creature.ChosenType+OppCtrl | AddPower$ -1 | AddToughness$ -1 | Description$ Creatures of the chosen type your opponents control get -1/-1.
SVar:PlayMain1:TRUE
Oracle:Deathtouch\nAs Plague Engineer enters the battlefield, choose a creature type.\nCreatures of the chosen type your opponents control get -1/-1.
Name:Ravenous Giant
ManaCost:2 R R
Types:Creature Giant
PT:5/5
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDealDamage | TriggerDescription$ At the beginning of your upkeep, CARDNAME deals 1 damage to you.
SVar:TrigDealDamage:DB$DealDamage | Defined$ You | NumDmg$ 1
Oracle:At the beginning of your upkeep, Ravenous Giant deals 1 damage to you.
Name:Scale Up
ManaCost:G
Types:Sorcery
A:SP$ Animate | Cost$ G | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | Power$ 6 | Toughness$ 4 | Colors$ Green | OverwriteColors$ True | Types$ Wurm | SpellDescription$ Until end of turn, target creature you control becomes a green Wurm with base power and toughness 6/4.
A:SP$ AnimateAll | Cost$ 4 G G | PrecostDesc$ Overload | CostDesc$ {4}{G}{G} | ValidCards$ Creature.YouCtrl | Power$ 6 | Toughness$ 4 | Colors$ Green | OverwriteColors$ True | Types$ Wurm | SpellDescription$ Until end of turn, target creature you control becomes a green Wurm with base power and toughness 6/4.
Oracle:Until end of turn, target creature you control becomes a green Wurm with base power and toughness 6/4.\nOverload {4}{G}{G}
Name:Thundering Djinn
ManaCost:3 U R
Types:Creature Djinn
PT:3/4
K:Flying
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigDamage | TriggerDescription$ Whenever CARDNAME attacks, it deals damage to any target equal to the number of cards you've drawn this turn.
SVar:TrigDamage:DB$ DealDamage | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target | NumDmg$ X | References$ X
SVar:X:Count$YouDrewThisTurn
AI:RemoveDeck:All
Oracle:Flying\nWhenever Thundering Djinn attacks, it deals damage to any target equal to the number of cards you've drawn this turn.
[metadata]
Code=MH1
Date=2019-6-14
Date=2019-06-14
Name=Modern Horizons
Code2=MH1
MciCode=mh1
Type=Other
Booster=10 Common, 3 Uncommon, 1 RareMythic, 1 BasicLand
[cards]
1 M Morophon, the Boundless
3 R Astral Drift
4 U Battle Screech
5 U Dismantling Blow
10 R Force of Virtue
11 U Generous Gift
13 R Giver of Runes
14 C Impostor of the Sixth Pride
16 U King of the Pride
19 C Martyr's Soul
21 M Ranger-Captain of Eos
26 M Serra the Benevolent
29 R Sisay, Weatherlight Captain
31 U Splicer's Skill
36 C Wall of One Thousand Cuts
37 R Winds of Abandon
38 U Wing Shards
39 U Zhalfirin Decoy
40 R Archmage's Charm
41 R Bazaar Trademage
43 C Chillerpillar
44 C Choking Tethers
48 U Exclude
......@@ -30,32 +40,50 @@ Type=Other
71 C Stream of Thought
75 M Urza, Lord High Artificer
80 R Cabal Therapist
82 C Changeling Outcast
84 U Crypt Rats
87 C Diabolic Edict
88 U Dregscape Sliver
90 U Feaster of Fools
92 R Force of Despair
95 C Headless Specter
100 R Plague Engineer
111 C Umezawa's Charm
112 U Undead Augur
114 C Venomous Changeling
118 R Blazing Chant
118 R Aria of Flame
122 U Firebolt
123 C Fists of Flame
124 R Force of Rage
126 C Goatnap
128 R Goblin Engineer
129 U Goblin Matron
131 C Goblin War Party
132 U Hollowhead Sliver
134 C Lava Dart
140 R Planebound Accomplice
141 C Pyrophobia
143 U Ravenous Giant
145 M Seasoned Pyromancer
155 R Ayula, Queen Among Bears
156 R Ayula's Influence
161 R Deep Forest Hermit
162 C Elvish Fury
164 R Force of Vigor
166 R Genesis
167 U Glacial Revelation
168 M Hexdrinker
171 C Mother Bear
174 C Nimble Mongoose
175 U Regrowth
178 C Savage Swipe
179 U Scale Up
180 C Spore Frog
182 U Squirrel Nest
183 U Tempered Sliver
189 M Unbound Flourishing
194 U Abominable Treefolk
195 R Cloudshredder Sliver
196 R Collected Conjuring
198 U Etchings of the Chosen
200 M The First Sliver
......@@ -65,8 +93,13 @@ Type=Other
208 R Lightning Skelemental
209 U Munitions Expert
215 U Thundering Djinn
217 M Wrenn and Six
218 R Altar of Dementia
222 U Farmstead Gleaner
226 M Mox Tantalite
227 R Scrapyard Recombiner
238 R Fiery Islet
240 U Frostwalk Bastion
243 R Nurturing Peatland
244 R Prismatic Vista
246 R Silent Clearing
......@@ -82,5 +115,9 @@ Type=Other
[tokens]
w_4_4_angel_flying_vigilance
c_0_0_a_construct_total_artifacts
g_1_1_squirrel
r_1_1_goblin
g_2_2_bear
r_1_1_elemental
g_3_3_elephant
[metadata]
Name:Possibility Storm - War of the Spark #03
URL:http://www.possibilitystorm.com/wp-content/uploads/2019/05/113.-WAR3.jpg
Goal:Win
Turns:1
Difficulty:Uncommon
Description:Win this turn. Assume your opponent has no mana available.
[state]
humanlife=20
ailife=10
turn=1
activeplayer=human
activephase=MAIN1
humanhand=Entrancing Melody;Heroic Reinforcements;Wanderer's Strike;Integrity // Intervention
humanbattlefield=Havoc Devils;Feather, the Redeemed;Ral, Storm Conduit|Counters:LOYALTY=2;The Wanderer|Counters:LOYALTY=1;Steam Vents|NoETBTrigs;Steam Vents|NoETBTrigs;Steam Vents|NoETBTrigs;Sacred Foundry|NoETBTrigs;Sacred Foundry|NoETBTrigs
aibattlefield=Saheeli, Sublime Artificer|Counters:LOYALTY=3;t:Servo,P:1,T:1,Cost:no cost,Color:C,Types:Artifact-Creature-Servo,Keywords:,Image:c_1_1_a_servo_war;t:Servo,P:1,T:1,Cost:no cost,Color:C,Types:Artifact-Creature-Servo,Keywords:,Image:c_1_1_a_servo_war;Kinjalli's Sunwing;Goblin Assault Team