- RemAIDeck update: next iteration.

This commit is contained in:
Agetian
2017-10-05 06:35:39 +00:00
parent 0257acce1d
commit d8ec34aa6f
24 changed files with 41 additions and 32 deletions

View File

@@ -669,7 +669,7 @@ public class SpecialCardAi {
}
}
// Living Death (and possibly other similar cards using AILogic LivingDeath)
// Living Death (and other similar cards using AILogic LivingDeath or AILogic ReanimateAll)
public static class LivingDeath {
public static boolean consider(final Player ai, final SpellAbility sa) {
int aiBattlefieldPower = 0, aiGraveyardPower = 0;

View File

@@ -92,6 +92,8 @@ public class ChangeZoneAi extends SpellAbilityAi {
return SpecialCardAi.Necropotence.consider(aiPlayer, sa);
} else if (aiLogic.equals("SameName")) { // Declaration in Stone
return this.doSameNameLogic(aiPlayer, sa);
} else if (aiLogic.equals("ReanimateAll")) {
return SpecialCardAi.LivingDeath.consider(aiPlayer, sa);
} else if (aiLogic.equals("Intuition")) {
// This logic only fills the multiple cards array, the decision to play is made
// separately in hiddenOriginCanPlayAI later.

View File

@@ -10,6 +10,7 @@ import forge.ai.SpellAbilityAi;
import forge.game.ability.AbilityUtils;
import forge.game.card.*;
import forge.game.card.CardPredicates.Presets;
import forge.game.phase.PhaseHandler;
import forge.game.phase.PhaseType;
import forge.game.player.Player;
import forge.game.player.PlayerActionConfirmMode;
@@ -24,12 +25,19 @@ public class CopyPermanentAi extends SpellAbilityAi {
// Card source = sa.getHostCard();
// TODO - I'm sure someone can do this AI better
PhaseHandler ph = aiPlayer.getGame().getPhaseHandler();
String aiLogic = sa.getParamOrDefault("AILogic", "");
if (ComputerUtil.preventRunAwayActivations(sa)) {
return false;
}
if ("MimicVat".equals(sa.getParam("AILogic"))) {
if ("MimicVat".equals(aiLogic)) {
return SpecialCardAi.MimicVat.considerCopy(aiPlayer, sa);
} else if ("AtEOT".equals(aiLogic)) {
return ph.is(PhaseType.END_OF_TURN);
} else if ("AtOppEOT".equals(aiLogic)) {
return ph.is(PhaseType.END_OF_TURN) && ph.getPlayerTurn() != aiPlayer;
}
if (sa.hasParam("AtEOT") && !aiPlayer.getGame().getPhaseHandler().is(PhaseType.MAIN1)) {

View File

@@ -2,7 +2,7 @@ Name:Pack's Disdain
ManaCost:1 B
Types:Instant
A:SP$ ChooseType | Cost$ 1 B | Defined$ You | Type$ Creature | SubAbility$ DBPump| SpellDescription$ Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.
SVar:DBPump:DB$ Pump | Cost$ 0 | NumAtt$ -X | NumDef$ -X | References$ X | ValidTgts$ Creature | TgtPrompt$ Select target creature.
SVar:DBPump:DB$ Pump | NumAtt$ -X | NumDef$ -X | References$ X | ValidTgts$ Creature | TgtPrompt$ Select target creature.
SVar:X:Count$Valid Permanent.ChosenType+YouCtrl
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/packs_disdain.jpg

View File

@@ -4,6 +4,6 @@ Types:Creature Spirit
PT:2/2
A:AB$ DealDamage | Cost$ X R Sac<1/CARDNAME> | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ X | References$ X | SpellDescription$ CARDNAME deals X damage to target creature.
SVar:X:Count$xPaid
SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/pain_kami.jpg
Oracle:{X}{R}, Sacrifice Pain Kami: Pain Kami deals X damage to target creature.

View File

@@ -5,6 +5,5 @@ Text:Cast CARDNAME only during combat before blockers are declared.
A:SP$ Pump | Cost$ R | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ HIDDEN CARDNAME can't block. | ActivationPhases$ BeginCombat->Declare Attackers | IsCurse$ True | SpellDescription$ Target creature can't block this turn. Draw a card at the beginning of the next turn's upkeep. | SubAbility$ DelTrigSlowtrip
SVar:DelTrigSlowtrip:DB$ DelayedTrigger | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | Execute$ DrawSlowtrip | TriggerDescription$ Draw a card.
SVar:DrawSlowtrip:DB$Draw | NumCards$ 1 | Defined$ You
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/panic.jpg
Oracle:Cast Panic only during combat before blockers are declared.\nTarget creature can't block this turn.\nDraw a card at the beginning of the next turn's upkeep.

View File

@@ -2,7 +2,8 @@ Name:Peace of Mind
ManaCost:1 W
Types:Enchantment
A:AB$ GainLife | Cost$ W Discard<1/Card> | LifeAmount$ 3 | SpellDescription$ You gain 3 life.
SVar:RemAIDeck:True
SVar:AIPreference:DiscardCost$Card
DeckHints:Ability$Discard
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/peace_of_mind.jpg
Oracle:{W}, Discard a card: You gain 3 life.

View File

@@ -2,6 +2,6 @@ Name:Peer Through Depths
ManaCost:1 U
Types:Instant Arcane
A:SP$ Dig | Cost$ 1 U | DigNum$ 5 | ChangeNum$ 1 | Optional$ True | ChangeValid$ Instant,Sorcery | SpellDescription$ Look at the top five cards of your library. You may reveal an instant or sorcery card from among them and put it into your hand. Put the rest on the bottom of your library in any order.
SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/peer_through_depths.jpg
Oracle:Look at the top five cards of your library. You may reveal an instant or sorcery card from among them and put it into your hand. Put the rest on the bottom of your library in any order.

View File

@@ -6,6 +6,9 @@ SVar:DBChoose:DB$ ChooseCard | Defined$ Remembered | Amount$ 1 | Choices$ Creatu
SVar:DBChoose2:DB$ ChooseCard | Defined$ Remembered | Amount$ 1 | Choices$ Creature.nonArtifact+IsNotRemembered+RememberedPlayerCtrl | Mandatory$ True | RememberChosen$ True | ChoiceTitle$ Choose target nonartifact creature | AILogic$ WorstCard
SVar:DBSacAll:DB$ SacrificeAll | ValidCards$ Permanent.IsRemembered | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:RemAIDeck:True
SVar:NeedsToPlayVar:Z GE2
SVar:Z:SVar$Z1/Plus.Z2
SVar:Z1:Count$Valid Creature.nonArtifact+OppCtrl/LimitMax.1
SVar:Z2:Count$Valid Creature.Artifact+OppCtrl/LimitMax.1
SVar:Picture:http://www.wizards.com/global/images/magic/general/perilous_predicament.jpg
Oracle:Each opponent sacrifices an artifact creature and a nonartifact creature.

View File

@@ -3,6 +3,6 @@ ManaCost:1 B G
Types:Enchantment
A:AB$ DestroyAll | Cost$ X Sac<1/CARDNAME> | ValidCards$ Artifact.cmcLEX,Creature.cmcLEX,Enchantment.cmcLEX | References$ X | SpellDescription$ Destroy each artifact, creature, and enchantment with converted mana cost X or less.
SVar:X:Count$xPaid
SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/pernicious_deed.jpg
Oracle:{X}, Sacrifice Pernicious Deed: Destroy each artifact, creature, and enchantment with converted mana cost X or less.

View File

@@ -3,6 +3,5 @@ ManaCost:G
Types:Sorcery
A:SP$ ChangeZone | Cost$ G | Origin$ Graveyard | Destination$ Library | TargetMin$ 0 | TargetMax$ X | References$ X | Shuffle$ True | TgtPrompt$ Choose target creature card in your graveyard | ValidTgts$ Creature.YouCtrl | SpellDescription$ Shuffle any number of target creature cards from your graveyard into your library.
SVar:X:Count$TypeInYourYard.Creature
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/pipers_melody.jpg
Oracle:Shuffle any number of target creature cards from your graveyard into your library.

View File

@@ -2,11 +2,11 @@ Name:Porphyry Nodes
ManaCost:W
Types:Enchantment
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigChooseOneToDestroy | TriggerDescription$ At the beginning of your upkeep, destroy the creature with the least power. It can't be regenerated. If two or more creatures are tied for least power, you choose one of them.
SVar:TrigChooseOneToDestroy:AB$ ChooseCard | Cost$ 0 | Choices$ Creature.leastPower+withoutIndestructible | Mandatory$ True | SubAbility$ DBDestroy
SVar:TrigChooseOneToDestroy:DB$ ChooseCard | Choices$ Creature.leastPower+withoutIndestructible | Mandatory$ True | SubAbility$ DBDestroy
SVar:DBDestroy:DB$ Destroy | Defined$ ChosenCard | NoRegen$ True
T:Mode$ Always | TriggerZones$ Battlefield | IsPresent$ Creature | PresentCompare$ EQ0 | Execute$ TrigSac | TriggerDescription$ When there are no creatures on the battlefield, sacrifice CARDNAME.
SVar:TrigSac:AB$Sacrifice | Cost$ 0 | Defined$ Self
SVar:TrigSac:DB$ Sacrifice | Defined$ Self
SVar:NeedsToPlay:Creature.YouDontCtrl+leastPower
SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/porphyry_nodes.jpg
Oracle:At the beginning of your upkeep, destroy the creature with the least power. It can't be regenerated. If two or more creatures are tied for least power, you choose one of them.\nWhen there are no creatures on the battlefield, sacrifice Porphyry Nodes.

View File

@@ -4,8 +4,7 @@ Types:Enchantment Aura
K:Enchant enchantment
A:SP$ Attach | Cost$ 1 U | ValidTgts$ Enchantment | AILogic$ Curse
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ EnchantedController | Execute$ TrigLoseLife | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of the upkeep of enchanted enchantment's controller, that player loses 2 life unless he or she pays {2}.
SVar:TrigLoseLife:AB$ LoseLife | Cost$ 0 | Defined$ TriggeredPlayer | LifeAmount$ 2 | UnlessCost$ 2 | UnlessPayer$ EnchantedController
SVar:TrigLoseLife:DB$ LoseLife | Defined$ TriggeredPlayer | LifeAmount$ 2 | UnlessCost$ 2 | UnlessPayer$ EnchantedController
K:Cycling:2
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/power_taint.jpg
Oracle:Enchant enchantment\nAt the beginning of the upkeep of enchanted enchantment's controller, that player loses 2 life unless he or she pays {2}.\nCycling {2} ({2}, Discard this card: Draw a card.)

View File

@@ -4,10 +4,10 @@ Types:Enchantment Aura
K:Enchant creature
A:SP$ Attach | Cost$ G | ValidTgts$ Creature | AILogic$ Pump
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a +1/+1 counter on enchanted creature.
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Enchanted | CounterType$ P1P1 | CounterNum$ 1
SVar:TrigPutCounter:DB$ PutCounter | Defined$ Enchanted | CounterType$ P1P1 | CounterNum$ 1
T:Mode$ Attacks | ValidCard$ Card.AttachedBy | Execute$ TrigSac | TriggerDescription$ When enchanted creature attacks or blocks, sacrifice Primal Cocoon.
T:Mode$ Blocks | ValidCard$ Card.AttachedBy | Execute$ TrigSac | Secondary$ True | TriggerDescription$ When enchanted creature attacks or blocks, sacrifice Primal Cocoon.
SVar:TrigSac:AB$ Sacrifice | Cost$ 0 | Defined$ Self
SVar:TrigSac:DB$ Sacrifice | Defined$ Self
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/primal_cocoon.jpg
Oracle:Enchant creature\nAt the beginning of your upkeep, put a +1/+1 counter on enchanted creature.\nWhen enchanted creature attacks or blocks, sacrifice Primal Cocoon.

View File

@@ -5,6 +5,5 @@ A:SP$ Protection | Cost$ X W U | TargetMin$ 0 | TargetMax$ MaxTgts | References$
# It may seem wrong to not use X in the target, but since the Targets are what defines X, it's redundant (and not supported by the code)
SVar:X:Targeted$Amount
SVar:MaxTgts:Count$Valid Creature
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/prismatic_boon.jpg
Oracle:Choose a color. X target creatures gain protection from the chosen color until end of turn.

View File

@@ -3,10 +3,10 @@ ManaCost:4 G U
Types:Creature Shapeshifter
PT:0/0
K:ETBReplacement:Copy:ChooseCreature:Optional
SVar:ChooseCreature:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | SpellDescription$ You may have Progenitor Mimic enter the battlefield as a copy of any creature on the battlefield, except it gains "At the beginning of your upkeep, if this creature isn't a token, create a token that's a copy of this creature."
SVar:ChooseCreature:DB$ ChooseCard | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | SpellDescription$ You may have Progenitor Mimic enter the battlefield as a copy of any creature on the battlefield, except it gains "At the beginning of your upkeep, if this creature isn't a token, create a token that's a copy of this creature."
SVar:DBCopy:DB$ Clone | Defined$ ChosenCard | AddTriggers$ ProgenitorTrig | AddSVars$ ProgenitorCopy,ProgenitorTrig
SVar:ProgenitorTrig:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ ProgenitorCopy | IsPresent$ Card.Self+nonToken | TriggerDescription$ At the beginning of your upkeep, if CARDNAME isn't a token, create a token that's a copy of CARDNAME."
SVar:ProgenitorCopy:AB$ CopyPermanent | Cost$ 0 | Defined$ Self | NumCopies$ 1
SVar:RemAIDeck:True
SVar:ProgenitorCopy:DB$ CopyPermanent | Defined$ Self | NumCopies$ 1
SVar:NeedsToPlay:Creature.inZoneBattlefield
SVar:Picture:http://www.wizards.com/global/images/magic/general/progenitor_mimic.jpg
Oracle:You may have Progenitor Mimic enter the battlefield as a copy of any creature on the battlefield, except it gains "At the beginning of your upkeep, if this creature isn't a token, create a token that's a copy of this creature."

View File

@@ -3,6 +3,5 @@ ManaCost:2 U
Types:Artifact
A:AB$ ChangeZone | Cost$ 4 W T Sac<1/CARDNAME> | TgtPrompt$ Choose target artifact card in your graveyard | ValidTgts$ Artifact.YouCtrl | Origin$ Graveyard | Destination$ Battlefield | SpellDescription$ Return target artifact card from your graveyard to the battlefield.
SVar:RemRandomDeck:True
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/protomatter_powder.jpg
Oracle:{4}{W}, {T}, Sacrifice Protomatter Powder: Return target artifact card from your graveyard to the battlefield.

View File

@@ -2,13 +2,15 @@ Name:Prototype Portal
ManaCost:4
Types:Artifact
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | OptionalDecider$ You | Execute$ TrigExile | TriggerDescription$ Imprint — When CARDNAME enters the battlefield, you may exile an artifact card from your hand.
SVar:TrigExile:AB$ChangeZone | Cost$ 0 | Imprint$ True | Origin$ Hand | Destination$ Exile | ChangeType$ Artifact | ChangeNum$ 1
A:AB$CopyPermanent | Cost$ X T | Defined$ Imprinted.ExiledWithSource | References$ X | SpellDescription$ Create a token that's a copy of the exiled card. X is the converted mana cost of that card.
SVar:TrigExile:DB$ ChangeZone | Imprint$ True | Origin$ Hand | Destination$ Exile | ChangeType$ Artifact | ChangeNum$ 1
A:AB$ CopyPermanent | Cost$ X T | Defined$ Imprinted.ExiledWithSource | References$ X | AILogic$ AtOppEOT | SpellDescription$ Create a token that's a copy of the exiled card. X is the converted mana cost of that card.
SVar:X:Imprinted$CardManaCost
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsImprinted+ExiledWithSource | Execute$ DBForget
SVar:DBForget:DB$ Pump | ForgetImprinted$ TriggeredCard
T:Mode$ ChangesZone | Origin$ Battlefield | ValidCard$ Card.Self | Destination$ Any | Execute$ DBCleanup | Static$ True
SVar:DBCleanup:DB$ Cleanup | ClearImprinted$ True
SVar:RemAIDeck:True
SVar:NeedsToPlayVar:Z GE2
SVar:Z:Count$ValidHand Artifact.YouCtrl
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/prototype_portal.jpg
Oracle:Imprint — When Prototype Portal enters the battlefield, you may exile an artifact card from your hand.\n{X}, {T}: Create a token that's a copy of the exiled card. X is the converted mana cost of that card.

View File

@@ -3,6 +3,5 @@ ManaCost:2 B B
Types:Instant
A:SP$ DamageAll | Cost$ 2 B B | NumDmg$ 1 | ValidCards$ Creature | ValidPlayers$ Player | ValidDescription$ each creature and each player. | SpellDescription$ CARDNAME deals 1 damage to each creature and each player.
K:Madness:1 B
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/psychotic_haze.jpg
Oracle:Psychotic Haze deals 1 damage to each creature and each player.\nMadness {1}{B} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.)

View File

@@ -3,6 +3,5 @@ ManaCost:5
Types:Artifact
A:AB$ Pump | Cost$ X T | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ +X | NumDef$ +X | References$ X | AtEOT$ Destroy | SpellDescription$ Target creature you control gets +X/+X until end of turn. Destroy it at the beginning of the next end step.
SVar:X:Count$xPaid
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/puffer_extract.jpg
Oracle:{X}, {T}: Target creature you control gets +X/+X until end of turn. Destroy it at the beginning of the next end step.

View File

@@ -4,6 +4,7 @@ Types:Creature Illusion
PT:0/1
K:Flying
A:AB$ Pump | Cost$ Discard<1/Card> | NumAtt$ +4 | NumDef$ +4 | ActivationLimit$ 1 | SpellDescription$ CARDNAME gets +4/+4 until end of turn. Activate this ability only once each turn.
SVar:RemAIDeck:True
SVar:AIPreference:DiscardCost$Card
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/pulsating_illusion.jpg
Oracle:Flying\nDiscard a card: Pulsating Illusion gets +4/+4 until end of turn. Activate this ability only once each turn.

View File

@@ -6,6 +6,5 @@ SVar:DBDiscard:DB$Discard | NumCards$ 1 | Mode$ TgtChoose | SubAbility$ TrigRetu
SVar:TrigReturn:DB$ ChangeZone | Defined$ Self | Origin$ Stack | Destination$ Hand | ConditionCheckSVar$ X | ConditionSVarCompare$ GTY | References$ X,Y
SVar:Y:Count$CardsInYourHand
SVar:X:PlayerCountOpponents$HighestCardsInHand
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/pulse_of_the_grid.jpg
Oracle:Draw two cards, then discard a card. Then if an opponent has more cards in hand than you, return Pulse of the Grid to its owner's hand.

View File

@@ -4,7 +4,7 @@ Types:Artifact
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigChooseDmg | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, CARDNAME deals 2 damage to the creature with the least toughness. If two or more creatures are tied for least toughness, you choose one of them.
SVar:TrigChooseDmg:AB$ ChooseCard | Cost$ 0 | Defined$ You | Choices$ Creature.leastToughness | Mandatory$ True | SubAbility$ DBDmg
SVar:DBDmg:DB$ DealDamage | NumDmg$ 2 | Defined$ ChosenCard
SVar:RemAIDeck:True
SVar:NeedsToPlay:Creature.YouDontCtrl+leastToughness
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/purging_scythe.jpg
Oracle:At the beginning of your upkeep, Purging Scythe deals 2 damage to the creature with the least toughness. If two or more creatures are tied for least toughness, you choose one of them.

View File

@@ -1,7 +1,7 @@
Name:Pyrrhic Revival
ManaCost:3 WB WB WB
Types:Sorcery
A:SP$ ChangeZone | Cost$ 3 WB WB WB | Origin$ Graveyard | Destination$ Battlefield | WithCounters$ M1M1_1 | Defined$ ValidGraveyard Creature | SpellDescription$ Each player returns each creature card from his or her graveyard to the battlefield with an additional -1/-1 counter on it.
SVar:RemAIDeck:True
A:SP$ ChangeZone | Cost$ 3 WB WB WB | Origin$ Graveyard | Destination$ Battlefield | WithCounters$ M1M1_1 | Defined$ ValidGraveyard Creature | AILogic$ ReanimateAll | SpellDescription$ Each player returns each creature card from his or her graveyard to the battlefield with an additional -1/-1 counter on it.
SVar:IsReanimatorCard:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/pyrrhic_revival.jpg
Oracle:Each player returns each creature card from his or her graveyard to the battlefield with an additional -1/-1 counter on it.