It is currently 09 Jun 2025, 22:22
   
Text Size

Card Development Questions

Post MTG Forge Related Programming Questions Here

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

Re: Card Development Questions

Postby friarsol » 17 Feb 2011, 14:51

Zirbert wrote:
friarsol wrote:
Zirbert wrote:- I assume this defaults to exiling cards from my own graveyard; is there syntax for a cost of "exile a card from an opponent's graveyard", or "exile a card from any graveyard"? I don't think any cards exist with that sort of cost, but I'd like to get a handle on the syntax. You also never know where Wizards will go with future design.
And that's where you'd be wrong: Night Soil.
Quite right! And ironically, that's been one of my favourite cards since it was first printed, a staple in almost every green deck I've ever built. It's been errata'ed over the years as to whether the removal is a cost or an effect, but it's definitely established as a cost now.

So, can we now script this one?
I think it was always a cost. See how the removal comes before the "to" in the text? That was early Magic speak for you have to pay that right away.

Anyway, I'm not sure if Night Soil will ever be scripted since your first choice is limited to graveyards with 2+ creatures. And your second choice is limited to the same graveyard you just grabbed a creature from. A very complex situation.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby friarsol » 17 Feb 2011, 16:48

jeffwadsworth wrote:Okay, this one is baffling. Here is a card that is being converted to script. The trigger goes off but I am not allowed to see the library, etc. It just fizzles after the cost is paid. What am I missing? Bear in mind, you must remove all code related to the card in the source.

Code: Select all
Name:Rootwater Thief
Hmmm.. this may not work currently with ChangeZone. Generally, the person who activates ChangeZone is the person that gets to do the searching. When Defined$ is used that person gets to do the searching. So we'll need for ChangeZone to have a new parameter (called Searcher or something) where that player is the one that is searching for a card, and Defined$ will be paired more closely with Target to represent where the searching is occurring. We can default Seacher to always mean "You" unless otherwise specified (such as the case with Fertilid, which caused this issue in the first place.)

This may not make sense to you, but basically it doesn't work right now due to some concessions written in the code due to Fertilid.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby jeffwadsworth » 17 Feb 2011, 22:10

Thanks for checking it out, Sol.

Here is one for Hellfish. I am testing Heat Stroke:

Name:Heat Stroke
ManaCost:2 R
Types:Enchantment Aura
Text:no text
T:Mode$ Phase | Phase$ EndCombat | ValidPlayer$ Each | TriggerZones$ Battlefield | Execute$ TrigDestroy | TriggerDescription$ At end of combat, destroy each creature that blocked or was blocked this turn.
SVar:TrigDestroy:AB$DestroyAll | Cost$ 0 | ValidCards$ Creature.blocked,Creature.blocking
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/heat_stroke.jpg
End
This does not trigger at all. Any ideas?
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Card Development Questions

Postby jeffwadsworth » 17 Feb 2011, 23:48

Cheers.
Last edited by jeffwadsworth on 18 Feb 2011, 01:48, edited 1 time in total.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Card Development Questions

Postby Zirbert » 18 Feb 2011, 00:00

Sloth wrote:No, it's restricted to your own graveyard. Types work as you descibe though (ExileFromGrave<2/Artifact> and ExileFromGrave<1/Creature>). This time I even updated the Wiki.
Thanks, Sloth - I'm hoping to get some new cards coded in the next few days using this function. From a quick Gatherer check, I'd say there are about 18 that I can do up (minus any that are already done - I'll check the latest version of cardsfolder frequently while I'm working on them).

-Zirbert
Zirbert
 
Posts: 512
Joined: 13 Oct 2010, 16:04
Has thanked: 104 times
Been thanked: 19 times

Re: Card Development Questions

Postby ZzzzSleep » 18 Feb 2011, 03:43

I'm looking at scripting Splintering Wind, but need some help...
Name:Splintering Wind
ManaCost:2 G G
Types:Enchantment
Text:no text
A:AB$DealDamage | Cost$ 2 G | Tgt$ TgtC | NumDmg$ 1 | SubAbility$ SVar=MakeSplinter | SpellDescription$ CARDNAME deals 1 damage to target creature. Put a 1/1 green Splinter creature token onto the battlefield. It has flying and "Cumulative upkeep G." When it leaves the battlefield, it deals 1 damage to you and each creature you control.
SVar:MakeSplinter:DB$Token | Cost$ 0 | TokenAmount$ 1 | TokenName$ Splinter | TokenTypes$ Creature,Splinter | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Flying<>Cumulative upkeep:G |
SVar:Rarity:Uncommon
End
Is there any way to add a leaves play trigger to the token? Or is this card not scriptable just yet?
ZzzzSleep
 
Posts: 182
Joined: 29 Oct 2010, 02:19
Has thanked: 18 times
Been thanked: 18 times

Re: Card Development Questions

Postby jeffwadsworth » 18 Feb 2011, 04:49

ZzzzSleep wrote:I'm looking at scripting Splintering Wind, but need some help...
Name:Splintering Wind
ManaCost:2 G G
Types:Enchantment
Text:no text
A:AB$DealDamage | Cost$ 2 G | Tgt$ TgtC | NumDmg$ 1 | SubAbility$ SVar=MakeSplinter | SpellDescription$ CARDNAME deals 1 damage to target creature. Put a 1/1 green Splinter creature token onto the battlefield. It has flying and "Cumulative upkeep G." When it leaves the battlefield, it deals 1 damage to you and each creature you control.
SVar:MakeSplinter:DB$Token | Cost$ 0 | TokenAmount$ 1 | TokenName$ Splinter | TokenTypes$ Creature,Splinter | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Flying<>Cumulative upkeep:G |
SVar:Rarity:Uncommon
End
Is there any way to add a leaves play trigger to the token? Or is this card not scriptable just yet?
There indeed is dude. Check out TokenTriggers$. If you have the SVN, check out AbilityFactory_Token.java for the complete list of token goodies.

So, try something like TokenTriggers$ TriggerChangesZone with a SVar:TriggerChangesZone:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Execute$ TrigDamage, etc.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Card Development Questions

Postby Hellfish » 18 Feb 2011, 11:42

So there WERE cards that created tokens with triggered abilities! :P
Keep in mind,though, you'll have to use the TokenSVars$ parameter as well, in order to add the triggered ability as an SVar.

EDIT:
Jeff: I took a look at it, and I might be doing things in a non-standard way in that trigger. The ValidPlayer parameter expects "Player"(Any player),"You" or "Opponent", not "Each" currently. I will add "Each" as an acceptable parameter to match up with Defined$.

Oh, and Heat Stroke is not an Aura ;)
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Card Development Questions

Postby lazylockie » 22 Feb 2011, 03:33

Is there a way to get the amount of damage from DamageDone trigger? (Retaliator Griffin, Blood Hound)
lazylockie
 
Posts: 508
Joined: 13 Jul 2010, 22:44
Has thanked: 74 times
Been thanked: 15 times

Re: Card Development Questions

Postby jeffwadsworth » 22 Feb 2011, 04:15

lazylockie wrote:Is there a way to get the amount of damage from DamageDone trigger? (Retaliator Griffin, Blood Hound)
Not at this time.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Card Development Questions

Postby jeffwadsworth » 22 Feb 2011, 16:33

Are there any plans to add a "skip phase" method? Sol mentioned that it may already exist...
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Card Development Questions

Postby friarsol » 22 Feb 2011, 16:47

jeffwadsworth wrote:Are there any plans to add a "skip phase" method? Sol mentioned that it may already exist...
Certain cards are hard-coded already. I suggested we add a keyword.
http://code.google.com/p/cardforge/issues/detail?id=114
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby jeffwadsworth » 23 Feb 2011, 17:47

Testing the card Nihilith. The script below does not remove the TIME counter from the suspended Nihilith. Am I missing something?

Code: Select all
Name:Nihilith
ManaCost:4 B B
Types:Creature Horror
Text:no text
PT:4/4
K:Fear
K:Suspend:7:1 B
T:Mode$ ChangesZone | ValidCard$ Card.YouDontCtrl | Origin$ Any | Destination$ Graveyard | TriggerZones$ Exile | IsPresent$ Card.Self+countersGE1TIME | PresentZone$ Exile | Execute$ TrigRemoveCounter | TriggerDescription$ Whenever a card is put into an opponent's graveyard from anywhere, if CARDNAME is suspended, you may remove a time counter from CARDNAME.
SVar:TrigRemoveCounter:AB$RemoveCounter | Cost$ 0 | Defined$ Self | CounterType$ TIME | CounterNum$ 1
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/nihilith.jpg
End
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Card Development Questions

Postby friarsol » 23 Feb 2011, 18:13

I think Remove Counters AFs check to make sure the card is on the battlefield during resolution. Try with 6758 I just updated it to allow Exile as well.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby jeffwadsworth » 23 Feb 2011, 21:23

friarsol wrote:I think Remove Counters AFs check to make sure the card is on the battlefield during resolution. Try with 6758 I just updated it to allow Exile as well.
Worked perfecly. Thanks.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 16 guests


Who is online

In total there are 16 users online :: 0 registered, 0 hidden and 16 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 16 guests

Login Form