It is currently 23 Aug 2019, 02:43
   
Text Size

Paradise mantle

Moderators: Xander9009, CCGHQ Admins

Paradise mantle

Postby Scion of Darkness » 12 Apr 2013, 13:36

I need some expert help, i'm coding a paradise mantle and it works, it grants the mana ability but the mana ability itself dont work =( dont know why

Code: Select all
<?xml version="1.0" ?>
- <CARD_V2>
  <FILENAME text="PARADISE_MANTLE_1412021" />
  <CARDNAME text="PARADISE_MANTLE" />
- <TITLE>
- <LOCALISED_TEXT LanguageCode="en-US">
- <![CDATA[ Paradise Mantle
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="fr-FR">
- <![CDATA[ Paradise Mantle
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="es-ES">
- <![CDATA[ Paradise Mantle
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="de-DE">
- <![CDATA[ Paradise Mantle
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="it-IT">
- <![CDATA[ Paradise Mantle
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="jp-JA">
- <![CDATA[ Paradise Mantle
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="ko-KR">
- <![CDATA[ Paradise Mantle
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="ru-RU">
- <![CDATA[ Paradise Mantle
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="pt-BR">
- <![CDATA[ Paradise Mantle
  ]]>
  </LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="141202" />
  <ARTID value="141202" />
  <ARTIST name="Greg Hildebradt" />
  <CASTING_COST cost="{}" />
  <TYPE metaname="Artifact" />
  <SUB_TYPE metaname="Equipment" 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="DPG" />
  <RARITY metaname="R" />
- <STATIC_ABILITY filter_zone="ZONE_IN_PLAY">
- <LOCALISED_TEXT LanguageCode="en-US">
- <![CDATA[ Equipped creature has {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="fr-FR">
- <![CDATA[ Equipped creature has {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="es-ES">
- <![CDATA[ Equipped creature has {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="de-DE">
- <![CDATA[ Equipped creature has {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="it-IT">
- <![CDATA[ Equipped creature has {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="jp-JA">
- <![CDATA[ Equipped creature has {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="ko-KR">
- <![CDATA[ Equipped creature has {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="ru-RU">
- <![CDATA[ Equipped creature has {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="pt-BR">
- <![CDATA[ Equipped creature has {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
  <CONTINUOUS_ACTION layer="7C">local parent = Object():GetParent() if parent ~= nil then parent:GetCurrentCharacteristics():GrantAbility(1) end</CONTINUOUS_ACTION>
  </STATIC_ABILITY>
- <ACTIVATED_ABILITY resource_id="1" filter_zone="ZONE_IN_PLAY">
- <LOCALISED_TEXT LanguageCode="en-US">
- <![CDATA[ {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="de-DE">
- <![CDATA[ {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="es-ES">
- <![CDATA[ {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="fr-FR">
- <![CDATA[ {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="it-IT">
- <![CDATA[ {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="jp-JA">
- <![CDATA[ {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="ko-KR">
- <![CDATA[ {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="ru-RU">
- <![CDATA[ {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="pt-BR">
- <![CDATA[ {T}: Add one mana of any color to your mana pool.
  ]]>
  </LOCALISED_TEXT>
  <COST type="TapSelf" />
  <AVAILABILITY>local parent = Object():GetParent() if parent ~= nil then return true else return false end</AVAILABILITY>
  <PLAY_TIME_ACTION>EffectController():ChooseColour("CARD_QUERY_CHOOSE_COLOUR", 1)</PLAY_TIME_ACTION>
  <RESOLUTION_TIME_ACTION>local LNG_COLOUR = GetChosenColour() if (LNG_COLOUR == COLOUR_RED) then CreateManaTokens( COLOUR_RED, 1, EffectDC():Make_Chest(1) ) end if (LNG_COLOUR == COLOUR_GREEN) then CreateManaTokens( COLOUR_GREEN, 1, EffectDC():Make_Chest(1) ) end if (LNG_COLOUR == COLOUR_BLACK) then CreateManaTokens( COLOUR_BLACK, 1, EffectDC():Make_Chest(1) ) end if (LNG_COLOUR == COLOUR_BLUE) then CreateManaTokens( COLOUR_BLUE, 1, EffectDC():Make_Chest(1) ) end if (LNG_COLOUR == COLOUR_WHITE) then CreateManaTokens( COLOUR_WHITE, 1, EffectDC():Make_Chest(1) ) end</RESOLUTION_TIME_ACTION>
  <RESOLUTION_TIME_ACTION>RemoveRedundantTokens( 1, EffectDC():Get_Chest(1) )</RESOLUTION_TIME_ACTION>
  <RESOLUTION_TIME_ACTION>CheckManaPool()</RESOLUTION_TIME_ACTION>
  </ACTIVATED_ABILITY>
- <ACTIVATED_ABILITY sorcery_time="1" filter_zone="ZONE_IN_PLAY">
- <LOCALISED_TEXT LanguageCode="en-US">
- <![CDATA[ Equip {1}
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="fr-FR">
- <![CDATA[ Équipement {1}
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="es-ES">
- <![CDATA[ Equipar {1}.
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="de-DE">
- <![CDATA[ Ausrüsten {1}
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="it-IT">
- <![CDATA[ Equipaggiare {1}
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="jp-JA">
- <![CDATA[ 装備 {1}
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="ko-KR">
- <![CDATA[ 장착 {1}
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="ru-RU">
- <![CDATA[ Снарядить {1}
  ]]>
  </LOCALISED_TEXT>
- <LOCALISED_TEXT LanguageCode="pt-BR">
- <![CDATA[ Equipar {1}
  ]]>
  </LOCALISED_TEXT>
  <COST type="Mana" cost="{1}" />
  <TARGET_DEFINITION id="0">local filter = Object():GetFilter() filter:Clear() filter:AddCardType( CARD_TYPE_CREATURE ) filter:SetZone( ZONE_IN_PLAY ) filter:SetController( EffectController() ) -- AI 'cannot reequip' exemption local parent = Object():GetParent() if parent ~= nil and EffectController():IsAI() ~= 0 then filter:SetCardInstance(parent) filter:AddExtra(FILTER_EXTRA_FLIP_CARD_INSTANCE) end</TARGET_DEFINITION>
  <TARGET_DETERMINATION>return AtLeastOneTargetFromDefinition(0)</TARGET_DETERMINATION>
  <PLAY_TIME_ACTION target_choosing="1">EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE_TO_EQUIP", EffectDC():Make_Targets(0) )</PLAY_TIME_ACTION>
  <RESOLUTION_TIME_ACTION>local target_card = EffectDC():Get_Targets(0):Get_CardPtr(0) if (target_card ~= nil and EffectSource() ~= nil) then EffectSource():Attach( target_card ) end</RESOLUTION_TIME_ACTION>
  <AI_AVAILABILITY type="equip" />
  </ACTIVATED_ABILITY>
  <TOKEN_REGISTRATION reservation="1" type="_TOKEN_B_624996" />
  <TOKEN_REGISTRATION reservation="1" type="_TOKEN_G_624998" />
  <TOKEN_REGISTRATION reservation="1" type="_TOKEN_R_624997" />
  <TOKEN_REGISTRATION reservation="1" type="_TOKEN_U_624995" />
  <TOKEN_REGISTRATION reservation="1" type="_TOKEN_W_624994" />
  <HELP title="MORE_INFO_BADGE_TITLE_1" body="MORE_INFO_BADGE_BODY_1" zone="ZONE_ANY" />
  <HELP title="MORE_INFO_BADGE_TITLE_4" body="MORE_INFO_BADGE_BODY_4" zone="ZONE_ANY" />
  <AI_BASE_SCORE score="1200" zone="ZONE_IN_PLAY" />
  </CARD_V2>
User avatar
Scion of Darkness
 
Posts: 235
Joined: 27 Aug 2012, 13:14
Has thanked: 17 times
Been thanked: 23 times

Re: Paradise mantle

Postby thefiremind » 12 Apr 2013, 13:50

First thing to do is to remove the AVAILABILITY block, I guess you copied it from a DotP2012 implementation where the ability was on the equipment, but here you are granting it, and the creature has no parent.

I also noticed that the TOKEN_REGISTRATIONs have different IDs from my tokens, but you are using my mana token functions, so either you changed their IDs on purpose, or you need to use the correct ones.

I hope I haven't missed anything else, but it's hard to read that code without returns...
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 717 times

Re: Paradise mantle

Postby Scion of Darkness » 13 Apr 2013, 18:22

Thanks pal the availability was messing my card now it works another deck almost done
User avatar
Scion of Darkness
 
Posts: 235
Joined: 27 Aug 2012, 13:14
Has thanked: 17 times
Been thanked: 23 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 2 guests


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 287 on 31 Mar 2019, 04:11

Users browsing this forum: No registered users and 2 guests

Login Form