Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk



Help with "Bramble Elemental"
Moderator: CCGHQ Admins
Help with "Bramble Elemental"
by Zambooo » 18 Jul 2012, 18:46
Here I am again... I was trying to code Bramble Elemental, I know there's the trigger "AURA_ATTACHED", but I have no idea of how it works, and I can't even find any example. I tried to trigger the ability when someone cast an Aura and it is the object of the ability, but first it should not work like this (the ability should trigger even if you move the aura with Simic Guildmage) and second it's not working (of course for a mistake of mine)
Problem Solved, here's the working code:
Problem Solved, here's the working code:
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="BRAMBLE_ELEMENTAL_28333" />
<CARDNAME text="BRAMBLE_ELEMENTAL" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Bramble Elemental]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Elementale dei Rovi]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="276938" />
<ARTID value="28333" />
<ARTIST name="Tomas Giorello" />
<CASTING_COST cost="{3}{G}{G}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Ravnica is a seamless urban tapestry, each city bleeding into the next. In abandoned corners, however, nature has begun to reclaim what it once owned.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Si spinge ben oltre il reame fisico, toccando gli ideali da cui tutte le creature traggono il loro potere.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Elemental" order_de-DE="0" order_es-ES="0" order_fr-FR="0" order_it-IT="0" order_jp-JA="0" order_ko-KR="0" order_pt-BR="0" order_ru-RU="0" />
<EXPANSION value="RAV" />
<RARITY metaname="C" />
<POWER value="4" />
<TOUGHNESS value="4" />
<TRIGGERED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever an Aura becomes attached to Bramble Elemental or enters the battlefield attached to Bramble Elemental, put two 1/1 green Saproling creature tokens onto the battlefield.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta un'Aura viene assegnata all'Elementale dei Rovi, metti in gioco due pedine creatura Saprolingio 1/1 verdi.]]></LOCALISED_TEXT>
<TRIGGER value="AURA_ATTACHED">
return SecondaryObject() == Object()
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local token_count = 2
if token_count > 0 then
MTG():PutTokensIntoPlay( "TOKEN_SAPROLING_1_1_277461", token_count, EffectController() )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TOKEN_REGISTRATION reservation="1" type="TOKEN_SAPROLING_1_1_277461" />
<AI_BASE_SCORE score="600" zone="ZONE_IN_PLAY" />
</CARD_V2>
Last edited by Zambooo on 18 Jul 2012, 19:27, edited 1 time in total.
Re: Help with "Bramble Elemental"
by thefiremind » 18 Jul 2012, 19:12
Luckily for you, Bramble Elemental existed as a core card in DotP2012, so I hope that AURA_ATTACHED still works the same way. Try with this:
In DotP2012 there was a very useful file in DATA_CORE\DATA_ALL_PLATFORMS\DATA_REQUIRED\SPECIALFX\SPECIALFX, that listed all the information that each trigger carries with itself. The good news is that the file still exists in DotP2013... the bad news is that the developers didn't update it, so it's the same as DotP2012 and some things have changed (it also doesn't list the new triggers, like those related to poison). And now that I look at it more carefully, the file says "object, aura" for AURA_ATTACHED, while it should say "aura, object"... so don't trust it too much.
- Code: Select all
<TRIGGER value="AURA_ATTACHED">
return SecondaryObject() == Object()
</TRIGGER>
In DotP2012 there was a very useful file in DATA_CORE\DATA_ALL_PLATFORMS\DATA_REQUIRED\SPECIALFX\SPECIALFX, that listed all the information that each trigger carries with itself. The good news is that the file still exists in DotP2013... the bad news is that the developers didn't update it, so it's the same as DotP2012 and some things have changed (it also doesn't list the new triggers, like those related to poison). And now that I look at it more carefully, the file says "object, aura" for AURA_ATTACHED, while it should say "aura, object"... so don't trust it too much.

< 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
Re: Help with "Bramble Elemental"
by Zambooo » 18 Jul 2012, 19:27
Thanks again Firemind, I have updated the first post with the working code if some needs it.
But now... there's a sort of list of DotP2012 core cards, like the one of DotP2013?
But now... there's a sort of list of DotP2012 core cards, like the one of DotP2013?
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 6 guests