mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
*Added ETBReplacement:<Mode>:<SVar>[:Optional] keyword.
*Added ActiveZones parameter to replacement effects to let replacement effects function wherever. *Converted clones to ETBReplacement *Added Essence of the Wild *CardCharacteristics now copy ReplacementEffects *ReplacementEffects now copy alot more stuff. *Divvied up Replacement Effect running into layers *Moved stuff common between Trigger and ReplacementEffect to TriggerReplacementBase *Let AF_Tap tap cards on the stack in order to work with ETBReplacement. *Converted Remote Farm to ETBReplacement.
This commit is contained in:
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -2932,6 +2932,7 @@ res/cardsfolder/e/essence_filter.txt svneol=native#text/plain
|
||||
res/cardsfolder/e/essence_flare.txt svneol=native#text/plain
|
||||
res/cardsfolder/e/essence_fracture.txt svneol=native#text/plain
|
||||
res/cardsfolder/e/essence_harvest.txt -text
|
||||
res/cardsfolder/e/essence_of_the_wild.txt -text
|
||||
res/cardsfolder/e/essence_scatter.txt svneol=native#text/plain
|
||||
res/cardsfolder/e/essence_sliver.txt svneol=native#text/plain
|
||||
res/cardsfolder/e/essence_warden.txt svneol=native#text/plain
|
||||
@@ -12034,6 +12035,8 @@ src/main/java/forge/card/replacement/ReplaceGameLoss.java -text
|
||||
src/main/java/forge/card/replacement/ReplaceMoved.java -text
|
||||
src/main/java/forge/card/replacement/ReplacementEffect.java -text
|
||||
src/main/java/forge/card/replacement/ReplacementHandler.java -text
|
||||
src/main/java/forge/card/replacement/ReplacementLayer.java -text
|
||||
src/main/java/forge/card/replacement/ReplacementResult.java -text
|
||||
src/main/java/forge/card/replacement/package-info.java svneol=native#text/plain
|
||||
src/main/java/forge/card/spellability/Ability.java svneol=native#text/plain
|
||||
src/main/java/forge/card/spellability/AbilityActivated.java svneol=native#text/plain
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Abundance
|
||||
ManaCost:2 G G
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
R:Event$ Draw | ValidPlayer$ You | ReplaceWith$ AbundantChoice | Optional$ True | Description$ If you would draw a card, you may instead choose land or nonland and reveal cards from the top of your library until you reveal a card of the chosen kind. Put that card into your hand and put all other cards revealed this way on the bottom of your library in any order.
|
||||
R:Event$ Draw | ActiveZones$ Battlefield | ValidPlayer$ You | ReplaceWith$ AbundantChoice | Optional$ True | Description$ If you would draw a card, you may instead choose land or nonland and reveal cards from the top of your library until you reveal a card of the chosen kind. Put that card into your hand and put all other cards revealed this way on the bottom of your library in any order.
|
||||
SVar:AbundantChoice:AB$ GenericChoice | Cost$ 0 | Choices$ DigLand,DigNonland | Defined$ You
|
||||
SVar:DigLand:DB$ DigUntil | Valid$ Card.Land | ValidDescription$ land | FoundDestination$ Hand | RevealedDestination$ Library | RevealedLibraryPosition$ -1 | ChoiceDescription$ Land
|
||||
SVar:DigNonland:DB$ DigUntil | Valid$ Card.nonLand | ValidDescription$ nonland | FoundDestination$ Hand | RevealedDestination$ Library | RevealedLibraryPosition$ -1 | ChoiceDescription$ nonLand
|
||||
|
||||
@@ -20,8 +20,8 @@ Types:Legendary Creature Goblin Shaman
|
||||
Text:no text
|
||||
PT:2/2
|
||||
K:Protection from red
|
||||
R:Event$ DamageDone | ValidSource$ Card.Red | ValidTarget$ Player | ReplaceWith$ DmgPlus1 | IsCombat$ False | Description$ If a red source would deal damage to a player, it deals that much damage plus 1 to that player instead.
|
||||
R:Event$ DamageDone | ValidSource$ Card.Red | ValidTarget$ Player | ReplaceWith$ DmgPlus1Combat | IsCombat$ True | Secondary$ True | Description$ If a red source would deal damage to a player, it deals that much damage plus 1 to that player instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Card.Red | ValidTarget$ Player | ReplaceWith$ DmgPlus1 | IsCombat$ False | Description$ If a red source would deal damage to a player, it deals that much damage plus 1 to that player instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Card.Red | ValidTarget$ Player | ReplaceWith$ DmgPlus1Combat | IsCombat$ True | Secondary$ True | Description$ If a red source would deal damage to a player, it deals that much damage plus 1 to that player instead.
|
||||
SVar:DmgPlus1:AB$DealDamage | Cost$ 0 | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:DmgPlus1Combat:AB$DealDamage | Cost$ 0 | CombatDamage$ True | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount/Plus.1
|
||||
|
||||
@@ -5,8 +5,8 @@ Text:no text
|
||||
T:Mode$ Attacks | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | Execute$ AnthemPump | TriggerDescription$ Whenever a creature you control attacks, it gets +2/+0 until end of turn and CARDNAME deals 1 damage to you.
|
||||
SVar:AnthemPump:AB$Pump | Cost$ 0 | Defined$ TriggeredAttacker | NumAtt$ +2 | SubAbility$ RakdosBurn
|
||||
SVar:RakdosBurn:DB$ DealDamage | Defined$ You | NumDmg$ 1
|
||||
R:Event$ DamageDone | ValidSource$ Card.YouCtrl | ValidTarget$ Creature,Player | Hellbent$ True | ReplaceWith$ DmgTwice | IsCombat$ False | Description$ Hellbent - As long as you have no cards in hand, if a source you control would deal damage to a creature or player, it deals double that damage to that creature or player instead.
|
||||
R:Event$ DamageDone | ValidSource$ Card.YouCtrl | ValidTarget$ Creature,Player | Hellbent$ True | ReplaceWith$ DmgTwiceCombat | IsCombat$ True | Secondary$ True | Description$ Hellbent - As long as you have no cards in hand, if a source you control would deal damage to a creature or player, it deals double that damage to that creature or player instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Card.YouCtrl | ValidTarget$ Creature,Player | Hellbent$ True | ReplaceWith$ DmgTwice | IsCombat$ False | Description$ Hellbent - As long as you have no cards in hand, if a source you control would deal damage to a creature or player, it deals double that damage to that creature or player instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Card.YouCtrl | ValidTarget$ Creature,Player | Hellbent$ True | ReplaceWith$ DmgTwiceCombat | IsCombat$ True | Secondary$ True | Description$ Hellbent - As long as you have no cards in hand, if a source you control would deal damage to a creature or player, it deals double that damage to that creature or player instead.
|
||||
SVar:DmgTwice:AB$DealDamage | Cost$ 0 | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:DmgTwiceCombat:AB$DealDamage | Cost$ 0 | CombatDamage$ True | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount/Twice
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:2 U
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
T:Mode$ Phase | Phase$ End of Turn | CheckSVar$ X | SVarCompare$ GE2 | TriggerZones$ Battlefield | Execute$ TrigPutCounter | OptionalDecider$ You | TriggerDescription$ At the beginning of each end step, if you drew two or more cards this turn, you may put a quest counter on CARDNAME.
|
||||
R:Event$ Draw | ValidPlayer$ You | ReplaceWith$ Tutor | CheckSVar$ Y | SVarCompare$ GE6 | Optional$ True | Description$ As long as CARDNAME has six or more quest counters on it, if you would draw a card, you may instead search your library for a card, put that card into your hand, then shuffle your library.
|
||||
R:Event$ Draw | ActiveZones$ Battlefield | ValidPlayer$ You | ReplaceWith$ Tutor | CheckSVar$ Y | SVarCompare$ GE6 | Optional$ True | Description$ As long as CARDNAME has six or more quest counters on it, if you would draw a card, you may instead search your library for a card, put that card into your hand, then shuffle your library.
|
||||
SVar:TrigPutCounter:AB$ PutCounter | Cost$ 0 | Defined$ Self | CounterType$ QUEST | CounterNum$ 1
|
||||
SVar:Tutor:AB$ ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Hand | ValidCard$ Card.YouOwn
|
||||
SVar:X:Count$YouDrewThisTurn
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:1 W
|
||||
Types:Creature Unicorn
|
||||
Text:no text
|
||||
PT:1/2
|
||||
R:Event$ DamageDone | ValidSource$ Spell | ValidTarget$ Creature,Player | ReplaceWith$ DmgMinus1 | Description$ If a spell would deal damage to a creature or player, it deals that much damage minus 1 to that creature or player instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Spell | ValidTarget$ Creature,Player | ReplaceWith$ DmgMinus1 | Description$ If a spell would deal damage to a creature or player, it deals that much damage minus 1 to that creature or player instead.
|
||||
SVar:DmgMinus1:AB$DealDamage | Cost$ 0 | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount/Minus.1
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/benevolent_unicorn.jpg
|
||||
|
||||
@@ -3,8 +3,8 @@ ManaCost:4 U
|
||||
Types:Creature Shapeshifter
|
||||
Text:no text
|
||||
PT:0/0
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ChooseCreature | Static$ True | TriggerDescription$ You may have CARDNAME enter the battlefield as a copy of any creature card in a graveyard.
|
||||
SVar:ChooseCreature:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature | ChoiceZone$ Graveyard | SubAbility$ DBCopy | RememberChosen$ True
|
||||
K:ETBReplacement:Copy:ChooseCreature:Optional
|
||||
SVar:ChooseCreature:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature | ChoiceZone$ Graveyard | SubAbility$ DBCopy | RememberChosen$ True | SpellDescription$ You may have Body Double enter the battlefield as a copy of any creature card in a graveyard.
|
||||
SVar:DBCopy:DB$ Clone | Defined$ Remembered
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/body_double.jpg
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Boon Reflection
|
||||
ManaCost:4 W
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
R:Event$ GainLife | ValidPlayer$ You | ReplaceWith$ GainDouble | Description$ If you would gain life, you gain twice that much life instead.
|
||||
R:Event$ GainLife | ActiveZones$ Battlefield | ValidPlayer$ You | ReplaceWith$ GainDouble | Description$ If you would gain life, you gain twice that much life instead.
|
||||
SVar:GainDouble:AB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ X | References$ X
|
||||
SVar:X:ReplaceCount$LifeGained/Twice
|
||||
SVar:PlayMain1:True
|
||||
|
||||
@@ -3,8 +3,8 @@ ManaCost:3 U
|
||||
Types:Creature Shapeshifter
|
||||
Text:no text
|
||||
PT:0/0
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ChooseCreature | Static$ True | TriggerDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield.
|
||||
SVar:ChooseCreature:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | RememberChosen$ True
|
||||
K:ETBReplacement:Copy:ChooseCreature:Optional
|
||||
SVar:ChooseCreature:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | RememberChosen$ True | SpellDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield.
|
||||
SVar:DBCopy:DB$ Clone | Defined$ Remembered
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/clone.jpg
|
||||
|
||||
@@ -2,8 +2,8 @@ Name:Copy Artifact
|
||||
ManaCost:1 U
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ChooseArtifact | Static$ True | TriggerDescription$ You may have CARDNAME enter the battlefield as a copy of any artifact on the battlefield, except it's an enchantment in addition to its other types.
|
||||
SVar:ChooseArtifact:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Artifact.Other | SubAbility$ DBCopy | RememberChosen$ True | AILogic$ AtLeast1
|
||||
K:ETBReplacement:Copy:ChooseArtifact:Optional
|
||||
SVar:ChooseArtifact:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Artifact.Other | SubAbility$ DBCopy | RememberChosen$ True | AILogic$ AtLeast1 | SpellDescription$ You may have CARDNAME enter the battlefield as a copy of any artifact on the battlefield, except it's an enchantment in addition to its other types.
|
||||
SVar:DBCopy:DB$ Clone | Defined$ Remembered | AddTypes$ Enchantment
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/copy_artifact.jpg
|
||||
|
||||
@@ -2,8 +2,8 @@ Name:Copy Enchantment
|
||||
ManaCost:2 U
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ChooseEnchantment | Static$ True | TriggerDescription$ You may have CARDNAME enter the battlefield as a copy of any enchantment on the battlefield.
|
||||
SVar:ChooseEnchantment:AB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Enchantment.Other | SubAbility$ DBCopy | RememberChosen$ True
|
||||
K:ETBReplacement:Copy:ChooseEnchantment:Optional
|
||||
SVar:ChooseEnchantment:AB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Enchantment.Other | SubAbility$ DBCopy | RememberChosen$ True | SpellDescription$ You may have CARDNAME enter the battlefield as a copy of any enchantment on the battlefield.
|
||||
SVar:DBCopy:DB$ Clone | Defined$ Remembered
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Rare
|
||||
|
||||
@@ -4,8 +4,8 @@ Types:Enchantment Aura Curse
|
||||
Text:no text
|
||||
K:Enchant player
|
||||
A:SP$ Attach | Cost$ 3 R R | ValidTgts$ Player | AILogic$ Curse
|
||||
R:Event$ DamageDone | ValidTarget$ Player.EnchantedBy | ReplaceWith$ DmgTimes2 | IsCombat$ False | Description$ If a source would deal damage to enchanted player, it deals double that damage instead.
|
||||
R:Event$ DamageDone | ValidTarget$ Player.EnchantedBy | ReplaceWith$ DmgTimes2Combat | IsCombat$ True | Secondary$ True | Description$ If a source would deal damage to enchanted player, it deals double that damage instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Player.EnchantedBy | ReplaceWith$ DmgTimes2 | IsCombat$ False | Description$ If a source would deal damage to enchanted player, it deals double that damage instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Player.EnchantedBy | ReplaceWith$ DmgTimes2Combat | IsCombat$ True | Secondary$ True | Description$ If a source would deal damage to enchanted player, it deals double that damage instead.
|
||||
SVar:DmgTimes2:AB$DealDamage | Cost$ 0 | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:DmgTimes2Combat:AB$DealDamage | Cost$ 0 | CombatDamage$ True | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount/Twice
|
||||
|
||||
@@ -2,8 +2,8 @@ Name:Divine Presence
|
||||
ManaCost:2 W
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
R:Event$ DamageDone | ValidTarget$ Creature,Player | DamageAmount$ GE4 | ReplaceWith$ Dmg3 | IsCombat$ False | Description$ If a source would deal 4 or more damage to a creature or player, that source deals 3 damage to that creature or player instead.
|
||||
R:Event$ DamageDone | ValidTarget$ Creature,Player | DamageAmount$ GE4 | IsCombat$ True | ReplaceWith$ Dmg3Combat | Secondary$ True | Description$ If a source would deal 4 or more damage to a creature or player, that source deals 3 damage to that creature or player instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Creature,Player | DamageAmount$ GE4 | ReplaceWith$ Dmg3 | IsCombat$ False | Description$ If a source would deal 4 or more damage to a creature or player, that source deals 3 damage to that creature or player instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Creature,Player | DamageAmount$ GE4 | IsCombat$ True | ReplaceWith$ Dmg3Combat | Secondary$ True | Description$ If a source would deal 4 or more damage to a creature or player, that source deals 3 damage to that creature or player instead.
|
||||
SVar:Dmg3:AB$DealDamage | Cost$ 0 | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ 3
|
||||
SVar:Dmg3Combat:AB$DealDamage | Cost$ 0 | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | CombatDamage$ True | NumDmg$ 3
|
||||
SVar:PlayMain1:TRUE
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:3 U B
|
||||
Types:Legendary Creature Zombie Wizard
|
||||
Text:no text
|
||||
PT:3/3
|
||||
R:Event$ DamageDone | ValidTarget$ Card.Self | ReplaceWith$ Sac | Description$ If damage would be dealt to CARDNAME, sacrifice that many permanents instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ Sac | Description$ If damage would be dealt to CARDNAME, sacrifice that many permanents instead.
|
||||
SVar:Sac:AB$Sacrifice | Cost$ 0 | Defined$ You | SacValid$ Permanent | SacMessage$ Permanent | Amount$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
A:AB$Pump | Cost$ T | ValidTgts$ Instant.YouCtrl,Sorcery.YouCtrl | KW$ Flashback | TgtZone$ Graveyard | PumpZone$ Graveyard | SpellDescription$ Target instant or sorcery card in your graveyard gains flashback until end of turn. The flashback cost is equal to its mana cost. (You may cast that card from your graveyard for its flashback cost. Then exile it.)
|
||||
|
||||
@@ -6,8 +6,8 @@ PT:7/7
|
||||
K:Trample
|
||||
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigLife | CheckSVar$ ElderscaleCondition | SVarCompare$ LT7 | TriggerDescription$ When CARDNAME enters the battlefield, if your life total is less than 7, your life total becomes 7.
|
||||
SVar:TrigLife:AB$ SetLife | Cost$ 0 | Defined$ You | LifeAmount$ 7
|
||||
R:Event$ DamageDone | Affected$ You | ValidTarget$ You | ReplaceWith$ DmgLucky7 | CheckSVar$ ElderscaleCondition | SVarCompare$ GE7 | IsCombat$ False | Description$ As long as you have 7 or more life, damage that would reduce your life total to less than 7 reduces it to 7 instead.
|
||||
R:Event$ DamageDone | Affected$ You | ValidTarget$ You | ReplaceWith$ DmgLucky7Combat | CheckSVar$ ElderscaleCondition | SVarCompare$ GE7 | IsCombat$ True | Secondary$ True | Description$ As long as you have 7 or more life, damage that would reduce your life total to less than 7 reduces it to 7 instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | Affected$ You | ValidTarget$ You | ReplaceWith$ DmgLucky7 | CheckSVar$ ElderscaleCondition | SVarCompare$ GE7 | IsCombat$ False | Description$ As long as you have 7 or more life, damage that would reduce your life total to less than 7 reduces it to 7 instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | Affected$ You | ValidTarget$ You | ReplaceWith$ DmgLucky7Combat | CheckSVar$ ElderscaleCondition | SVarCompare$ GE7 | IsCombat$ True | Secondary$ True | Description$ As long as you have 7 or more life, damage that would reduce your life total to less than 7 reduces it to 7 instead.
|
||||
SVar:DmgLucky7:AB$ DealDamage | Cost$ 0 | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ DmgDone | SubAbility$ NoPain
|
||||
SVar:DmgLucky7Combat:AB$ DealDamage | Cost$ 0 | CombatDamage$ True | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ DmgDone | SubAbility$ NoPain
|
||||
SVar:NoPain:DB$ SetLife | Defined$ You | LifeAmount$ 7 | ConditionCheckSVar$ DmgResult | ConditionSVarCompare$ LT7 | SubAbility$ LifelinkQuirk
|
||||
|
||||
@@ -5,8 +5,8 @@ Text:no text
|
||||
PT:5/8
|
||||
K:Flying
|
||||
K:Shroud
|
||||
R:Event$ DamageDone | ValidTarget$ You | ReplaceWith$ DmgSelf | IsCombat$ False | Description$ All damage that would be dealt to you is dealt to CARDNAME instead.
|
||||
R:Event$ DamageDone | ValidTarget$ You | ReplaceWith$ DmgSelfCombat | IsCombat$ True | Secondary$ True | Description$ All damage that would be dealt to you is dealt to CARDNAME instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ You | ReplaceWith$ DmgSelf | IsCombat$ False | Description$ All damage that would be dealt to you is dealt to CARDNAME instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ You | ReplaceWith$ DmgSelfCombat | IsCombat$ True | Secondary$ True | Description$ All damage that would be dealt to you is dealt to CARDNAME instead.
|
||||
SVar:DmgSelf:AB$DealDamage | Cost$ 0 | Defined$ Self | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:DmgSelfCombat:AB$DealDamage | Cost$ 0 | CombatDamage$ True | Defined$ Self | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:2 W W
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
S:Mode$ Continuous | Affected$ You | AddKeyword$ Play with your hand revealed. | Description$ Play with your hand revealed.
|
||||
R:Event$ Draw | ValidPlayer$ You | ReplaceWith$ EnduringRevealTop | Description$ If you would draw a card, reveal the top card of your library instead. If it's a creature card, put it into your graveyard. Otherwise, draw a card.
|
||||
R:Event$ Draw | ActiveZones$ Battlefield | ValidPlayer$ You | ReplaceWith$ EnduringRevealTop | Description$ If you would draw a card, reveal the top card of your library instead. If it's a creature card, put it into your graveyard. Otherwise, draw a card.
|
||||
SVar:EnduringRevealTop:AB$ Dig | Cost$ 0 | DigNum$ 1 | Reveal$ True | NoMove$ True | RememberRevealed$ True | SubAbility$ DBEnduringGraveyard
|
||||
SVar:DBEnduringGraveyard:DB$ ChangeZone | Defined$ Remembered | ConditionDefined$ Remembered | ConditionPresent$ Creature | ConditionCompare$ GE1 | Origin$ Library | Destination$ Graveyard | SubAbility$ DBEnduringDraw
|
||||
SVar:DBEnduringDraw:DB$ Draw | NumCards$ 1 | ConditionDefined$ Remembered | ConditionPresent$ Creature | ConditionCompare$ EQ0 | SubAbility$ DBEnduringCleanup
|
||||
|
||||
7
res/cardsfolder/e/essence_of_the_wild.txt
Normal file
7
res/cardsfolder/e/essence_of_the_wild.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Name:Essence of the Wild
|
||||
ManaCost:3 G G G
|
||||
Types:Creature Avatar
|
||||
Text:no text
|
||||
PT:6/6
|
||||
SetInfo:ISD|Mythic|http://magiccards.info/scans/en/isd/178.jpg
|
||||
End
|
||||
@@ -4,8 +4,8 @@ Types:Creature Shapeshifter
|
||||
Text:no text
|
||||
PT:0/0
|
||||
# Make Svars for granting abilities and triggers on clones distinct to avoid SVars getting overwritten when cloning a clone
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ChooseCreature | Static$ True | TriggerDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield except it gains "U B, T: Destroy target creature with the same name as this creature."
|
||||
SVar:ChooseCreature:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | RememberChosen$ True
|
||||
K:ETBReplacement:Copy:ChooseCreature:Optional
|
||||
SVar:ChooseCreature:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | RememberChosen$ True | SpellDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield except it gains "U B, T: Destroy target creature with the same name as this creature."
|
||||
SVar:DBCopy:DB$ Clone | Defined$ Remembered | AddAbilities$ EvilTwin
|
||||
SVar:EvilTwin:AB$Destroy | Cost$ U B T | ValidTgts$ Creature.sameName | TgtPrompt$ Select target creature with the same name. | SpellDescription$ Destroy target creature with the same name as this creature.
|
||||
SVar:Rarity:Rare
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:3 R R
|
||||
Types:Creature Elemental
|
||||
Text:no text
|
||||
PT:4/3
|
||||
R:Event$ DamageDone | ValidSource$ Instant.YouCtrl,Sorcery.YouCtrl | ReplaceWith$ DmgTwice | Description$ If a red instant or sorcery spell you control would deal damage, it deals double that damage instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Instant.YouCtrl,Sorcery.YouCtrl | ReplaceWith$ DmgTwice | Description$ If a red instant or sorcery spell you control would deal damage, it deals double that damage instead.
|
||||
SVar:DmgTwice:AB$DealDamage | Cost$ 0 | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount/Twice
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/fire_servant.jpg
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Force Bubble
|
||||
ManaCost:2 W W
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
R:Event$ DamageDone | ValidTarget$ You | ReplaceWith$ Counters | Description$ If damage would be dealt to you, put that many depletion counters on CARDNAME instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ You | ReplaceWith$ Counters | Description$ If damage would be dealt to you, put that many depletion counters on CARDNAME instead.
|
||||
SVar:Counters:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ DEPLETION | CounterNum$ X | References$ X
|
||||
T:Mode$ Always | TriggerZones$ Battlefield | IsPresent$ Card.Self+counters_GE4_DEPLETION | Execute$ TrigSac | TriggerDescription$ When there are four or more depletion counters on CARDNAME, sacrifice it.
|
||||
SVar:TrigSac:AB$Sacrifice | Cost$ 0 | Defined$ Self
|
||||
|
||||
@@ -2,8 +2,8 @@ Name:Furnace of Rath
|
||||
ManaCost:1 R R R
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
R:Event$ DamageDone | ValidSource$ Card | ValidTarget$ Creature,Player | ReplaceWith$ DmgTwice | IsCombat$ False | Description$ If a source would deal damage to a creature or player, it deals double that damage to that creature or player instead.
|
||||
R:Event$ DamageDone | ValidSource$ Card | ValidTarget$ Creature,Player | ReplaceWith$ DmgTwiceCombat | IsCombat$ True | Secondary$ True | Description$ If a source would deal damage to a creature or player, it deals double that damage to that creature or player instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Card | ValidTarget$ Creature,Player | ReplaceWith$ DmgTwice | IsCombat$ False | Description$ If a source would deal damage to a creature or player, it deals double that damage to that creature or player instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Card | ValidTarget$ Creature,Player | ReplaceWith$ DmgTwiceCombat | IsCombat$ True | Secondary$ True | Description$ If a source would deal damage to a creature or player, it deals double that damage to that creature or player instead.
|
||||
SVar:DmgTwice:AB$DealDamage | Cost$ 0 | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:DmgTwiceCombat:AB$DealDamage | Cost$ 0 | CombatDamage$ True | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount/Twice
|
||||
|
||||
@@ -5,8 +5,8 @@ Text:no text
|
||||
PT:5/5
|
||||
K:Flying
|
||||
K:First Strike
|
||||
R:Event$ DamageDone | ValidSource$ Card | ValidTarget$ Opponent,Permanent.YouDontCtrl | ReplaceWith$ DmgTwice | IsCombat$ False | Description$ If a source would deal damage to an opponent or a permanent an opponent controls, that source deals double that damage to that player or permanent instead.
|
||||
R:Event$ DamageDone | ValidSource$ Card | ValidTarget$ Opponent,Permanent.YouDontCtrl | ReplaceWith$ DmgTwiceCombat | IsCombat$ True | Secondary$ True | Description$ If a source would deal damage to an opponent or a permanent an opponent controls, that source deals double that damage to that player or permanent instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Card | ValidTarget$ Opponent,Permanent.YouDontCtrl | ReplaceWith$ DmgTwice | IsCombat$ False | Description$ If a source would deal damage to an opponent or a permanent an opponent controls, that source deals double that damage to that player or permanent instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Card | ValidTarget$ Opponent,Permanent.YouDontCtrl | ReplaceWith$ DmgTwiceCombat | IsCombat$ True | Secondary$ True | Description$ If a source would deal damage to an opponent or a permanent an opponent controls, that source deals double that damage to that player or permanent instead.
|
||||
SVar:DmgTwice:AB$DealDamage | Cost$ 0 | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:DmgTwiceCombat:AB$DealDamage | Cost$ 0 | CombatDamage$ True | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount/Twice
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:1 B
|
||||
Types:Creature Spirit
|
||||
Text:no text
|
||||
PT:2/1
|
||||
R:Event$ DamageDone | ValidTarget$ Card.Self | IsCombat$ True | ReplaceWith$ Exile | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage and exile that many cards from the top of your library.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | IsCombat$ True | ReplaceWith$ Exile | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage and exile that many cards from the top of your library.
|
||||
SVar:Exile:AB$ Dig | Cost$ 0 | DigNum$ X | ChangeNum$ All | ChangeValid$ Card | DestinationZone$ Exile | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
SVar:Rarity:Rare
|
||||
|
||||
@@ -2,8 +2,8 @@ Name:Grafdigger's Cage
|
||||
ManaCost:1
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
R:Event$Moved | Origin$ Graveyard | Destination$ Battlefield | ValidCard$ Creature | Prevent$ True | Description$ Creature cards can't enter the battlefield from graveyards or libraries.
|
||||
R:Event$Moved | Origin$ Library | Destination$ Battlefield | ValidCard$ Creature | Prevent$ True
|
||||
R:Event$Moved | ActiveZones$ Battlefield | Origin$ Graveyard | Destination$ Battlefield | ValidCard$ Creature | Prevent$ True | Description$ Creature cards can't enter the battlefield from graveyards or libraries.
|
||||
R:Event$Moved | ActiveZones$ Battlefield | Origin$ Library | Destination$ Battlefield | ValidCard$ Creature | Prevent$ True
|
||||
S:Mode$ CantBeCast | Origin$ Graveyard | Description$ Players can't cast cards in graveyards or libraries.
|
||||
S:Mode$ CantBeCast | Origin$ Library
|
||||
SVar:RemRandomDeck:True
|
||||
|
||||
@@ -2,8 +2,8 @@ Name:Gratuitous Violence
|
||||
ManaCost:2 R R R
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
R:Event$ DamageDone | ValidSource$ Creature.YouCtrl | ValidTarget$ Creature,Player | ReplaceWith$ DmgTwice | IsCombat$ False | Description$ If a creature you control would deal damage to a creature or player, it deals double that damage to that creature or player instead.
|
||||
R:Event$ DamageDone | ValidSource$ Creature.YouCtrl | ValidTarget$ Creature,Player | ReplaceWith$ DmgTwiceCombat | IsCombat$ True | Secondary$ True | Description$ If a creature you control would deal damage to a creature or player, it deals double that damage to that creature or player instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Creature.YouCtrl | ValidTarget$ Creature,Player | ReplaceWith$ DmgTwice | IsCombat$ False | Description$ If a creature you control would deal damage to a creature or player, it deals double that damage to that creature or player instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Creature.YouCtrl | ValidTarget$ Creature,Player | ReplaceWith$ DmgTwiceCombat | IsCombat$ True | Secondary$ True | Description$ If a creature you control would deal damage to a creature or player, it deals double that damage to that creature or player instead.
|
||||
SVar:DmgTwice:AB$DealDamage | Cost$ 0 | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:DmgTwiceCombat:AB$DealDamage | Cost$ 0 | CombatDamage$ True | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount/Twice
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:3 B
|
||||
Types:Creature Zombie
|
||||
Text:no text
|
||||
PT:3/2
|
||||
R:Event$ Moved | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | ReplaceWith$ ToLibrary | Description$ If CARDNAME would die, put CARDNAME on top of its owner's library instead.
|
||||
R:Event$ Moved | ActiveZones$ Battlefield | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | ReplaceWith$ ToLibrary | Description$ If CARDNAME would die, put CARDNAME on top of its owner's library instead.
|
||||
SVar:ToLibrary:AB$ ChangeZone | Cost$ 0 | Origin$ Battlefield | Destination$ Library | LibraryPosition$ 0 | Defined$ ReplacedCard
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/gravebane_zombie.jpg
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Creature Elemental Incarnation
|
||||
Text:no text
|
||||
PT:6/6
|
||||
K:Haste
|
||||
R:Event$ DamageDone | ValidSource$ Spell.YouCtrl | ValidTarget$ Opponent | PreventionEffect$ True | ReplaceWith$ HostilityTokens | Description$ If a spell you control would deal damage to an opponent, prevent that damage. Put a 3/1 red Elemental Shaman creature token with haste onto the battlefield for each 1 damage prevented this way.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Spell.YouCtrl | ValidTarget$ Opponent | PreventionEffect$ True | ReplaceWith$ HostilityTokens | Description$ If a spell you control would deal damage to an opponent, prevent that damage. Put a 3/1 red Elemental Shaman creature token with haste onto the battlefield for each 1 damage prevented this way.
|
||||
SVar:HostilityTokens:AB$ Token | Cost$ 0 | TokenAmount$ X | References$ X | TokenImage$ R 3 1 Elemental Shaman | TokenName$ Elemental Shaman | TokenColors$ Red | TokenTypes$ Creature,Elemental,Shaman | TokenPower$ 3 | TokenToughness$ 1 | TokenKeywords$ Haste | TokenOwner$ You
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Graveyard | ValidCard$ Creature.Self | Execute$ TrigShuffle | TriggerDescription$ When CARDNAME is put into a graveyard from anywhere, shuffle it into its owner's library.
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:2 B B
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
A:AB$ Draw | Cost$ T ExileFromGrave<2/Card> | CostDesc$ T, Exile two cards from your graveyard | NumCards$ 1 | SpellDescription$ Draw a card.
|
||||
R:Event$ DamageDone | ValidTarget$ You | ReplaceWith$ ChangeZone | PreventionEffect$ True | Description$ If damage would be dealt to you, prevent that damage. Exile a card from your graveyard for each 1 damage prevented this way.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ You | ReplaceWith$ ChangeZone | PreventionEffect$ True | Description$ If damage would be dealt to you, prevent that damage. Exile a card from your graveyard for each 1 damage prevented this way.
|
||||
SVar:ChangeZone:AB$ ChangeZone | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Card | ChangeNum$ X | DefinedPlayer$ ReplacedTarget | Origin$ Graveyard | Destination$ Exile | References$ X
|
||||
T:Mode$ Always | TriggerZones$ Battlefield | IsPresent$ Card.YouCtrl | PresentZone$ Graveyard | PresentCompare$ EQ0 | Execute$ TrigLoseGame | TriggerDescription$ When there are no cards in your graveyard, you lose the game.
|
||||
SVar:TrigLoseGame:AB$ LosesGame | Cost$ 0 | Defined$ You
|
||||
|
||||
@@ -3,8 +3,8 @@ ManaCost:2
|
||||
Types:Artifact Equipment
|
||||
Text:no text
|
||||
K:Equip 2
|
||||
R:Event$ DamageDone | ValidSource$ Creature.EquippedBy | ReplaceWith$ DmgTimes2 | IsCombat$ True | Description$ If equipped creature would deal combat damage, it deals double that damage instead.
|
||||
R:Event$ DamageDone | ValidTarget$ Creature.EquippedBy | ValidSource$ Creature.Other | ReplaceWith$ DmgTimes2 | IsCombat$ True | Description$ If another creature would deal combat damage to equipped creature, it deals double that damage to equipped creature instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Creature.EquippedBy | ReplaceWith$ DmgTimes2 | IsCombat$ True | Description$ If equipped creature would deal combat damage, it deals double that damage instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Creature.EquippedBy | ValidSource$ Creature.Other | ReplaceWith$ DmgTimes2 | IsCombat$ True | Description$ If another creature would deal combat damage to equipped creature, it deals double that damage to equipped creature instead.
|
||||
SVar:DmgTimes2:AB$ DealDamage | Cost$ 0 | CombatDamage$ True | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount/Times.2
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/inquisitors_flail.jpg
|
||||
|
||||
@@ -3,8 +3,8 @@ ManaCost:1 U
|
||||
Types:Creature Shapeshifter Ally
|
||||
Text:no text
|
||||
PT:0/0
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ChooseCreature | Static$ True | TriggerDescription$ You may have CARDNAME enter the battlefield as a copy of any Ally creature on the battlefield.
|
||||
SVar:ChooseCreature:AB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Ally+Other | SubAbility$ DBCopy | RememberChosen$ True
|
||||
K:ETBReplacement:Copy:ChooseCreature:Optional
|
||||
SVar:ChooseCreature:AB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Ally+Other | SubAbility$ DBCopy | RememberChosen$ True | SpellDescription$ You may have CARDNAME enter the battlefield as a copy of any Ally creature on the battlefield.
|
||||
SVar:DBCopy:DB$ Clone | Defined$ Remembered
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Rare
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:2 U
|
||||
Types:Creature Human Wizard
|
||||
Text:no text
|
||||
PT:2/2
|
||||
R:Event$ Draw | ValidPlayer$ You | IsPresent$ Card.YouOwn | PresentZone$ Library | PresentCompare$ EQ0 | ReplaceWith$ Win | Description$ If you would draw a card while your library has no cards in it, you win the game instead.
|
||||
R:Event$ Draw | ActiveZones$ Battlefield | ValidPlayer$ You | IsPresent$ Card.YouOwn | PresentZone$ Library | PresentCompare$ EQ0 | ReplaceWith$ Win | Description$ If you would draw a card while your library has no cards in it, you win the game instead.
|
||||
SVar:Win:AB$WinsGame | Cost$ 0 | Defined$ You
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/laboratory_maniac.jpg
|
||||
|
||||
@@ -2,8 +2,8 @@ Name:Lashknife Barrier
|
||||
ManaCost:2 W
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
R:Event$ DamageDone | ValidTarget$ Creature.YouCtrl | ReplaceWith$ DmgMinus1 | IsCombat$ False | Description$ If a source would deal damage to a creature you control, it deals that much damage minus 1 to that creature instead.
|
||||
R:Event$ DamageDone | ValidTarget$ Creature.YouCtrl | ReplaceWith$ DmgMinus1Combat | IsCombat$ True | Secondary$ True | Description$ If a source would deal damage to a creature you control, it deals that much damage minus 1 to that creature instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Creature.YouCtrl | ReplaceWith$ DmgMinus1 | IsCombat$ False | Description$ If a source would deal damage to a creature you control, it deals that much damage minus 1 to that creature instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Creature.YouCtrl | ReplaceWith$ DmgMinus1Combat | IsCombat$ True | Secondary$ True | Description$ If a source would deal damage to a creature you control, it deals that much damage minus 1 to that creature instead.
|
||||
SVar:DmgMinus1:AB$DealDamage | Cost$ 0 | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:DmgMinus1Combat:AB$DealDamage | Cost$ 0 | CombatDamage$ True | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount/Minus.1
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:B B B B
|
||||
Types:Enchantment
|
||||
Text:As CARDNAME enters the battlefield, you lose life equal to your life total.\r\nWhenever you're dealt damage, sacrifice that many nontoken permanents. If you can't, you lose the game.\r\nWhen CARDNAME is put into a graveyard from the battlefield, you lose the game.
|
||||
S:Mode$ Continuous | Affected$ You | AddKeyword$ You don't lose the game for having 0 or less life. | Description$ You don't lose the game for having 0 or less life.
|
||||
R:Event$ GainLife | ValidPlayer$ You | ReplaceWith$ Draw | Description$ If you would gain life, draw that many cards instead.
|
||||
R:Event$ GainLife | ActiveZones$ Battlefield | ValidPlayer$ You | ReplaceWith$ Draw | Description$ If you would gain life, draw that many cards instead.
|
||||
SVar:Draw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ X | References$ X
|
||||
SVar:X:ReplaceCount$LifeGained
|
||||
SVar:RemRandomDeck:True
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:3 G G
|
||||
Types:Creature Plant Fungus
|
||||
Text:no text
|
||||
PT:5/5
|
||||
R:Event$ DamageDone | ValidTarget$ Card.Self | ReplaceWith$ Counters | Description$ If damage would be dealt to CARDNAME, put that many -1/-1 counters on it instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ Counters | Description$ If damage would be dealt to CARDNAME, put that many -1/-1 counters on it instead.
|
||||
SVar:Counters:AB$ PutCounter | Cost$ 0 | Defined$ Self | CounterType$ M1M1 | CounterNum$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigRem | TriggerDescription$ At the beginning of your upkeep, remove a -1/-1 counter from CARDNAME.
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Lich's Mirror
|
||||
ManaCost:5
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
R:Event$ GameLoss | ValidPlayer$ You | ReplaceWith$ ShuffleDrawSetLife | Description$ If you would lose the game, instead shuffle your hand, your graveyard, and all permanents you own into your library, then draw seven cards and your life total becomes 20.
|
||||
R:Event$ GameLoss | ActiveZones$ Battlefield | ValidPlayer$ You | ReplaceWith$ ShuffleDrawSetLife | Description$ If you would lose the game, instead shuffle your hand, your graveyard, and all permanents you own into your library, then draw seven cards and your life total becomes 20.
|
||||
SVar:ShuffleDrawSetLife:AB$ ChangeZoneAll | Cost$ 0 | ChangeType$ Card.YouOwn | Origin$ Battlefield | Destination$ Library | Shuffle$ True | SubAbility$ Shuffle2
|
||||
SVar:Shuffle2:DB$ ChangeZoneAll | ChangeType$ Card.YouOwn | Origin$ Hand | Destination$ Library | Shuffle$ True | SubAbility$ Shuffle3
|
||||
SVar:Shuffle3:DB$ ChangeZoneAll | ChangeType$ Card.YouOwn | Origin$ Graveyard | Destination$ Library | Shuffle$ True | SubAbility$ Draw
|
||||
|
||||
@@ -3,8 +3,8 @@ ManaCost:3 W W
|
||||
Types:Creature Human
|
||||
Text:no text
|
||||
PT:1/6
|
||||
R:Event$ DamageDone | ValidSource$ Artifact | ValidTarget$ You | ReplaceWith$ DmgMartyrsofKorlisSelf | IsCombat$ False | IsPresent$ Card.Self+untapped | Description$ As long as CARDNAME is untapped, all damage that would be dealt to you by artifacts is dealt to CARDNAME instead.
|
||||
R:Event$ DamageDone | ValidSource$ Artifact | ValidTarget$ You | ReplaceWith$ DmgMartyrsofKorlisSelfCombat | IsCombat$ True | IsPresent$ Card.Self+untapped | Secondary$ True | Description$ As long as CARDNAME is untapped, all damage that would be dealt to you by artifacts is dealt to CARDNAME instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Artifact | ValidTarget$ You | ReplaceWith$ DmgMartyrsofKorlisSelf | IsCombat$ False | IsPresent$ Card.Self+untapped | Description$ As long as CARDNAME is untapped, all damage that would be dealt to you by artifacts is dealt to CARDNAME instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Artifact | ValidTarget$ You | ReplaceWith$ DmgMartyrsofKorlisSelfCombat | IsCombat$ True | IsPresent$ Card.Self+untapped | Secondary$ True | Description$ As long as CARDNAME is untapped, all damage that would be dealt to you by artifacts is dealt to CARDNAME instead.
|
||||
SVar:DmgMartyrsofKorlisSelf:AB$DealDamage | Cost$ 0 | Defined$ Self | DamageSource$ ReplacedSource | NumDmg$ MartyrsofKorlisX | References$ MartyrsofKorlisX
|
||||
SVar:DmgMartyrsofKorlisSelfCombat:AB$DealDamage | Cost$ 0 | CombatDamage$ True | Defined$ Self | DamageSource$ ReplacedSource | NumDmg$ MartyrsofKorlisX | References$ MartyrsofKorlisX
|
||||
SVar:MartyrsofKorlisX:ReplaceCount$DamageAmount
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:R
|
||||
Types:Creature Lizard
|
||||
Text:no text
|
||||
PT:1/1
|
||||
R:Event$ Draw | ValidPlayer$ You | Optional$ True | Prevent$ True | AICheckSVar$ AIHandling | AISVarCompare$ EQ0 | References$ AIHandling | Description$ If you would draw a card, you may skip that draw instead.
|
||||
R:Event$ Draw | ActiveZones$ Battlefield | ValidPlayer$ You | Optional$ True | Prevent$ True | AICheckSVar$ AIHandling | AISVarCompare$ EQ0 | References$ AIHandling | Description$ If you would draw a card, you may skip that draw instead.
|
||||
SVar:AIHandling:Count$InYourLibrary
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/obstinate_familiar.jpg
|
||||
|
||||
@@ -4,8 +4,8 @@ Types:Enchantment Aura
|
||||
Text:no text
|
||||
K:Enchant creature
|
||||
A:SP$ Attach | Cost$ 2 W | ValidTgts$ Creature | TgtPrompt$ Select target creature | AILogic$ Curse
|
||||
R:Event$ DamageDone | ValidTarget$ You | ReplaceWith$ DmgEnchanted | IsCombat$ False | Description$ All damage that would be dealt to you is dealt to enchanted creature instead.
|
||||
R:Event$ DamageDone | ValidTarget$ You | ReplaceWith$ DmgEnchantedCombat | IsCombat$ True | Secondary$ True | Description$ All damage that would be dealt to you is dealt to enchanted creature instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ You | ReplaceWith$ DmgEnchanted | IsCombat$ False | Description$ All damage that would be dealt to you is dealt to enchanted creature instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ You | ReplaceWith$ DmgEnchantedCombat | IsCombat$ True | Secondary$ True | Description$ All damage that would be dealt to you is dealt to enchanted creature instead.
|
||||
SVar:DmgEnchanted:AB$DealDamage | Cost$ 0 | Defined$ Enchanted | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:DmgEnchantedCombat:AB$DealDamage | Cost$ 0 | CombatDamage$ True | Defined$ Enchanted | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
|
||||
@@ -3,8 +3,8 @@ ManaCost:5
|
||||
Types:Artifact Equipment
|
||||
Text:no text
|
||||
K:Equip 3
|
||||
R:Event$ DamageDone | ValidTarget$ You | ReplaceWith$ DmgEquipped | IsCombat$ False | IsEquipping$ True | Description$ All damage that would be dealt to you is dealt to equipped creature instead.
|
||||
R:Event$ DamageDone | ValidTarget$ You | ReplaceWith$ DmgEquippedCombat | IsCombat$ True | IsEquipping$ True | Secondary$ True | Description$ All damage that would be dealt to you is dealt to equipped creature instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ You | ReplaceWith$ DmgEquipped | IsCombat$ False | IsEquipping$ True | Description$ All damage that would be dealt to you is dealt to equipped creature instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ You | ReplaceWith$ DmgEquippedCombat | IsCombat$ True | IsEquipping$ True | Secondary$ True | Description$ All damage that would be dealt to you is dealt to equipped creature instead.
|
||||
SVar:DmgEquipped:AB$DealDamage | Cost$ 0 | Defined$ Equipped | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:DmgEquippedCombat:AB$DealDamage | Cost$ 0 | CombatDamage$ True | Defined$ Equipped | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
|
||||
@@ -4,8 +4,8 @@ Types:Creature Illusion
|
||||
Text:no text
|
||||
PT:0/0
|
||||
# Make Svars for granting abilities and triggers on clones distinct to avoid SVars getting overwritten when cloning a clone
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ChooseCreature | Static$ True | TriggerDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield, except it's an Illusion in addition to its other types and it gains "When this creature becomes the target of a spell or ability, sacrifice it."
|
||||
SVar:ChooseCreature:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | RememberChosen$ True
|
||||
K:ETBReplacement:Copy:ChooseCreature:Optional
|
||||
SVar:ChooseCreature:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | RememberChosen$ True | SpellDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield, except it's an Illusion in addition to its other types and it gains "When this creature becomes the target of a spell or ability, sacrifice it."
|
||||
SVar:DBCopy:DB$ Clone | Defined$ Remembered | AddTypes$ Illusion | AddTriggers$ PhantasmalImageTgtTrig | AddSVars$ PhantasmalImageSac,Targeting
|
||||
SVar:PhantasmalImageTgtTrig:Mode$ BecomesTarget | ValidTarget$ Card.Self | Execute$ PhantasmalImageSac | TriggerDescription$ When this creature becomes the target of a spell or ability, sacrifice it.
|
||||
SVar:PhantasmalImageSac:AB$Sacrifice | Cost$ 0 | Defined$ Self
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Creature Hydra
|
||||
Text:no text
|
||||
PT:7/7
|
||||
K:Infect
|
||||
R:Event$ DamageDone | ValidTarget$ Card.Self | ReplaceWith$ Counters | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Put a -1/-1 counter on CARDNAME for each 1 damage prevented this way.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ Counters | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Put a -1/-1 counter on CARDNAME for each 1 damage prevented this way.
|
||||
SVar:Counters:AB$ PutCounter | Cost$ 0 | Defined$ ReplacedTarget | CounterType$ M1M1 | CounterNum$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
SVar:Rarity:Rare
|
||||
|
||||
@@ -3,8 +3,8 @@ ManaCost:3 PU
|
||||
Types:Artifact Creature Shapeshifter
|
||||
Text:no text
|
||||
PT:0/0
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ChooseCreature | Static$ True | TriggerDescription$ You may have CARDNAME enter the battlefield as a copy of any artifact or creature on the battlefield, except it's an artifact in addition to its other types.
|
||||
SVar:ChooseCreature:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other,Artifact.Other | SubAbility$ DBCopy | RememberChosen$ True
|
||||
K:ETBReplacement:Copy:ChooseCreature
|
||||
SVar:ChooseCreature:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other,Artifact.Other | SubAbility$ DBCopy | RememberChosen$ True | SpellDescription$ You may have CARDNAME enter the battlefield as a copy of any artifact or creature on the battlefield, except it's an artifact in addition to its other types.
|
||||
SVar:DBCopy:DB$ Clone | Defined$ Remembered | AddTypes$ Artifact
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/phyrexian_metamorph.jpg
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:2 W W G
|
||||
Types:Creature Plant Hydra
|
||||
Text:no text
|
||||
PT:1/1
|
||||
R:Event$ DamageDone | ValidTarget$ Card.Self | ReplaceWith$ Counters | Description$ If damage would be dealt to Phytohydra, put that many +1/+1 counters on it instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ Counters | Description$ If damage would be dealt to Phytohydra, put that many +1/+1 counters on it instead.
|
||||
SVar:Counters:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ P1P1 | CounterNum$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/phytohydra.jpg
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Possessed Portal
|
||||
ManaCost:8
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
R:Event$ Draw | ValidPlayer$ Player | Prevent$ True | Description$ If a player would draw a card, that player skips that draw instead.
|
||||
R:Event$ Draw | ActiveZones$ Battlefield | ValidPlayer$ Player | Prevent$ True | Description$ If a player would draw a card, that player skips that draw instead.
|
||||
T:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | Execute$ TrigSacrifice | TriggerDescription$ At the beginning of each end step, each player sacrifices a permanent unless he or she discards a card.
|
||||
SVar:TrigSacrifice:DB$ Sacrifice | SacValid$ Permanent | Defined$ You | UnlessCost$ Discard<1/Card> | UnlessPayer$ You | SubAbility$ OppSac
|
||||
SVar:OppSac:DB$ Sacrifice | SacValid$ Permanent | Defined$ Opponent | UnlessCost$ Discard<1/Card> | UnlessPayer$ Opponent
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Creature Elemental Incarnation
|
||||
Text:
|
||||
PT:6/6
|
||||
K:Flying
|
||||
R:Event$ DamageDone | ValidTarget$ You | ReplaceWith$ GainLife | PreventionEffect$ True | IsCombat$ False | Description$ If noncombat damage would be dealt to you, prevent that damage. You gain life equal to the damage prevented this way.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ You | ReplaceWith$ GainLife | PreventionEffect$ True | IsCombat$ False | Description$ If noncombat damage would be dealt to you, prevent that damage. You gain life equal to the damage prevented this way.
|
||||
SVar:GainLife:AB$GainLife | Cost$ 0 | Defined$ ReplacedTarget | LifeAmount$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Graveyard | ValidCard$ Creature.Self | Execute$ TrigShuffle | TriggerDescription$ When CARDNAME is put into a graveyard from anywhere, shuffle it into its owner's library.
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Pursuit of Knowledge
|
||||
ManaCost:3 W
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
R:Event$ Draw | ValidPlayer$ You | Optional$ True | ReplaceWith$ Counter | Description$ If you would draw a card, you may put a study counter on CARDNAME instead.
|
||||
R:Event$ Draw | ActiveZones$ Battlefield | ValidPlayer$ You | Optional$ True | ReplaceWith$ Counter | Description$ If you would draw a card, you may put a study counter on CARDNAME instead.
|
||||
A:AB$Draw | Cost$ SubCounter<3/STUDY> Sac<1/CARDNAME> | NumCards$ 7 | SpellDescription$ Draw seven cards.
|
||||
SVar:Counter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterNum$ 1 | CounterType$ STUDY
|
||||
SVar:RemAIDeck:True
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Pyromancer's Swath
|
||||
ManaCost:2 R
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
R:Event$ DamageDone | ValidSource$ Instant.YouCtrl,Sorcery.YouCtrl | ValidTarget$ Creature,Player | ReplaceWith$ DmgPlus2 | Description$ If an instant or sorcery source you control would deal damage to a creature or player, it deals that much damage plus 2 to that creature or player instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Instant.YouCtrl,Sorcery.YouCtrl | ValidTarget$ Creature,Player | ReplaceWith$ DmgPlus2 | Description$ If an instant or sorcery source you control would deal damage to a creature or player, it deals that much damage plus 2 to that creature or player instead.
|
||||
SVar:DmgPlus2:AB$DealDamage | Cost$ 0 | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount/Plus.2
|
||||
T:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | Execute$ TrigDiscard | TriggerDescription$ At the beginning of each end step, discard your hand.
|
||||
|
||||
@@ -3,8 +3,8 @@ ManaCost:5 U U
|
||||
Types:Creature Shapeshifter
|
||||
Text:no text
|
||||
PT:7/7
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ChooseCreature | Static$ True | TriggerDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield. It's still 7/7.
|
||||
SVar:ChooseCreature:AB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | RememberChosen$ True
|
||||
K:ETBReplacement:Copy:ChooseCreature:Optional
|
||||
SVar:ChooseCreature:AB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | RememberChosen$ True | SpellDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield. It's still 7/7.
|
||||
SVar:DBCopy:DB$ Clone | Defined$ Remembered | SetPower$ 7 | SetToughness$ 7
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/quicksilver_gargantuan.jpg
|
||||
|
||||
@@ -2,8 +2,9 @@ Name:Remote Farm
|
||||
ManaCost:no cost
|
||||
Types:Land
|
||||
Text:no text
|
||||
K:CARDNAME enters the battlefield tapped.
|
||||
K:etbCounter:DEPLETION:2
|
||||
K:ETBReplacement:Other:ETBTap
|
||||
SVar:ETBTap:DB$ Tap | Defined$ Self | SubAbility$ ETBCounters | SpellDescription$ CARDNAME enters the battlefield tapped. CARDNAME enters the battlefield with 2 depletion counters on it.
|
||||
SVar:ETBCounters:DB$ PutCounter | Defined$ Self | CounterType$ DEPLETION | CounterNum$ 2
|
||||
A:AB$ Mana | Cost$ T SubCounter<1/DEPLETION> | Produced$ W | Deplete$ DEPLETION | Amount$ 2 | SpellDescription$ Add W W to your mana pool. If there are no depletion counters on CARDNAME, sacrifice it.
|
||||
SVar:RemAIDeck:True
|
||||
SVar:RemRandomDeck:True
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Creature Rhino Monk
|
||||
Text:no text
|
||||
PT:1/5
|
||||
K:Lifelink
|
||||
R:Event$ GainLife | ValidPlayer$ You | ReplaceWith$ GainDouble | Description$ If you would gain life, you gain twice that much life instead.
|
||||
R:Event$ GainLife | ActiveZones$ Battlefield | ValidPlayer$ You | ReplaceWith$ GainDouble | Description$ If you would gain life, you gain twice that much life instead.
|
||||
SVar:GainDouble:AB$ GainLife | Cost$ 0 | Defined$ You | LifeAmount$ X
|
||||
SVar:X:ReplaceCount$LifeGained/Twice
|
||||
SVar:PlayMain1:True
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:3 G U
|
||||
Types:Creature Elf Wizard
|
||||
Text:no text
|
||||
PT:3/4
|
||||
R:Event$ Draw | ValidPlayer$ You | ReplaceWith$ Dig | Description$ If you would draw a card, instead reveal the top three cards of your library. Put all creature cards revealed this way into your hand and the rest on the bottom of your library in any order.
|
||||
R:Event$ Draw | ActiveZones$ Battlefield | ValidPlayer$ You | ReplaceWith$ Dig | Description$ If you would draw a card, instead reveal the top three cards of your library. Put all creature cards revealed this way into your hand and the rest on the bottom of your library in any order.
|
||||
SVar:Dig:AB$Dig | Cost$ 0 | DigNum$ 3 | Reveal$ True | ChangeNum$ All | ChangeValid$ Creature
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Rare
|
||||
|
||||
@@ -4,8 +4,8 @@ Types:Legendary Creature Human Rogue
|
||||
Text:no text
|
||||
PT:3/1
|
||||
# Make Svars for granting abilities and triggers on clones distinct to avoid SVars getting overwritten when cloning a clone
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ChooseCreature | Static$ True | TriggerDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield, except its name is still CARDNAME, it's legendary in addition to its other types, and it gains "2 U U: Return CARDNAME to its owner's hand at the beginning of the next end step."
|
||||
SVar:ChooseCreature:AB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | RememberChosen$ True
|
||||
K:ETBReplacement:Copy:ChooseCreature:Optional
|
||||
SVar:ChooseCreature:AB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | RememberChosen$ True | SpellDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield, except its name is still CARDNAME, it's legendary in addition to its other types, and it gains "2 U U: Return CARDNAME to its owner's hand at the beginning of the next end step."
|
||||
SVar:DBCopy:DB$ Clone | Defined$ Remembered | KeepName$ True | AddTypes$ Legendary | AddAbilities$ ReturnSakashima | AddSVars$ TrigReturnSak
|
||||
SVar:ReturnSakashima:AB$ DelayedTrigger | Cost$ 2 U U | Mode$ Phase | Phase$ End of Turn | Execute$ TrigReturnSak | SpellDescription$ Return CARDNAME to it's owners hand at the beginning of the next end step.
|
||||
SVar:TrigReturnSak:AB$ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Battlefield | Destination$ Hand
|
||||
|
||||
@@ -4,8 +4,8 @@ Types:Creature Human Ninja
|
||||
Text:no text
|
||||
PT:0/0
|
||||
A:AB$ ChangeZone | Cost$ 1 U Return<1/Creature.attacking+unblocked> | CostDesc$ Ninjutsu 1 U | ActivationZone$ Hand | Origin$ Hand | Ninjutsu$ True | Destination$ Battlefield | Defined$ Self | SpellDescription$ (1 U, Return an unblocked attacker you control to hand: Put this card onto the battlefield from your hand tapped and attacking.)
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ChooseCreature | Static$ True | TriggerDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield, except it's still a Ninja in addition to its other creature types.
|
||||
SVar:ChooseCreature:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | RememberChosen$ True
|
||||
K:ETBReplacement:Copy:ChooseCreature:Optional
|
||||
SVar:ChooseCreature:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | RememberChosen$ True | SpellDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield, except it's still a Ninja in addition to its other creature types.
|
||||
SVar:DBCopy:DB$ Clone | Defined$ Remembered | AddTypes$ Ninja
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/sakashimas_student.jpg
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Creature Fox Samurai
|
||||
Text:no text
|
||||
PT:2/2
|
||||
K:Bushido 1
|
||||
R:Event$ Moved | Destination$ Graveyard | ValidCard$ Permanent | ReplaceWith$ Exile | Description$ If a permanent would be put into a graveyard, exile it instead.
|
||||
R:Event$ Moved | ActiveZones$ Battlefield | Destination$ Graveyard | ValidCard$ Permanent | ReplaceWith$ Exile | Description$ If a permanent would be put into a graveyard, exile it instead.
|
||||
SVar:Exile:AB$ ChangeZone | Cost$ 0 | Origin$ Battlefield | Destination$ Exile | Defined$ ReplacedCard
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/samurai_of_the_pale_curtain.jpg
|
||||
|
||||
@@ -2,8 +2,8 @@ Name:Sculpting Steel
|
||||
ManaCost:3
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ChooseArtifact | Static$ True | TriggerDescription$ You may have CARDNAME enter the battlefield as a copy of any artifact on the battlefield.
|
||||
SVar:ChooseArtifact:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Artifact.Other | SubAbility$ DBCopy | RememberChosen$ True
|
||||
K:ETBReplacement:Copy:ChooseArtifact:Optional
|
||||
SVar:ChooseArtifact:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Artifact.Other | SubAbility$ DBCopy | RememberChosen$ True | SpellDescription$ You may have CARDNAME enter the battlefield as a copy of any artifact on the battlefield.
|
||||
SVar:DBCopy:DB$ Clone | Defined$ Remembered
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/sculpting_steel.jpg
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Legendary Creature Spirit
|
||||
Text:no text
|
||||
PT:0/0
|
||||
K:etbCounters:P1P1:8
|
||||
R:Event$ DamageDone | ValidTarget$ Card.Self | ReplaceWith$ SekkiCounters | PreventionEffect$ True | Description$ If damage would be dealt to Sekki, prevent that damage, remove that many +1/+1 counters from Sekki, and put that many 1/1 colorless Spirit creature tokens onto the battlefield.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ SekkiCounters | PreventionEffect$ True | Description$ If damage would be dealt to Sekki, prevent that damage, remove that many +1/+1 counters from Sekki, and put that many 1/1 colorless Spirit creature tokens onto the battlefield.
|
||||
SVar:SekkiCounters:AB$ RemoveCounter | Cost$ 0 | CounterType$ P1P1 | CounterNum$ SekkiX | SubAbility$ DBSekkiToken | References$ X
|
||||
SVar:DBSekkiToken:DB$ Token | Cost$ 0 | TokenAmount$ SekkiX | TokenName$ Spirit | TokenTypes$ Creature,Spirit | TokenColors$ Colorless | TokenPower$ 1 | TokenToughness$ 1 | References$ SekkiX
|
||||
A:AB$ ChangeZone | Cost$ Sac<8/Spirit> | Defined$ Self | ActivationZone$ Graveyard | Origin$ Graveyard | Destination$ Battlefield | SpellDescription$ Return Sekki from your graveyard to the battlefield.
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Sulfuric Vapors
|
||||
ManaCost:3 R
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
R:Event$ DamageDone | ValidSource$ Spell.Red | ValidTarget$ Permanent,Player | ReplaceWith$ DmgPlus1 | Description$ If a red spell would deal damage to a permanent or player, it deals that much damage plus 1 to that permanent or player instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Spell.Red | ValidTarget$ Permanent,Player | ReplaceWith$ DmgPlus1 | Description$ If a red spell would deal damage to a permanent or player, it deals that much damage plus 1 to that permanent or player instead.
|
||||
SVar:DmgPlus1:AB$ DealDamage | Cost$ 0 | Defined$ ReplacedTarget | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount/Plus.1
|
||||
SVar:PlayMain1:TRUE
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Enchantment
|
||||
Text:no text
|
||||
T:Mode$ Phase | Phase$ Upkeep | TriggerZones$ Battlefield | Execute$ TrigDmg | TriggerDescription$ At the beginning of each player's upkeep, CARDNAME deals 2 damage to that player.
|
||||
SVar:TrigDmg:AB$DealDamage | Cost$ 0 | Defined$ TriggeredPlayer | NumDmg$ 2
|
||||
R:Event$ GainLife | Prevent$ True | Description$ If a player would gain life, that player gains no life instead.
|
||||
R:Event$ GainLife | ActiveZones$ Battlefield | Prevent$ True | Description$ If a player would gain life, that player gains no life instead.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/sulfuric_vortex.jpg
|
||||
SetInfo:SCG|Rare|http://magiccards.info/scans/en/sc/106.jpg
|
||||
Oracle:At the beginning of each player's upkeep, Sulfuric Vortex deals 2 damage to that player.\nIf a player would gain life, that player gains no life instead.
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Legendary Creature Vampire
|
||||
Text:no text
|
||||
PT:5/5
|
||||
K:Flying
|
||||
R:Event$ DamageDone | CombatDamage$ True | ValidSource$ Card.Self | ValidTarget$ Opponent | ReplaceWith$ CountersAndMill | Description$ If CARDNAME would deal combat damage to a player, instead put that many +1/+1 counters on Szadek and that player puts that many cards from the top of his or her library into his or her graveyard.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | CombatDamage$ True | ValidSource$ Card.Self | ValidTarget$ Opponent | ReplaceWith$ CountersAndMill | Description$ If CARDNAME would deal combat damage to a player, instead put that many +1/+1 counters on Szadek and that player puts that many cards from the top of his or her library into his or her graveyard.
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
SVar:CountersAndMill:AB$ PutCounter | Cost$ 0 | Defined$ Self | CounterNum$ X | References$ X | CounterType$ P1P1 | SubAbility$ Mill
|
||||
SVar:Mill:DB$ Mill | Cost$ 0 | Defined$ ReplacedTarget | NumCards$ X | References$ X
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Thought Reflection
|
||||
ManaCost:4 U U U
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
R:Event$ Draw | ValidPlayer$ You | ReplaceWith$ DrawTwo | Description$ If you would draw a card, draw two cards instead.
|
||||
R:Event$ Draw | ActiveZones$ Battlefield | ValidPlayer$ You | ReplaceWith$ DrawTwo | Description$ If you would draw a card, draw two cards instead.
|
||||
SVar:DrawTwo:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ 2
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/thought_reflection.jpg
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:5 U
|
||||
Types:Legendary Creature Spirit
|
||||
Text:no text
|
||||
PT:1/5
|
||||
R:Event$ Draw | ValidPlayer$ You | ReplaceWith$ Dig | Description$ If you would draw a card, look at the top three cards of your library instead. Put one of those cards into your hand and the rest on the bottom of your library in any order.
|
||||
R:Event$ Draw | ActiveZones$ Battlefield | ValidPlayer$ You | ReplaceWith$ Dig | Description$ If you would draw a card, look at the top three cards of your library instead. Put one of those cards into your hand and the rest on the bottom of your library in any order.
|
||||
SVar:Dig:AB$Dig | Cost$ 0 | DigNum$ 3
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Rare
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:3 U
|
||||
Types:Creature Zombie
|
||||
Text:no text
|
||||
PT:4/2
|
||||
R:Event$ DamageDone | ValidSource$ Creature.Zombie+YouCtrl | ValidTarget$ Opponent | ReplaceWith$ Mill | IsCombat$ True | Description$ If a Zombie you control would deal combat damage to a player, instead that player puts that many cards from the top of his or her library into his or her graveyard.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Creature.Zombie+YouCtrl | ValidTarget$ Opponent | ReplaceWith$ Mill | IsCombat$ True | Description$ If a Zombie you control would deal combat damage to a player, instead that player puts that many cards from the top of his or her library into his or her graveyard.
|
||||
SVar:Mill:AB$Mill | Cost$ 0 | Defined$ ReplacedTarget | NumCards$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
T:Mode$ ChangesZone | ValidCard$ Creature.YouDontOwn | Origin$ Library | Destination$ Graveyard | Execute$ ExileAndToken | TriggerZones$ Battlefield | TriggerDescription$ Whenever a creature card is put into an opponent's graveyard from his or her library, exile that card and put a 2/2 black Zombie creature token onto the battlefield.
|
||||
|
||||
@@ -2,8 +2,8 @@ Name:Vesuva
|
||||
ManaCost:no cost
|
||||
Types:Land
|
||||
Text:no text
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ChooseLand | Static$ True | TriggerDescription$ You may have CARDNAME enter the battlefield tapped as a copy of any land on the battlefield.
|
||||
SVar:ChooseLand:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Land.Other | SubAbility$ DBCopy | RememberChosen$ True
|
||||
K:ETBReplacement:Copy:ChooseLand:Optional
|
||||
SVar:ChooseLand:DB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Land.Other | SubAbility$ DBCopy | RememberChosen$ True | SpellDescription$ You may have CARDNAME enter the battlefield tapped as a copy of any land on the battlefield.
|
||||
SVar:DBCopy:DB$ Clone | Defined$ Remembered | IntoPlayTapped$ True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/vesuva.jpg
|
||||
|
||||
@@ -4,8 +4,8 @@ Types:Creature Shapeshifter
|
||||
Text:no text
|
||||
PT:0/0
|
||||
# Make Svars for granting abilities and triggers on clones distinct to avoid SVars getting overwritten when cloning a clone
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ChooseCreature | Static$ True | TriggerDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield except it doesn't copy that creature's color and it gains "At the beginning of your upkeep, you may have this creature become a copy of target creature except it doesn't copy that creature's color. If you do, this creature gains this ability."
|
||||
SVar:ChooseCreature:AB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | RememberChosen$ True
|
||||
K:ETBReplacement:Copy:ChooseCard:Optional
|
||||
SVar:ChooseCreature:AB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | RememberChosen$ True | SpellDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield except it doesn't copy that creature's color and it gains "At the beginning of your upkeep, you may have this creature become a copy of target creature except it doesn't copy that creature's color. If you do, this creature gains this ability."
|
||||
SVar:DBCopy:DB$ Clone | Defined$ Remembered | Colors$ Blue | OverwriteColors$ True | AddTriggers$ VesDopUpkeepTrig | AddSVars$ VesDopCopy,VesDopUpkeepTrig
|
||||
SVar:VesDopUpkeepTrig:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ VesDopCopy | TriggerDescription$ At the beginning of your upkeep, you may have this creature become a copy of target creature except it doesn't copy that creature's color. If you do, this creature gains this ability.
|
||||
SVar:VesDopCopy:AB$ Clone | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature to copy. | Optional$ True | Colors$ Blue | OverwriteColors$ True | AddTriggers$ VesDopUpkeepTrig | AddSVars$ VesDopCopy,VesDopUpkeepTrig | SubAbility$ DBCleanup
|
||||
|
||||
@@ -3,8 +3,8 @@ ManaCost:3 W W
|
||||
Types:Creature Human
|
||||
Text:no text
|
||||
PT:2/5
|
||||
R:Event$ DamageDone | ValidSource$ Creature.unblocked | ValidTarget$ You | ReplaceWith$ DmgSelf | IsCombat$ False | IsPresent$ Card.Self+untapped | Description$ As long as CARDNAME is untapped, all damage that would be dealt to you by unblocked creatures is dealt to CARDNAME instead.
|
||||
R:Event$ DamageDone | ValidSource$ Creature.unblocked | ValidTarget$ You | ReplaceWith$ DmgSelfCombat | IsCombat$ True | IsPresent$ Card.Self+untapped | Secondary$ True | Description$ As long as CARDNAME is untapped, all damage that would be dealt to you by unblocked creatures is dealt to CARDNAME instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Creature.unblocked | ValidTarget$ You | ReplaceWith$ DmgSelf | IsCombat$ False | IsPresent$ Card.Self+untapped | Description$ As long as CARDNAME is untapped, all damage that would be dealt to you by unblocked creatures is dealt to CARDNAME instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Creature.unblocked | ValidTarget$ You | ReplaceWith$ DmgSelfCombat | IsCombat$ True | IsPresent$ Card.Self+untapped | Secondary$ True | Description$ As long as CARDNAME is untapped, all damage that would be dealt to you by unblocked creatures is dealt to CARDNAME instead.
|
||||
SVar:DmgSelf:AB$DealDamage | Cost$ 0 | Defined$ Self | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:DmgSelfCombat:AB$DealDamage | Cost$ 0 | CombatDamage$ True | Defined$ Self | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Creature Elemental Incarnation
|
||||
Text:no text
|
||||
PT:6/6
|
||||
K:Trample
|
||||
R:Event$ DamageDone | ValidTarget$ Creature.YouCtrl+Other | ReplaceWith$ Counters | PreventionEffect$ True | Description$ If damage would be dealt to a creature you control other than CARDNAME, prevent that damage. Put a +1/+1 counter on that creature for each 1 damage prevented this way.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Creature.YouCtrl+Other | ReplaceWith$ Counters | PreventionEffect$ True | Description$ If damage would be dealt to a creature you control other than CARDNAME, prevent that damage. Put a +1/+1 counter on that creature for each 1 damage prevented this way.
|
||||
SVar:Counters:AB$PutCounter | Cost$ 0 | Defined$ ReplacedTarget | CounterType$ P1P1 | CounterNum$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Graveyard | ValidCard$ Creature.Self | Execute$ TrigShuffle | TriggerDescription$ When CARDNAME is put into a graveyard from anywhere, shuffle it into its owner's library.
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Creature Human Soldier
|
||||
Text:no text
|
||||
PT:2/5
|
||||
K:Morph:3 W
|
||||
R:Event$ DamageDone | ValidSource$ Creature.unblocked | ValidTarget$ You | ReplaceWith$ DmgSelf | IsCombat$ True | IsPresent$ Card.Self+untapped | Description$ As long as CARDNAME is untapped, all combat damage that would be dealt to you by unblocked creatures is dealt to CARDNAME instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Creature.unblocked | ValidTarget$ You | ReplaceWith$ DmgSelf | IsCombat$ True | IsPresent$ Card.Self+untapped | Description$ As long as CARDNAME is untapped, all combat damage that would be dealt to you by unblocked creatures is dealt to CARDNAME instead.
|
||||
SVar:DmgSelf:AB$DealDamage | Cost$ 0 | CombatDamage$ True | Defined$ Self | DamageSource$ ReplacedSource | NumDmg$ X | References$ X
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
SVar:Rarity:Rare
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Enchantment Aura
|
||||
Text:no text
|
||||
K:Enchant player
|
||||
A:SP$ Attach | Cost$ GW GW | ValidTgts$ Player
|
||||
R:Event$ Moved | Destination$ Graveyard | ValidCard$ Card.OwnedBy Player.EnchantedBy | ReplaceWith$ Reveal | Description$ If a card would be put into enchanted player's graveyard from anywhere, instead that card is revealed and put on the bottom of that player's library.
|
||||
R:Event$ Moved | ActiveZones$ Battlefield | Destination$ Graveyard | ValidCard$ Card.OwnedBy Player.EnchantedBy | ReplaceWith$ Reveal | Description$ If a card would be put into enchanted player's graveyard from anywhere, instead that card is revealed and put on the bottom of that player's library.
|
||||
SVar:Reveal:AB$ ChangeZone | Cost$ 0 | Hidden$ True | Destination$ Library | Defined$ ReplacedCard | LibraryPosition$ -1 | Reveal$ True
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Rare
|
||||
|
||||
@@ -41,6 +41,7 @@ import forge.card.cardfactory.CardFactoryUtil;
|
||||
import forge.card.cost.Cost;
|
||||
import forge.card.mana.ManaCost;
|
||||
import forge.card.replacement.ReplacementEffect;
|
||||
import forge.card.replacement.ReplacementResult;
|
||||
import forge.card.spellability.AbilityMana;
|
||||
import forge.card.spellability.AbilityTriggered;
|
||||
import forge.card.spellability.Spell;
|
||||
@@ -2322,6 +2323,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
sbLong.append("defending player controls untap and block it if able.)");
|
||||
} else if (keyword.get(i).startsWith("MayEffectFromOpeningHand")) {
|
||||
continue;
|
||||
} else if (keyword.get(i).startsWith("ETBReplacement")) {
|
||||
continue;
|
||||
} else if (keyword.get(i).contains("Haunt")) {
|
||||
sb.append("\r\nHaunt (");
|
||||
if (this.isCreature()) {
|
||||
@@ -5079,6 +5082,9 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
* </p>
|
||||
*/
|
||||
public final void untap() {
|
||||
if(getName().equals("Remote Farm")) {
|
||||
System.out.println("HE TOUCHED ME");
|
||||
}
|
||||
if (this.isTapped()) {
|
||||
// Run triggers
|
||||
final Map<String, Object> runParams = new TreeMap<String, Object>();
|
||||
@@ -8065,7 +8071,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
repParams.put("IsCombat", isCombat);
|
||||
repParams.put("Prevention", true);
|
||||
|
||||
if (AllZone.getReplacementHandler().run(repParams)) {
|
||||
if (AllZone.getReplacementHandler().run(repParams) != ReplacementResult.NotReplaced) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -8192,7 +8198,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
repParams.put("DamageAmount", damageIn);
|
||||
repParams.put("IsCombat", isCombat);
|
||||
|
||||
if (AllZone.getReplacementHandler().run(repParams)) {
|
||||
if (AllZone.getReplacementHandler().run(repParams) != ReplacementResult.NotReplaced) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ import forge.card.cost.Cost;
|
||||
import forge.card.cost.CostPayment;
|
||||
import forge.card.mana.ManaCost;
|
||||
import forge.card.mana.ManaCostShard;
|
||||
import forge.card.replacement.ReplacementResult;
|
||||
import forge.card.spellability.Ability;
|
||||
import forge.card.spellability.AbilityActivated;
|
||||
import forge.card.spellability.AbilityStatic;
|
||||
@@ -128,8 +129,9 @@ public class GameAction {
|
||||
repParams.put("Origin", zoneFrom != null ? zoneFrom.getZoneType() : null);
|
||||
repParams.put("Destination", zoneTo.getZoneType());
|
||||
|
||||
if (AllZone.getReplacementHandler().run(repParams)) {
|
||||
if (AllZone.getStack().isResolving(c) && !zoneTo.is(ZoneType.Graveyard)) {
|
||||
ReplacementResult repres = AllZone.getReplacementHandler().run(repParams);
|
||||
if (repres != ReplacementResult.NotReplaced) {
|
||||
if (AllZone.getStack().isResolving(c) && !zoneTo.is(ZoneType.Graveyard) && repres == ReplacementResult.Prevented) {
|
||||
return Singletons.getModel().getGameAction().moveToGraveyard(c);
|
||||
}
|
||||
return c;
|
||||
|
||||
@@ -488,6 +488,11 @@ public class CardCharacteristics {
|
||||
this.sVars = new TreeMap<String, String>(source.getSVars());
|
||||
// String curSetCode = "";
|
||||
this.curSetCode = source.getCurSetCode();
|
||||
|
||||
this.replacementEffects = new ArrayList<ReplacementEffect>();
|
||||
for(ReplacementEffect RE : source.getReplacementEffects()) {
|
||||
this.replacementEffects.add(RE.getCopy());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
package forge.card;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import forge.Card;
|
||||
import forge.GameEntity;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.game.zone.PlayerZone;
|
||||
import forge.game.zone.ZoneType;
|
||||
|
||||
/**
|
||||
* Base class for Triggers and ReplacementEffects.
|
||||
@@ -9,6 +14,75 @@ import forge.GameEntity;
|
||||
*
|
||||
*/
|
||||
public abstract class TriggerReplacementBase {
|
||||
|
||||
/** The host card. */
|
||||
protected Card hostCard;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Getter for the field <code>hostCard</code>.
|
||||
* </p>
|
||||
*
|
||||
* @return a {@link forge.Card} object.
|
||||
*/
|
||||
public final Card getHostCard() {
|
||||
return this.hostCard;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Setter for the field <code>hostCard</code>.
|
||||
* </p>
|
||||
*
|
||||
* @param c
|
||||
* a {@link forge.Card} object.
|
||||
*/
|
||||
public final void setHostCard(final Card c) {
|
||||
this.hostCard = c;
|
||||
}
|
||||
|
||||
protected EnumSet<ZoneType> validHostZones;
|
||||
|
||||
public void setActiveZone(EnumSet<ZoneType> zones) {
|
||||
validHostZones = zones;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* zonesCheck.
|
||||
* </p>
|
||||
*
|
||||
* @return a boolean.
|
||||
*/
|
||||
public final boolean zonesCheck(PlayerZone hostCardZone) {
|
||||
return !this.hostCard.isPhasedOut()
|
||||
&& (validHostZones == null || validHostZones.isEmpty()
|
||||
|| (hostCardZone != null && validHostZones.contains(hostCardZone.getZoneType()))
|
||||
);
|
||||
}
|
||||
|
||||
/** The overriding ability. */
|
||||
private SpellAbility overridingAbility = null;
|
||||
|
||||
/**
|
||||
* Gets the overriding ability.
|
||||
*
|
||||
* @return the overridingAbility
|
||||
*/
|
||||
public SpellAbility getOverridingAbility() {
|
||||
return this.overridingAbility;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the overriding ability.
|
||||
*
|
||||
* @param overridingAbility0
|
||||
* the overridingAbility to set
|
||||
*/
|
||||
public void setOverridingAbility(final SpellAbility overridingAbility0) {
|
||||
this.overridingAbility = overridingAbility0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* matchesValid.
|
||||
|
||||
@@ -2823,6 +2823,10 @@ public class AbilityFactory {
|
||||
final AbilityFactory af = sa.getAbilityFactory();
|
||||
if (af == null) {
|
||||
sa.resolve();
|
||||
if(sa.getSubAbility() != null)
|
||||
{
|
||||
resolve(sa.getSubAbility(),usedStack);
|
||||
}
|
||||
return;
|
||||
}
|
||||
final HashMap<String, String> params = af.getMapParams();
|
||||
|
||||
@@ -1228,7 +1228,7 @@ public class AbilityFactoryPermanentState {
|
||||
}
|
||||
|
||||
for (final Card tgtC : tgtCards) {
|
||||
if (AllZoneUtil.isCardInPlay(tgtC) && ((tgt == null) || tgtC.canBeTargetedBy(sa))) {
|
||||
if ((AllZoneUtil.isCardInPlay(tgtC) || AllZone.getZoneOf(tgtC).is(ZoneType.Stack)) && ((tgt == null) || tgtC.canBeTargetedBy(sa))) {
|
||||
if (tgtC.isUntapped() && (remTapped)) {
|
||||
card.addRemembered(tgtC);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.esotericsoftware.minlog.Log;
|
||||
import forge.AllZone;
|
||||
import forge.AllZoneUtil;
|
||||
import forge.Card;
|
||||
import forge.CardCharacteristicName;
|
||||
import forge.CardList;
|
||||
import forge.CardListFilter;
|
||||
import forge.CardUtil;
|
||||
@@ -36,6 +37,9 @@ import forge.Counters;
|
||||
import forge.Singletons;
|
||||
import forge.card.abilityfactory.AbilityFactory;
|
||||
import forge.card.cost.Cost;
|
||||
import forge.card.replacement.ReplacementEffect;
|
||||
import forge.card.replacement.ReplacementHandler;
|
||||
import forge.card.replacement.ReplacementLayer;
|
||||
import forge.card.spellability.Ability;
|
||||
import forge.card.spellability.AbilityActivated;
|
||||
import forge.card.spellability.AbilityStatic;
|
||||
@@ -1476,6 +1480,47 @@ public class CardFactoryCreatures {
|
||||
|
||||
card.addSpellAbility(finalAb);
|
||||
}
|
||||
|
||||
private static void getCard_EssenceOfTheWild(final Card card,final String cardName) {
|
||||
class EOTWReplacement extends Ability {
|
||||
|
||||
/**
|
||||
* TODO: Write javadoc for Constructor.
|
||||
* @param sourceCard
|
||||
* @param manaCost
|
||||
*/
|
||||
public EOTWReplacement(Card sourceCard, String manaCost) {
|
||||
super(sourceCard, manaCost);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see forge.card.spellability.SpellAbility#resolve()
|
||||
*/
|
||||
@Override
|
||||
public void resolve() {
|
||||
Card movedCard = (Card)this.getReplacingObject("Card");
|
||||
if (movedCard.isCloned()) { // cloning again
|
||||
movedCard.switchStates(CardCharacteristicName.Cloner, CardCharacteristicName.Original);
|
||||
movedCard.setState(CardCharacteristicName.Original);
|
||||
movedCard.clearStates(CardCharacteristicName.Cloner);
|
||||
}
|
||||
movedCard.addAlternateState(CardCharacteristicName.Cloner);
|
||||
movedCard.switchStates(CardCharacteristicName.Original, CardCharacteristicName.Cloner);
|
||||
movedCard.setState(CardCharacteristicName.Original);
|
||||
movedCard.getCharacteristics().copy(this.getSourceCard().getCharacteristics());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SpellAbility repAb = new EOTWReplacement(card,"0");
|
||||
CardFactoryUtil.setupETBReplacementAbility(repAb);
|
||||
|
||||
ReplacementEffect re = ReplacementHandler.parseReplacement("Event$ Moved | ValidCard$ Creature.Other+YouCtrl | Destination$ Battlefield | ActiveZones$ Battlefield | Description$ Creatures you control enter the battlefield as copies of CARDNAME.", card);
|
||||
re.setLayer(ReplacementLayer.Copy);
|
||||
re.setOverridingAbility(repAb);
|
||||
|
||||
card.addReplacementEffect(re);
|
||||
}
|
||||
|
||||
// // This is a hardcoded card template
|
||||
//
|
||||
@@ -1532,7 +1577,10 @@ public class CardFactoryCreatures {
|
||||
} else if (cardName.equals("Duct Crawler") || cardName.equals("Shrewd Hatchling")
|
||||
|| cardName.equals("Spin Engine") || cardName.equals("Screeching Griffin")) {
|
||||
getCard_DuctCrawler(card, cardName);
|
||||
} else if (cardName.equals("Essence of the Wild")) {
|
||||
getCard_EssenceOfTheWild(card, cardName);
|
||||
}
|
||||
|
||||
|
||||
// ***************************************************
|
||||
// end of card specific code
|
||||
|
||||
@@ -46,10 +46,14 @@ import forge.card.abilityfactory.AbilityFactory;
|
||||
import forge.card.cost.Cost;
|
||||
import forge.card.mana.ManaCost;
|
||||
import forge.card.mana.ManaCostShard;
|
||||
import forge.card.replacement.ReplacementEffect;
|
||||
import forge.card.replacement.ReplacementHandler;
|
||||
import forge.card.replacement.ReplacementLayer;
|
||||
import forge.card.spellability.Ability;
|
||||
import forge.card.spellability.AbilityActivated;
|
||||
import forge.card.spellability.AbilityMana;
|
||||
import forge.card.spellability.AbilityStatic;
|
||||
import forge.card.spellability.AbilitySub;
|
||||
import forge.card.spellability.Spell;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.card.spellability.SpellAbilityRestriction;
|
||||
@@ -4807,9 +4811,89 @@ public class CardFactoryUtil {
|
||||
// add ability to instrinic strings so copies/clones create the ability also
|
||||
card.getIntrinsicAbilities().add(abilityStr.toString());
|
||||
}
|
||||
|
||||
final int etbrep = CardFactoryUtil.hasKeyword(card, "ETBReplacement");
|
||||
if (etbrep != -1)
|
||||
{
|
||||
String fullkw = card.getKeyword().get(etbrep);
|
||||
card.getKeyword().remove(etbrep);
|
||||
String[] splitkw = fullkw.split(":");
|
||||
ReplacementLayer layer = ReplacementLayer.smartValueOf(splitkw[1]);
|
||||
AbilityFactory af = new AbilityFactory();
|
||||
SpellAbility repAb = af.getAbility(card.getSVar(splitkw[2]), card);
|
||||
String desc = repAb.getDescription();
|
||||
setupETBReplacementAbility(repAb);
|
||||
|
||||
String repeffstr = "Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | Description$ " + desc;
|
||||
if(splitkw.length == 4) {
|
||||
if(splitkw[3].contains("Optional")) {
|
||||
repeffstr += " | OptionalDecider$ You";
|
||||
}
|
||||
}
|
||||
|
||||
ReplacementEffect re = ReplacementHandler.parseReplacement(repeffstr, card);
|
||||
re.setLayer(layer);
|
||||
re.setOverridingAbility(repAb);
|
||||
|
||||
card.addReplacementEffect(re);
|
||||
}
|
||||
|
||||
return card;
|
||||
}
|
||||
|
||||
public static void setupETBReplacementAbility(SpellAbility sa) {
|
||||
SpellAbility tailend = sa;
|
||||
while(tailend.getSubAbility() != null) {
|
||||
tailend = tailend.getSubAbility();
|
||||
}
|
||||
|
||||
class ETBReplacementMove extends AbilitySub {
|
||||
private static final long serialVersionUID = 704771599662730112L;
|
||||
|
||||
/**
|
||||
* TODO: Write javadoc for Constructor.
|
||||
* @param sourceCard
|
||||
* @param tgt
|
||||
*/
|
||||
public ETBReplacementMove(Card sourceCard, Target tgt) {
|
||||
super(sourceCard, tgt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
forge.Singletons.getModel().getGameAction().moveToPlay(((Card)this.getReplacingObject("Card")));
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see forge.card.spellability.AbilitySub#chkAIDrawback()
|
||||
*/
|
||||
@Override
|
||||
public boolean chkAIDrawback() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see forge.card.spellability.AbilitySub#getCopy()
|
||||
*/
|
||||
@Override
|
||||
public AbilitySub getCopy() {
|
||||
// TODO Auto-generated method stub
|
||||
return new ETBReplacementMove(getSourceCard(),null);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see forge.card.spellability.AbilitySub#doTrigger(boolean)
|
||||
*/
|
||||
@Override
|
||||
public boolean doTrigger(boolean mandatory) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
tailend.setSubAbility(new ETBReplacementMove(sa.getSourceCard(),null));
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
||||
@@ -100,7 +100,11 @@ public class ReplaceDamage extends ReplacementEffect {
|
||||
*/
|
||||
@Override
|
||||
public ReplacementEffect getCopy() {
|
||||
return new ReplaceDamage(this.getMapParams(), this.getHostCard());
|
||||
ReplacementEffect res = new ReplaceDamage(this.getMapParams(), this.getHostCard());
|
||||
res.setOverridingAbility(this.getOverridingAbility());
|
||||
res.setActiveZone(validHostZones);
|
||||
res.setLayer(getLayer());
|
||||
return res;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -59,7 +59,11 @@ public class ReplaceDraw extends ReplacementEffect {
|
||||
*/
|
||||
@Override
|
||||
public ReplacementEffect getCopy() {
|
||||
return new ReplaceDraw(this.getMapParams(), getHostCard());
|
||||
ReplacementEffect res = new ReplaceDraw(this.getMapParams(), this.getHostCard());
|
||||
res.setOverridingAbility(this.getOverridingAbility());
|
||||
res.setActiveZone(validHostZones);
|
||||
res.setLayer(getLayer());
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -60,7 +60,11 @@ public class ReplaceGainLife extends ReplacementEffect {
|
||||
*/
|
||||
@Override
|
||||
public ReplacementEffect getCopy() {
|
||||
return new ReplaceGainLife(this.getMapParams(), getHostCard());
|
||||
ReplacementEffect res = new ReplaceGainLife(this.getMapParams(), this.getHostCard());
|
||||
res.setOverridingAbility(this.getOverridingAbility());
|
||||
res.setActiveZone(validHostZones);
|
||||
res.setLayer(getLayer());
|
||||
return res;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -42,7 +42,11 @@ public class ReplaceGameLoss extends ReplacementEffect {
|
||||
*/
|
||||
@Override
|
||||
public ReplacementEffect getCopy() {
|
||||
return new ReplaceGameLoss(this.getMapParams(), getHostCard());
|
||||
ReplacementEffect res = new ReplaceGameLoss(this.getMapParams(), this.getHostCard());
|
||||
res.setOverridingAbility(this.getOverridingAbility());
|
||||
res.setActiveZone(validHostZones);
|
||||
res.setLayer(getLayer());
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -56,7 +56,11 @@ public class ReplaceMoved extends ReplacementEffect {
|
||||
*/
|
||||
@Override
|
||||
public ReplacementEffect getCopy() {
|
||||
return new ReplaceMoved(this.getMapParams(), this.getHostCard());
|
||||
ReplacementEffect res = new ReplaceMoved(this.getMapParams(), this.getHostCard());
|
||||
res.setOverridingAbility(this.getOverridingAbility());
|
||||
res.setActiveZone(validHostZones);
|
||||
res.setLayer(getLayer());
|
||||
return res;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -35,6 +35,8 @@ import forge.game.zone.ZoneType;
|
||||
*/
|
||||
public abstract class ReplacementEffect extends TriggerReplacementBase {
|
||||
|
||||
private ReplacementLayer layer = ReplacementLayer.None;
|
||||
|
||||
/** The has run. */
|
||||
private boolean hasRun = false;
|
||||
|
||||
@@ -135,32 +137,6 @@ public abstract class ReplacementEffect extends TriggerReplacementBase {
|
||||
this.mapParams = mapParams;
|
||||
}
|
||||
|
||||
/** The host card. */
|
||||
private Card hostCard;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Getter for the field <code>hostCard</code>.
|
||||
* </p>
|
||||
*
|
||||
* @return a {@link forge.Card} object.
|
||||
*/
|
||||
public final Card getHostCard() {
|
||||
return this.hostCard;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Setter for the field <code>hostCard</code>.
|
||||
* </p>
|
||||
*
|
||||
* @param c
|
||||
* a {@link forge.Card} object.
|
||||
*/
|
||||
public final void setHostCard(final Card c) {
|
||||
this.hostCard = c;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can replace.
|
||||
*
|
||||
@@ -415,4 +391,18 @@ public abstract class ReplacementEffect extends TriggerReplacementBase {
|
||||
this.setMapParams(map);
|
||||
this.setHostCard(host);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the layer
|
||||
*/
|
||||
public ReplacementLayer getLayer() {
|
||||
return layer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param layer0 the layer to set
|
||||
*/
|
||||
public void setLayer(ReplacementLayer layer0) {
|
||||
this.layer = layer0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
package forge.card.replacement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -40,17 +41,8 @@ public class ReplacementHandler {
|
||||
|
||||
private final List<ReplacementEffect> tmpEffects = new ArrayList<ReplacementEffect>();
|
||||
|
||||
/**
|
||||
*
|
||||
* Runs any applicable replacement effects.
|
||||
*
|
||||
* @param runParams
|
||||
* the run params,same as for triggers.
|
||||
* @return true if the event was replaced.
|
||||
*/
|
||||
public boolean run(final HashMap<String, Object> runParams) {
|
||||
public ReplacementResult run(final HashMap<String, Object> runParams) {
|
||||
final Object affected = runParams.get("Affected");
|
||||
final List<ReplacementEffect> possibleReplacers = new ArrayList<ReplacementEffect>();
|
||||
Player decider = null;
|
||||
|
||||
// Figure out who decides which of multiple replacements to apply
|
||||
@@ -60,21 +52,66 @@ public class ReplacementHandler {
|
||||
} else {
|
||||
decider = ((Card) affected).getController();
|
||||
}
|
||||
|
||||
|
||||
if(runParams.get("Event").equals("Moved")) {
|
||||
ReplacementResult res = run(runParams,ReplacementLayer.Control,decider);
|
||||
if(res != ReplacementResult.NotReplaced) {
|
||||
return res;
|
||||
}
|
||||
res = run(runParams,ReplacementLayer.Copy,decider);
|
||||
if(res != ReplacementResult.NotReplaced) {
|
||||
return res;
|
||||
}
|
||||
res = run(runParams,ReplacementLayer.Other,decider);
|
||||
if(res != ReplacementResult.NotReplaced) {
|
||||
return res;
|
||||
}
|
||||
res = run(runParams,ReplacementLayer.None,decider);
|
||||
if(res != ReplacementResult.NotReplaced) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ReplacementResult res = run(runParams,ReplacementLayer.None,decider);
|
||||
if(res != ReplacementResult.NotReplaced) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
return ReplacementResult.NotReplaced;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Runs any applicable replacement effects.
|
||||
*
|
||||
* @param runParams
|
||||
* the run params,same as for triggers.
|
||||
* @return true if the event was replaced.
|
||||
*/
|
||||
public ReplacementResult run(final HashMap<String, Object> runParams, final ReplacementLayer layer,final Player decider) {
|
||||
|
||||
final List<ReplacementEffect> possibleReplacers = new ArrayList<ReplacementEffect>();
|
||||
if(layer == ReplacementLayer.Other && ((String)runParams.get("Event")).equals("Moved")) {
|
||||
System.out.println("Shdf");
|
||||
}
|
||||
|
||||
// Round up Non-static replacement effects ("Until EOT," or
|
||||
// "The next time you would..." etc)
|
||||
for (final ReplacementEffect replacementEffect : this.tmpEffects) {
|
||||
if (!replacementEffect.hasRun() && replacementEffect.canReplace(runParams)) {
|
||||
if (!replacementEffect.hasRun() && replacementEffect.canReplace(runParams) && replacementEffect.getLayer() == layer) {
|
||||
possibleReplacers.add(replacementEffect);
|
||||
}
|
||||
}
|
||||
|
||||
// Round up Static replacement effects
|
||||
for (final Player p : AllZone.getPlayersInGame()) {
|
||||
for (final Card crd : p.getCardsIn(ZoneType.Battlefield)) {
|
||||
for (final Card crd : p.getAllCards()) {
|
||||
for (final ReplacementEffect replacementEffect : crd.getReplacementEffects()) {
|
||||
if (replacementEffect.requirementsCheck()) {
|
||||
if (!replacementEffect.hasRun() && replacementEffect.canReplace(runParams)) {
|
||||
if (!replacementEffect.hasRun() && replacementEffect.canReplace(runParams) && replacementEffect.getLayer() == layer && replacementEffect.zonesCheck(AllZone.getZoneOf(crd))) {
|
||||
possibleReplacers.add(replacementEffect);
|
||||
}
|
||||
}
|
||||
@@ -83,7 +120,7 @@ public class ReplacementHandler {
|
||||
}
|
||||
|
||||
if (possibleReplacers.isEmpty()) {
|
||||
return false;
|
||||
return ReplacementResult.NotReplaced;
|
||||
}
|
||||
|
||||
ReplacementEffect chosenRE = null;
|
||||
@@ -106,23 +143,24 @@ public class ReplacementHandler {
|
||||
possibleReplacers.remove(chosenRE);
|
||||
|
||||
if (chosenRE != null) {
|
||||
chosenRE.setHasRun(true);
|
||||
if (this.executeReplacement(runParams, chosenRE, decider)) {
|
||||
chosenRE.setHasRun(true);
|
||||
ReplacementResult res = this.executeReplacement(runParams, chosenRE, decider);
|
||||
if (res != ReplacementResult.NotReplaced) {
|
||||
chosenRE.setHasRun(false);
|
||||
AllZone.getGameLog().add("ReplacementEffect", chosenRE.toString(), 2);
|
||||
return true;
|
||||
return res;
|
||||
} else {
|
||||
if (possibleReplacers.size() == 0) {
|
||||
return false;
|
||||
return res;
|
||||
}
|
||||
else {
|
||||
boolean ret = run(runParams);
|
||||
ReplacementResult ret = run(runParams);
|
||||
chosenRE.setHasRun(false);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
return ReplacementResult.NotReplaced;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -134,9 +172,11 @@ public class ReplacementHandler {
|
||||
* @param replacementEffect
|
||||
* the replacement effect to run
|
||||
*/
|
||||
private boolean executeReplacement(final HashMap<String, Object> runParams,
|
||||
private ReplacementResult executeReplacement(final HashMap<String, Object> runParams,
|
||||
final ReplacementEffect replacementEffect, final Player decider) {
|
||||
|
||||
if(replacementEffect.getHostCard().getName().equals("Clone")) {
|
||||
System.out.println("And here we go.");
|
||||
}
|
||||
final HashMap<String, String> mapParams = replacementEffect.getMapParams();
|
||||
|
||||
SpellAbility effectSA = null;
|
||||
@@ -149,7 +189,21 @@ public class ReplacementHandler {
|
||||
|
||||
effectSA = abilityFactory.getAbility(effectAbString, replacementEffect.getHostCard());
|
||||
|
||||
replacementEffect.setReplacingObjects(runParams, effectSA);
|
||||
SpellAbility tailend = effectSA;
|
||||
do
|
||||
{
|
||||
replacementEffect.setReplacingObjects(runParams, tailend);
|
||||
tailend = tailend.getSubAbility();
|
||||
} while(tailend != null);
|
||||
}
|
||||
else if (replacementEffect.getOverridingAbility() != null) {
|
||||
effectSA = replacementEffect.getOverridingAbility();
|
||||
SpellAbility tailend = effectSA;
|
||||
do
|
||||
{
|
||||
replacementEffect.setReplacingObjects(runParams, tailend);
|
||||
tailend = tailend.getSubAbility();
|
||||
} while(tailend != null);
|
||||
}
|
||||
|
||||
// Decider gets to choose wether or not to apply the replacement.
|
||||
@@ -168,19 +222,19 @@ public class ReplacementHandler {
|
||||
buildQuestion.append(replacementEffect.toString());
|
||||
buildQuestion.append(")");
|
||||
if (!GameActionUtil.showYesNoDialog(replacementEffect.getHostCard(), buildQuestion.toString())) {
|
||||
return false;
|
||||
return ReplacementResult.NotReplaced;
|
||||
}
|
||||
} else {
|
||||
// AI-logic
|
||||
if (!replacementEffect.aiShouldRun(effectSA)) {
|
||||
return false;
|
||||
return ReplacementResult.NotReplaced;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mapParams.containsKey("Prevent")) {
|
||||
if (mapParams.get("Prevent").equals("True")) {
|
||||
return true; // Nothing should replace the event.
|
||||
return ReplacementResult.Prevented; // Nothing should replace the event.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,7 +244,7 @@ public class ReplacementHandler {
|
||||
ComputerUtil.playNoStack(effectSA);
|
||||
}
|
||||
|
||||
return true;
|
||||
return ReplacementResult.Replaced;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -235,6 +289,11 @@ public class ReplacementHandler {
|
||||
} else if (eventToReplace.equals("Moved")) {
|
||||
ret = new ReplaceMoved(mapParams, host);
|
||||
}
|
||||
|
||||
String activeZones = mapParams.get("ActiveZones");
|
||||
if (null != activeZones) {
|
||||
ret.setActiveZone(EnumSet.copyOf(ZoneType.listValueOf(activeZones)));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
32
src/main/java/forge/card/replacement/ReplacementLayer.java
Normal file
32
src/main/java/forge/card/replacement/ReplacementLayer.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package forge.card.replacement;
|
||||
|
||||
import forge.CardCharacteristicName;
|
||||
|
||||
/**
|
||||
* TODO: Write javadoc for this type.
|
||||
*
|
||||
*/
|
||||
public enum ReplacementLayer {
|
||||
Control,
|
||||
Copy,
|
||||
Other,
|
||||
None;
|
||||
|
||||
/**
|
||||
* TODO: Write javadoc for this method.
|
||||
* @param substring
|
||||
* @return
|
||||
*/
|
||||
public static ReplacementLayer smartValueOf(String value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
final String valToCompate = value.trim();
|
||||
for (final ReplacementLayer v : ReplacementLayer.values()) {
|
||||
if (v.name().compareToIgnoreCase(valToCompate) == 0) {
|
||||
return v;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("No element named " + value + " in enum ReplacementLayer");
|
||||
}
|
||||
}
|
||||
11
src/main/java/forge/card/replacement/ReplacementResult.java
Normal file
11
src/main/java/forge/card/replacement/ReplacementResult.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package forge.card.replacement;
|
||||
|
||||
/**
|
||||
* TODO: Write javadoc for this type.
|
||||
*
|
||||
*/
|
||||
public enum ReplacementResult {
|
||||
Replaced,
|
||||
NotReplaced,
|
||||
Prevented;
|
||||
}
|
||||
@@ -127,8 +127,7 @@ public abstract class Trigger extends TriggerReplacementBase {
|
||||
|
||||
private TriggerType mode;
|
||||
|
||||
/** The overriding ability. */
|
||||
private SpellAbility overridingAbility = null;
|
||||
|
||||
|
||||
private HashMap<String, Object> storedTriggeredObjects = null;
|
||||
|
||||
@@ -157,32 +156,6 @@ public abstract class Trigger extends TriggerReplacementBase {
|
||||
return this.storedTriggeredObjects;
|
||||
}
|
||||
|
||||
/** The host card. */
|
||||
private Card hostCard;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Getter for the field <code>hostCard</code>.
|
||||
* </p>
|
||||
*
|
||||
* @return a {@link forge.Card} object.
|
||||
*/
|
||||
public final Card getHostCard() {
|
||||
return this.hostCard;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Setter for the field <code>hostCard</code>.
|
||||
* </p>
|
||||
*
|
||||
* @param c
|
||||
* a {@link forge.Card} object.
|
||||
*/
|
||||
public final void setHostCard(final Card c) {
|
||||
this.hostCard = c;
|
||||
}
|
||||
|
||||
/** The is intrinsic. */
|
||||
private boolean isIntrinsic;
|
||||
|
||||
@@ -251,20 +224,6 @@ public abstract class Trigger extends TriggerReplacementBase {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* zonesCheck.
|
||||
* </p>
|
||||
*
|
||||
* @return a boolean.
|
||||
*/
|
||||
public final boolean zonesCheck(PlayerZone hostCardZone) {
|
||||
return !this.getHostCard().isPhasedOut()
|
||||
&& (validHostZones == null || validHostZones.isEmpty()
|
||||
|| (hostCardZone != null && validHostZones.contains(hostCardZone.getZoneType()))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* phasesCheck.
|
||||
@@ -560,7 +519,7 @@ public abstract class Trigger extends TriggerReplacementBase {
|
||||
|
||||
/** The temporary. */
|
||||
private boolean temporary = false;
|
||||
private EnumSet<ZoneType> validHostZones;
|
||||
|
||||
|
||||
/**
|
||||
* Sets the temporary.
|
||||
@@ -619,25 +578,6 @@ public abstract class Trigger extends TriggerReplacementBase {
|
||||
this.runParams = runParams0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the overriding ability.
|
||||
*
|
||||
* @return the overridingAbility
|
||||
*/
|
||||
public SpellAbility getOverridingAbility() {
|
||||
return this.overridingAbility;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the overriding ability.
|
||||
*
|
||||
* @param overridingAbility0
|
||||
* the overridingAbility to set
|
||||
*/
|
||||
public void setOverridingAbility(final SpellAbility overridingAbility0) {
|
||||
this.overridingAbility = overridingAbility0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the id.
|
||||
*
|
||||
@@ -683,18 +623,13 @@ public abstract class Trigger extends TriggerReplacementBase {
|
||||
copy.setID(this.getId());
|
||||
copy.setMode(this.getMode());
|
||||
copy.setTriggerPhases(this.validPhases);
|
||||
copy.setTriggerZone(validHostZones);
|
||||
copy.setActiveZone(validHostZones);
|
||||
}
|
||||
|
||||
public boolean isStatic() {
|
||||
return getMapParams().containsKey("Static"); // && params.get("Static").equals("True") [always true if present]
|
||||
}
|
||||
|
||||
|
||||
public void setTriggerZone(EnumSet<ZoneType> zones) {
|
||||
validHostZones = zones;
|
||||
}
|
||||
|
||||
public void setTriggerPhases(List<PhaseType> phases) {
|
||||
validPhases = phases;
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ public class TriggerHandler {
|
||||
|
||||
String triggerZones = mapParams.get("TriggerZones");
|
||||
if (null != triggerZones) {
|
||||
ret.setTriggerZone(EnumSet.copyOf(ZoneType.listValueOf(triggerZones)));
|
||||
ret.setActiveZone(EnumSet.copyOf(ZoneType.listValueOf(triggerZones)));
|
||||
}
|
||||
|
||||
String triggerPhases = mapParams.get("Phase");
|
||||
|
||||
@@ -39,6 +39,7 @@ import forge.GameEntity;
|
||||
import forge.Singletons;
|
||||
import forge.card.cardfactory.CardFactoryUtil;
|
||||
import forge.card.mana.ManaPool;
|
||||
import forge.card.replacement.ReplacementResult;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.card.staticability.StaticAbility;
|
||||
import forge.card.trigger.TriggerType;
|
||||
@@ -142,7 +143,7 @@ public abstract class Player extends GameEntity {
|
||||
|
||||
/** The Constant ALL_ZONES. */
|
||||
public static final List<ZoneType> ALL_ZONES = Collections.unmodifiableList(Arrays.asList(ZoneType.Battlefield,
|
||||
ZoneType.Library, ZoneType.Graveyard, ZoneType.Hand, ZoneType.Exile, ZoneType.Command, ZoneType.Ante));
|
||||
ZoneType.Library, ZoneType.Graveyard, ZoneType.Hand, ZoneType.Exile, ZoneType.Command, ZoneType.Ante, ZoneType.Stack));
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -349,7 +350,7 @@ public abstract class Player extends GameEntity {
|
||||
repParams.put("Event", "GainLife");
|
||||
repParams.put("Affected", this);
|
||||
repParams.put("LifeGained", toGain);
|
||||
if (AllZone.getReplacementHandler().run(repParams)) {
|
||||
if (AllZone.getReplacementHandler().run(repParams) != ReplacementResult.NotReplaced) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -772,7 +773,7 @@ public abstract class Player extends GameEntity {
|
||||
repParams.put("DamageAmount", damage);
|
||||
repParams.put("IsCombat", isCombat);
|
||||
|
||||
if (AllZone.getReplacementHandler().run(repParams)) {
|
||||
if (AllZone.getReplacementHandler().run(repParams) != ReplacementResult.NotReplaced) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -822,7 +823,7 @@ public abstract class Player extends GameEntity {
|
||||
repParams.put("IsCombat", isCombat);
|
||||
repParams.put("Prevention", true);
|
||||
|
||||
if (AllZone.getReplacementHandler().run(repParams)) {
|
||||
if (AllZone.getReplacementHandler().run(repParams) != ReplacementResult.NotReplaced) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1255,7 +1256,7 @@ public abstract class Player extends GameEntity {
|
||||
repRunParams.put("Event", "Draw");
|
||||
repRunParams.put("Affected", this);
|
||||
|
||||
if (AllZone.getReplacementHandler().run(repRunParams)) {
|
||||
if (AllZone.getReplacementHandler().run(repRunParams) != ReplacementResult.NotReplaced) {
|
||||
return drawn;
|
||||
}
|
||||
|
||||
@@ -1378,10 +1379,19 @@ public abstract class Player extends GameEntity {
|
||||
public final CardList getCardsIn(final List<ZoneType> zones) {
|
||||
final CardList result = new CardList();
|
||||
for (final ZoneType z : zones) {
|
||||
if(z == ZoneType.Stack) {
|
||||
for(Card c : AllZone.getStackZone().getCards())
|
||||
{
|
||||
if(c.getOwner().equals(this)) {
|
||||
result.add(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.getZone(z) != null) {
|
||||
result.addAll(this.getZone(z).getCards());
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2172,7 +2182,7 @@ public abstract class Player extends GameEntity {
|
||||
runParams.put("Affected", this);
|
||||
runParams.put("Event", "GameLoss");
|
||||
|
||||
if (AllZone.getReplacementHandler().run(runParams)) {
|
||||
if (AllZone.getReplacementHandler().run(runParams) != ReplacementResult.NotReplaced) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,6 +68,10 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
|
||||
|
||||
public void add(final Object o, boolean update) {
|
||||
final Card c = (Card) o;
|
||||
|
||||
if(zoneName == ZoneType.Graveyard && c.getName().equals("Clone")) {
|
||||
System.out.println("I'm not a freak.");
|
||||
}
|
||||
|
||||
// Immutable cards are usually emblems,effects and the mana pool and we
|
||||
// don't want to log those.
|
||||
|
||||
Reference in New Issue
Block a user