It is currently 11 Sep 2025, 20:40
   
Text Size

Activated Replacement Abilities

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Activated Replacement Abilities

Postby squee1968 » 06 May 2012, 21:30

Some time ago, when Hellfish first implemented replacement effects, marc and I had a conversation via PM about this subject, and I sent him the words cycle from onslaught. At that time, they didn't work, because they weren't an activated replacement effect. Now that I see that they are indeed possible, and there are ALOT of cards that could be scripted in this manner (around 100 or so). What I'm wondering, are there any plans for a different method of scripting these types of cards? Like maybe a new AF, or something? I'd be willing to start scripting them all like the ones below, either as part of the thread on Card Contributions or as a separate project, whichever you choose. But I didn't want to get too far into this without knowing whether they'd be accepted or not.

Code: Select all
Name:Words of War
ManaCost:2 R
Types:Enchantment
Text:no text
A:AB$ Effect | Cost$ 1 | Name$ Words of War Effect | ReplacementEffects$ DrawReplace | SVars$ ExileEffect,WarDamage | SpellDescription$ The next time you would draw a card this turn, CARDNAME deals 2 damage to target creature or player instead.
SVar:DrawReplace:Event$ Draw | ValidPlayer$ You | ReplaceWith$ WarDamage
SVar:WarDamage:AB$DealDamage | Cost$ 0 | Tgt$ TgtCP | NumDmg$ 2 | SubAbility$ ExileEffect
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Battlefield | Destination$ Exile
SVar:RemRandomDeck:True
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/words_of_war.jpg
SetInfo:ONS|Rare|http://magiccards.info/scans/on/en/244.jpg
Oracle:{1}: The next time you would draw a card this turn, Words of War deals 2 damage to target creature or player instead.
End
Code: Select all
Name:Words of Waste
ManaCost:2 B
Types:Enchantment
Text:no text
A:AB$ Effect | Cost$ 1 | Name$ Words of Waste Effect | ReplacementEffects$ DrawReplace | SVars$ ExileEffect,WasteCard | SpellDescription$ The next time you would draw a card this turn, each opponent discards a card instead.
SVar:DrawReplace:Event$ Draw | ValidPlayer$ You | ReplaceWith$ WasteCard
SVar:WasteCard:AB$Discard | Cost$ 0 | Defined$ Opponent | NumCards$ 1 | Mode$ TgtChoose | SubAbility$ ExileEffect
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Battlefield | Destination$ Exile
SVar:RemRandomDeck:True
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/words_of_waste.jpg
SetInfo:ONS|Rare|http://magiccards.info/scans/on/en/182.jpg
Oracle:{1}: The next time you would draw a card this turn, each opponent discards a card instead.
End
Code: Select all
Name:Words of Wilding
ManaCost:2 G
Types:Enchantment
Text:no text
A:AB$ Effect | Cost$ 1 | Name$ Words of Wilding Effect | ReplacementEffects$ DrawReplace | SVars$ ExileEffect,WildToken | SpellDescription$ The next time you would draw a card this turn, put a 2/2 green Bear creature token onto the battlefield instead.
SVar:DrawReplace:Event$ Draw | ValidPlayer$ You | ReplaceWith$ WildToken
SVar:WildToken:AB$Token | Cost$ 0 | TokenAmount$ 1 | TokenOwner$ You | TokenName$ Bear | TokenTypes$ Creature,Bear | TokenColors$ Green | TokenPower$ 2 | TokenToughness$ 2 | SubAbility$ ExileEffect
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Battlefield | Destination$ Exile
SVar:RemRandomDeck:True
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/words_of_wilding.jpg
SetInfo:ONS|Rare|http://magiccards.info/scans/on/en/305.jpg
Oracle:{1}: The next time you would draw a card this turn, put a 2/2 green Bear creature token onto the battlefield instead.
End
Code: Select all
Name:Words of Wind
ManaCost:2 U
Types:Enchantment
Text:no text
A:AB$ Effect | Cost$ 1 | Name$ Words of Wind Effect | ReplacementEffects$ DrawReplace | SVars$ ExileEffect,BounceYou,BounceOpp | SpellDescription$ The next time you would draw a card this turn, each player returns a permanent he or she controls to its owner's hand instead.
SVar:DrawReplace:Event$ Draw | ValidPlayer$ You | ReplaceWith$ BounceYou
SVar:BounceYou:AB$ ChangeZone | Cost$ 0 | Origin$ Battlefield | Destination$ Hand | ChangeType$ Permanent.YouCtrl | ChangeNum$ 1 | Hidden$ True | IsCurse$ True | SubAbility$ BounceOpp
SVar:BounceOpp:DB$ChangeZone | Origin$ Battlefield | Destination$ Hand | DefinedPlayer$ Opponent | ChangeType$ Permanent.YouDontCtrl | ChangeNum$ 1 | Hidden$ True | IsCurse$ True | SubAbility$ ExileEffect
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Battlefield | Destination$ Exile
SVar:RemRandomDeck:True
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/words_of_wind.jpg
SetInfo:ONS|Rare|http://magiccards.info/scans/on/en/122.jpg
Oracle:{1}: The next time you would draw a card this turn, each player returns a permanent he or she controls to its owner's hand instead.
End
Code: Select all
Name:Words of Worship
ManaCost:2 W
Types:Enchantment
Text:no text
A:AB$ Effect | Cost$ 1 | Name$ Words of Worship Effect | ReplacementEffects$ DrawReplace | SVars$ ExileEffect,WordLife | SpellDescription$ The next time you would draw a card this turn, you gain 5 life instead.
SVar:DrawReplace:Event$ Draw | ValidPlayer$ You | ReplaceWith$ WordLife
SVar:WordLife:AB$GainLife | Cost$ 0 | LifeAmount$ 5 | SubAbility$ ExileEffect
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Battlefield | Destination$ Exile
SVar:RemRandomDeck:True
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/words_of_worship.jpg
SetInfo:ONS|Rare|http://magiccards.info/scans/on/en/61.jpg
Oracle:{1}: The next time you would draw a card this turn, you gain 5 life instead.
End
I've been playtesting Words of Wind extensively, as it was the last card I needed for my enchantress deck, and it seems to be working perfectly.
squee1968
 
Posts: 254
Joined: 18 Nov 2011, 03:28
Has thanked: 110 times
Been thanked: 45 times

Re: Activated Replacement Abilities

Postby friarsol » 06 May 2012, 22:05

Without having actually tried them, I don't believe they are quite right:

At the very least, for the ones that target you need to target as you are activating the original ability, not as part of the replacement (which doesn't have the right timing to allow targeting).
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Activated Replacement Abilities

Postby squee1968 » 07 May 2012, 01:09

Good catch, Sol, and quite right. The only card that actually targets is Words of War. Does this fix that issue?

Code: Select all
Name:Words of War
ManaCost:2 R
Types:Enchantment
Text:no text
A:AB$ Pump | Cost$ 1 | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | RememberTargets$ True | Subability$ FightinWords
SVar:FightinWords:AB$ Effect | Cost$ 0 | Name$ Words of War Effect | ReplacementEffects$ DrawReplace | SVars$ ExileEffect,WarDamage | SpellDescription$ The next time you would draw a card this turn, CARDNAME deals 2 damage to target creature or player instead.
SVar:DrawReplace:Event$ Draw | ValidPlayer$ You | ReplaceWith$ WarDamage
SVar:WarDamage:AB$DealDamage | Cost$ 0 | ValidTgts$ Creature.IsRemembered,Player.IsRemembered | NumDmg$ 2 | SubAbility$ ExileEffect
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Battlefield | Destination$ Exile
SVar:RemRandomDeck:True
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/words_of_war.jpg
SetInfo:ONS|Rare|http://magiccards.info/scans/on/en/244.jpg
Oracle:{1}: The next time you would draw a card this turn, Words of War deals 2 damage to target creature or player instead.
End
Regarding to Words of Waste, do you also have to choose the player upon activation? I'm pretty sure it could be solved in a similar manner.
squee1968
 
Posts: 254
Joined: 18 Nov 2011, 03:28
Has thanked: 110 times
Been thanked: 45 times

Re: Activated Replacement Abilities

Postby Sloth » 07 May 2012, 14:32

squee1968 wrote:Good catch, Sol, and quite right. The only card that actually targets is Words of War. Does this fix that issue?
I've added all Words but Words of War. Thanks Squee.

The source of the damage should be Words of War itself and not the Effect. The Effect should remember (imprint) the source (the enchantment) and use the "DamageSource" parameter.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Activated Replacement Abilities

Postby squee1968 » 07 May 2012, 17:01

I think I've got it now. I used Mirror Strike as a template, and came up with this.

Code: Select all
Name:Words of War
ManaCost:2 R
Types:Enchantment
Text:no text
A:AB$ Pump | Cost$ 1 | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | RememberTargets$ True | ImprintCards$ Self | Subability$ FightinWords
SVar:FightinWords:AB$ Effect | Cost$ 0 | Name$ Words of War Effect | ReplacementEffects$ DrawReplace | SVars$ ExileEffect,WarDamage | SpellDescription$ The next time you would draw a card this turn, CARDNAME deals 2 damage to target creature or player instead.
SVar:DrawReplace:Event$ Draw | ValidPlayer$ You | ReplaceWith$ WarDamage
SVar:WarDamage:AB$DealDamage | Cost$ 0 | ValidTgts$ Remembered | DamageSource$ Card.IsImprinted | NumDmg$ 2 | SubAbility$ ExileEffect
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Battlefield | Destination$ Exile
SVar:RemRandomDeck:True
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/words_of_war.jpg
SetInfo:ONS|Rare|http://magiccards.info/scans/on/en/244.jpg
Oracle:{1}: The next time you would draw a card this turn, Words of War deals 2 damage to target creature or player instead.
End
I also changed the 'ValidTgts$ Creature.IsRemembered,Player.IsRemembered' to 'ValidTgts$ Remembered'.
squee1968
 
Posts: 254
Joined: 18 Nov 2011, 03:28
Has thanked: 110 times
Been thanked: 45 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 48 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 48 users online :: 0 registered, 0 hidden and 48 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 48 guests

Login Form