Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
2013




Creating Card Card Coding Help
Moderator: CCGHQ Admins
2 posts
• Page 1 of 1
Creating Card Card Coding Help
by STKL » 06 Jan 2013, 14:35
While I still have not been able to use the xmls that I've created, I am playing around with the coding.
I'm trying to make the card Shrine of Burning rage, and other cards similar to that one.
The card has: "At the beginning of your upkeep or whenever you cast a red spell, put a charge counter on Shrine of Burning Rage."
I was wondering if I make two triggers or just somehow combine both of them.
Does this ability activate once, either at the beginning of my upkeep or when I cast a red spell. Or does it activate at the beginning and also whenever I cast a red spell?
This is what I have
I'm trying to make the card Shrine of Burning rage, and other cards similar to that one.
The card has: "At the beginning of your upkeep or whenever you cast a red spell, put a charge counter on Shrine of Burning Rage."
I was wondering if I make two triggers or just somehow combine both of them.
Does this ability activate once, either at the beginning of my upkeep or when I cast a red spell. Or does it activate at the beginning and also whenever I cast a red spell?
This is what I have
- Code: Select all
<TRIGGERED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY>
-Some localised text-
return TriggerObject():GetCardType():Test( CARD_TYPE_RED ) ~=0
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():AddCounters( MTG():ChargeCounters(), 1 )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY filter_zone="ZONE_IN_PLAY"
<Trigger value="BEGINNING_OF_STEP" simple_qualifier="controller>
return ( EffectController():MyTurn() ~= 0 ) and ( MTG():GetStep() == STEP_UPKEEP )
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():AddCounters( MTG():ChargeCounters(), 1 )
end
</RESOLUTION_TIME_ACTION>
Re: Creating Card Card Coding Help
by thefiremind » 06 Jan 2013, 15:40
You lose way too many characters on the road... 
(I'm not using CODE because I can use colors this way)
<TRIGGERED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
-Some localised text- I suppose you cut the TRIGGER value while cutting localised text, anyway...
<TRIGGER value="SPELL_PLAYED" simple_qualifier="objectyoucontrol">
return TriggerObject():GetCardType():Test( CARD_TYPE_RED ) ~=0
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():AddCounters( MTG():ChargeCounters(), 1 )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY filter_zone="ZONE_IN_PLAY">
<TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
return ( EffectController():MyTurn() ~= 0 ) and ( MTG():GetStep() == STEP_UPKEEP )
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():AddCounters( MTG():ChargeCounters(), 1 )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
I'd suggest you to copy-paste everything in the XML structure from other existing cards, or you'll always have cards that can't be seen in the deck because you missed a >, a " or whatever.
About TRIGGER, I'm not sure if XML is case-sensitive, but better not risking.
You can't avoid using separate triggers because the trigger values are different. You could use only one if they both triggered at the beginning of a step or when a player cast something.
Finally, this doesn't influence how the card works, but I'd suggest you to give auto_skip="1" either to both triggers (this would be coherent with the original cards) or to none (if you wish so, for some reason).

(I'm not using CODE because I can use colors this way)
<TRIGGERED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
-Some localised text- I suppose you cut the TRIGGER value while cutting localised text, anyway...
<TRIGGER value="SPELL_PLAYED" simple_qualifier="objectyoucontrol">
return TriggerObject():GetCardType():Test( CARD_TYPE_RED ) ~=0
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():AddCounters( MTG():ChargeCounters(), 1 )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY filter_zone="ZONE_IN_PLAY">
<TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
return ( EffectController():MyTurn() ~= 0 ) and ( MTG():GetStep() == STEP_UPKEEP )
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():AddCounters( MTG():ChargeCounters(), 1 )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
I'd suggest you to copy-paste everything in the XML structure from other existing cards, or you'll always have cards that can't be seen in the deck because you missed a >, a " or whatever.
About TRIGGER, I'm not sure if XML is case-sensitive, but better not risking.
You can't avoid using separate triggers because the trigger values are different. You could use only one if they both triggered at the beginning of a step or when a player cast something.
Finally, this doesn't influence how the card works, but I'd suggest you to give auto_skip="1" either to both triggers (this would be coherent with the original cards) or to none (if you wish so, for some reason).
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 280 guests