It is currently 04 Sep 2025, 16:26
   
Text Size

Formal Request Thread

Moderator: CCGHQ Admins

Re: Formal Request Thread

Postby sumomole » 17 Jul 2013, 17:46

drleg3nd wrote:can someone help me with this code ?
| Open
Code: Select all
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Each other creature you control with a +1/+1 counter on it has haste.]]></LOCALISED_TEXT>
    <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:Add( FE_CARD_INSTANCE, OP_NOT, EffectSource() )
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add( FE_CONTROLLER, OP_IS, EffectController())
    filter:Add( FE_LUA_CONDITION, 0, EffectController())
    </FILTER>
    <FILTER_CONDITION id="0">
    if FilteredCard() ~= nil and FilteredCard():CountCounters(MTG():PlusOnePlusOneCounters()) &gt; 0 then
       return true
    else
       return false
    end
    </FILTER_CONDITION>
    <CONTINUOUS_ACTION layer="6" filter_id="0">
    if FilteredCard() ~= nil then
       local characteristics = FilteredCard():GetCurrentCharacteristics()
       characteristics:Bool_Set( CHARACTERISTIC_HASTE, 1 )
    end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
drleg3nd wrote:could use some help on this one also.thx
| Open
Code: Select all
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Remove two +1/+1 counters from Experiment One: Regenerate Experiment One.]]></LOCALISED_TEXT>
    <COST type="RemoveCountersSelf" amount="2" counter_type="+1/+1" />
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       EffectSource():GiveRegeneration()
    end
    </RESOLUTION_TIME_ACTION>
    <AI_AVAILABILITY window_step="declare_blockers" type="window" window_in_combat="1" />
    <AI_AVAILABILITY type="in_response" response_source="1" />
    <AI_AVAILABILITY type="restriction" restriction_type="no_regeneration_shield" />
    <AI_MODIFIERS combat_immunity="1" />
    <AUTO_SKIP no_effect_source="1" />
  </ACTIVATED_ABILITY>
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Formal Request Thread

Postby BloodReyvyn » 17 Jul 2013, 20:54

Hey again. I am having a small issue with this code for Mul Daya Channelers:

Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="MUL_DAYA_CHANNELERS_198167" />
  <CARDNAME text="MUL_DAYA_CHANNELERS" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Mul Daya Channelers]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Canalisatrices de Mul Daya]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Canalizadoras Mul Daya]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wegbahner aus Mul Daya]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Incanalatrici di Mul Daya]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ムル・ダヤの媒介者]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Mul Daya Channelers]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Мул-Дайские Проводницы]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Canalizadores de Mul Daya]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="198167" />
  <ARTID value="198167" />
  <ARTIST name="Jason Chan" />
  <CASTING_COST cost="{1}{G}{G}" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Elf" />
  <SUB_TYPE metaname="Druid" />
  <SUB_TYPE metaname="Shaman" />
  <EXPANSION value="ROE" />
  <RARITY metaname="R" />
  <POWER value="2" />
  <TOUGHNESS value="2" />
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Play with the top card of your library revealed.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Jouez avec la carte du dessus de votre bibliothèque révélée.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Juega mostrando la primera carta de tu biblioteca.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Die oberste Karte deiner Bibliothek ist offen.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gioca con la prima carta del tuo grimorio rivelata.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたのライブラリーの一番上のカードを公開したままプレイする。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Play with the top card of your library revealed.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Играйте с открытой верхней картой вашей библиотеки.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Jogue com o card do topo de seu grimório revelado.]]></LOCALISED_TEXT>
    <CONTINUOUS_ACTION layer="8">
      local characteristics = EffectController():GetCurrentCharacteristics()
      characteristics:Bool_Set( PLAYER_CHARACTERISTIC_PLAY_WITH_TOP_CARD_OF_LIBRARY_REVEALED, 1 )
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As long as the top card of your library is a creature card, Mul Daya Channelers gets +3/+3.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Tant que la carte du dessus de votre bibliothèque est une carte de créature, les Canalisatrices de Mul Daya gagnent +3/+3.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Mientras la primera carta de tu biblioteca sea una carta de criatura, las Canalizadoras Mul Daya obtienen +3/+3.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Solange die oberste Karte deiner Bibliothek eine Kreaturenkarte ist, erhält der Wegbahner aus Mul Daya +3/+3.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Fintanto che la prima carta del tuo grimorio è una carta creatura, le Incanalatrici di Mul Daya prendono +3/+3.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたのライブラリーの一番上のカードがクリーチャー・カードであるかぎり、ムル・ダヤの媒介者は+3/+3の修整を受ける。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As long as the top card of your library is a creature card, Mul Daya Channelers gets +3/+3.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Пока верхняя карта вашей библиотеки — карта существа, Мул-Дайские Проводницы получают +3/+3.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Enquanto o card do topo de seu grimório for um card de criatura, Canalizadores de Mul Daya receberá +3/+3.]]></LOCALISED_TEXT>
    <CONTINUOUS_ACTION layer="7C">
      if EffectSource() ~= nil then
        local card = EffectController():Library_GetTop()
       if card:GetCardType():Test( CARD_TYPE_CREATURE ) == true then
         local characteristics = EffectSource():GetCurrentCharacteristics()
         characteristics:Power_Add(3)
         characteristics:Toughness_Add(3)
       end
      end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As long as the top card of your library is a land card, Mul Daya Channelers has “{T}: Add two mana of any one color to your mana pool.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Tant que la carte du dessus de votre bibliothèque est une carte de terrain, les Canalisatrices de Mul Daya ont « {T} : Ajoutez deux manas d’une même couleur de votre choix à votre réserve. »]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Mientras la primera carta de tu biblioteca sea una carta de tierra, las Canalizadoras Mul Daya tienen “{T}: Agrega dos maná de un color cualquier a tu reserva de maná”.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Solange die oberste Karte deiner Bibliothek ein Land ist, hat der Wegbahner aus Mul Daya „{T}: Erhöhe deinen Manavorrat um zwei Mana genau einer beliebigen Farbe”.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Fintanto che la prima carta del tuo grimorio è una carta terra, le Incanalatrici di Mul Daya hanno “{T}: Aggiungi due mana di un qualsiasi colore alla tua riserva di mana”.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたのライブラリーの一番上のカードが土地カードであるかぎり、ムル・ダヤの媒介者は「{T}:あなたのマナ・プールに、好きな色1色のマナ2点を加える。」を持つ。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As long as the top card of your library is a land card, Mul Daya Channelers has “{T}: Add two mana of any one color to your mana pool.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Пока верхняя карта вашей библиотеки — карта земли, Мул-Дайские Проводницы имеют способность «{T}: добавьте две маны любого одного цвета в ваше хранилище маны».]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Enquanto o card do topo de seu grimório for um card de terreno, Canalizadores de Mul Daya terá “{T}: Adicione dois manas de qualquer cor à sua reserva de mana.”]]></LOCALISED_TEXT>
    <CONTINUOUS_ACTION layer="6" filter_id="0">
      if EffectSource() ~= nil then
        local card = EffectController():Library_GetTop()
       if card:GetCardType():Test( CARD_TYPE_LAND ) == true then
         EffectSource():GetCurrentCharacteristics():GrantAbility(6)
         EffectSource():GetCurrentCharacteristics():GrantAbility(7)
        end
      end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <ACTIVATED_ABILITY resource_id="6" forced_skip="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Add two mana of any one color to your mana pool.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T} : Ajoutez deux manas d’une même couleur de votre choix à votre réserve.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: Agrega dos maná de un color cualquier a tu reserva de maná.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Erhöhe deinen Manavorrat um zwei Mana genau einer beliebigen Farbe.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Aggiungi due mana di un qualsiasi colore alla tua riserva di mana.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}: Add two mana of any one color to your mana pool.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: Add two mana of any one color to your mana pool.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: добавьте две маны любого одного цвета в ваше хранилище маны.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Adicione dois manas de qualquer cor à sua reserva de mana.]]></LOCALISED_TEXT>
    <COST type="TapSelf" />
    <PLAY_TIME_ACTION>
   RSN_MarkManaAbilityStart()
   local oPlayer = EffectController()
   local oCard = EffectSource()
   if (oPlayer ~= nil) then
     oPlayer:BeginNewMultipleChoice()
     oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_W" )
     oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_U" )
     oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_B" )
     oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_R" )
     oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_G" )
     oPlayer:AskMultipleChoiceQuestion( "MODE_CHOOSE_ONE", oCard )
   end
    </PLAY_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
   local nColour = EffectController():GetMultipleChoiceResult() + 1
   if (nColour == COLOUR_BLACK) then
      RSN_Produce( "{B}{B}", 1 )
   elseif (nColour == COLOUR_BLUE) then
      RSN_Produce( "{U}{U}", 1 )
   elseif (nColour == COLOUR_GREEN) then
      RSN_Produce( "{G}{G}", 1 )
   elseif (nColour == COLOUR_RED) then
      RSN_Produce( "{R}{R}", 1 )
   elseif (nColour == COLOUR_WHITE) then
      RSN_Produce( "{W}{W}", 1 )
   end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
   RSN_EliminateExtraManaTokens()
   RSN_MarkManaAbilityEnd()
    </RESOLUTION_TIME_ACTION>
    <AI_AVAILABILITY window_step="upkeep" type="window" />
    <AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
    <AI_AVAILABILITY window_step="begin_combat" window_turn="their_turn" type="window" />
    <AI_AVAILABILITY window_step="declare_attackers" window_turn="their_turn" type="window" />
    <AI_AVAILABILITY window_step="declare_blockers" type="window" />
    <AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
    <AI_AVAILABILITY window_step="end_of_turn" type="window" />
    <AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
    <AI_AVAILABILITY type="in_response" response_source="1" response_target="1" />
    <AI_AVAILABILITY type="in_response" response_source="1" />
    <AI_AVAILABILITY type="in_response" response_target="1" />
  </ACTIVATED_ABILITY>
  <STATIC_ABILITY resource_id="7">
    <CONTINUOUS_ACTION layer="0">
      RSN_ClearCanProduceMana()
      RSN_MarkCanProduceMana( "{B}{G}{R}{U}{W}" )
    </CONTINUOUS_ACTION>
    <CONTINUOUS_ACTION layer="8">
      local nDefaultColour = COLOUR_GREEN
      local oCard = EffectSource()
      if (oCard ~= nil) then
   local oCharacteristics = oCard:GetCurrentCharacteristics()
   if (((oCharacteristics ~= nil) and (oCharacteristics:Bool_Get( CHARACTERISTIC_CANT_USE_ACTIVATED_ABILITIES ))) or (EffectController():GetCurrentCharacteristics():Bool_Get( PLAYER_CHARACTERISTIC_CANT_ACTIVATE_NONMANA_ABILITIES ))) then
     local nColour = RSN_GetLastProducedColour()
     if (nColour ~= COLOUR_COLOURLESS) then
       oCharacteristics:GrantAbility( nColour )
     else
       oCharacteristics:GrantAbility( nDefaultColour )
          end
        end
      end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <TRIGGERED_ABILITY forced_skip="1" replacement_effect="1">
    <TRIGGER value="BEGINNING_OF_STEP" pre_trigger="1" />
    <RESOLUTION_TIME_ACTION>
   RSN_ClearProducedMana()
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <MANA_ABILITY resource_id="1">
    <COST type="TapSelf" />
    <PRODUCES amount="{W}{W}" />
  </MANA_ABILITY>
  <MANA_ABILITY resource_id="2">
    <COST type="TapSelf" />
    <PRODUCES amount="{U}{U}" />
  </MANA_ABILITY>
  <MANA_ABILITY resource_id="3">
    <COST type="TapSelf" />
    <PRODUCES amount="{B}{B}" />
  </MANA_ABILITY>
  <MANA_ABILITY resource_id="4">
    <COST type="TapSelf" />
    <PRODUCES amount="{R}{R}" />
  </MANA_ABILITY>
  <MANA_ABILITY resource_id="5">
    <COST type="TapSelf" />
    <PRODUCES amount="{G}{G}" />
  </MANA_ABILITY>
  <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_B" />
  <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_G" />
  <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_R" />
  <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_U" />
  <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_W" />
  <SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
The ability works fine pumping the channelers when a creature is the top card, but does not grant the mana ability when a land is on top of the deck.
"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
User avatar
BloodReyvyn
 
Posts: 421
Joined: 19 May 2013, 13:29
Has thanked: 53 times
Been thanked: 40 times

Re: Formal Request Thread

Postby thefiremind » 17 Jul 2013, 21:05

The CONTINUOUS_ACTION that grants the abilities 6 and 7 has a filter_id="0" without having any filter declared, so I guess its code never runs.
< 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: 722 times

Re: Formal Request Thread

Postby MC Brodie » 18 Jul 2013, 02:26

Are fuse cards possible? I assume it would be similar to the charms for which part of the card you'd like to cast but will that let you switch mana costs?
-----------------------------------------------------------------------
Song of the Day: 46 and 2 (cover)
MC Brodie
 
Posts: 310
Joined: 01 Jun 2013, 00:10
Has thanked: 44 times
Been thanked: 34 times

Re: Formal Request Thread

Postby BloodReyvyn » 18 Jul 2013, 04:37

thefiremind wrote:The CONTINUOUS_ACTION that grants the abilities 6 and 7 has a filter_id="0" without having any filter declared, so I guess its code never runs.
:oops: Ugh figured I erred somehow. Forgot I removed that filter block for whatever reason. LOL thank you.
"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
User avatar
BloodReyvyn
 
Posts: 421
Joined: 19 May 2013, 13:29
Has thanked: 53 times
Been thanked: 40 times

Re: Formal Request Thread

Postby Master Necro » 18 Jul 2013, 06:03

thefiremind wrote:
Master Necro wrote:It puts the counters on a creature now but it doesn't give me the option to move one counter when another creature enters the battlefield.
Re-copy both abilities from my CODE snippet, I'm sure enough that they work.

On an unrelated note, I can't remember if this is the topic where I wrote the difference between BEGINNING_OF_STEP and BEGINNING_OF_PLAYERS_STEP, anyway, I was partially wrong. BEGINNING_OF_PLAYERS_STEP isn't a shortcut for BEGINNING_OF_STEP with TriggerPlayer():MyTurn() == true, because BEGINNING_OF_STEP now works differently from DotP2013: it doesn't bring any TriggerPlayer() information, and it triggers only once per step, not once for each player per step. This means that if we write BEGINNING_OF_STEP simple_qualifier="controller" as we used to do in DotP2013, that trigger will never happen because TriggerPlayer() is nil and will never be equal to EffectController().
No, it doesn't work, when I have just Riaks code that looks like this:

Code: Select all
<TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
 <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
<RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       TriggerObject():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
        EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
It just adds the counters but it doesn't let me move them when another creature enters the battlefield.

But when I add components from your code:

Code: Select all
<TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
 <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
    <INTERVENING_IF>
    return EffectSource() ~= nil and TriggerObject() ~= nil and EffectSource():CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0
    </INTERVENING_IF>
<RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       TriggerObject():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
        EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
<MAY tag="CARD_QUERY_GRAFT" always_prompt="1" />
    <AUTO_SKIP>
    return EffectSource() == nil or TriggerObject() == nil
    </AUTO_SKIP>
</TRIGGERED_ABILITY>
It doesn't work at all and sends my card directly to the graveyard when it's played.

And just a quick question I think I am not coding Hellbent right, so can someone please take a look, this is the Hellbent from Cackling Flames:

Code: Select all
<RESOLUTION_TIME_ACTION>
   local player = EffectController():Hand_Count() == 0
    local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
    local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
   if player ~= nil then
       if ( target_creature ~= nil ) then
          EffectSourceLKI():DealDamageTo( 5, target_creature )
       elseif ( target_player ~= nil ) then   
          EffectSourceLKI():DealDamageTo( 5, target_player )
       end
   end
   else
 if ( target_creature ~= nil ) then
          EffectSourceLKI():DealDamageTo( 3, target_creature )
       elseif ( target_player ~= nil ) then   
          EffectSourceLKI():DealDamageTo( 3, target_player )
       end
    </RESOLUTION_TIME_ACTION>
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Formal Request Thread

Postby thefiremind » 18 Jul 2013, 08:38

That isn't my original graft code. Delete all your graft code then re-copy all my code. The triggers of the 2 abilities should be different, while in your code they are identical.

Master Necro wrote:And just a quick question I think I am not coding Hellbent right, so can someone please take a look, this is the Hellbent from Cackling Flames:
I think you should put a little more effort in understanding what you are copying... EffectController() is obviously a player, but EffectController():Hand_Count() is not, and neither is EffectController():Hand_Count() == 0. Let's start from the basics: you have the controller of the effect, EffectController(), which is a player. You call EffectController():Hand_Count(). What does "hand count" mean in English? I think it's easy to guess. Then we have EffectController():Hand_Count() == 0, which is a comparison: you are comparing EffectController():Hand_Count() with 0, and you'll get true if they are equal, false otherwise. I don't think that true or false are players, right?
Code: Select all
    <RESOLUTION_TIME_ACTION>
    local damage = 3
    if EffectController():Hand_Count() == 0 then
       damage = 5
    end
    local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
    local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
    if ( target_creature ~= nil ) then
       EffectSourceLKI():DealDamageTo( damage, target_creature )
    elseif ( target_player ~= nil ) then   
       EffectSourceLKI():DealDamageTo( damage, target_player )
    end
    </RESOLUTION_TIME_ACTION>
< 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: 722 times

Re: Formal Request Thread

Postby Master Necro » 18 Jul 2013, 08:57

thefiremind wrote:That isn't my original graft code. Delete all your graft code then re-copy all my code. The triggers of the 2 abilities should be different, while in your code they are identical.

Master Necro wrote:And just a quick question I think I am not coding Hellbent right, so can someone please take a look, this is the Hellbent from Cackling Flames:
I think you should put a little more effort in understanding what you are copying... EffectController() is obviously a player, but EffectController():Hand_Count() is not, and neither is EffectController():Hand_Count() == 0. Let's start from the basics: you have the controller of the effect, EffectController(), which is a player. You call EffectController():Hand_Count(). What does "hand count" mean in English? I think it's easy to guess. Then we have EffectController():Hand_Count() == 0, which is a comparison: you are comparing EffectController():Hand_Count() with 0, and you'll get true if they are equal, false otherwise. I don't think that true or false are players, right?
Code: Select all
    <RESOLUTION_TIME_ACTION>
    local damage = 3
    if EffectController():Hand_Count() == 0 then
       damage = 5
    end
    local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
    local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
    if ( target_creature ~= nil ) then
       EffectSourceLKI():DealDamageTo( damage, target_creature )
    elseif ( target_player ~= nil ) then   
       EffectSourceLKI():DealDamageTo( damage, target_player )
    end
    </RESOLUTION_TIME_ACTION>
Ok, but only one thing your original Graft code does not work as I already said here:

Master Necro wrote:
thefiremind wrote:I copied the trigger from Primordial Hydra and substituted GetPaidX() with 1, so I don't know what's wrong.
Take a look here is Simic Initiate:

Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="10">
  <FILENAME text="SIMIC_INITIATE_17107441" />
  <CARDNAME text="SIMIC_INITIATE" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="17107441" />
  <ARTID value="A107441" />
  <ARTIST name="Dany Orizio" />
  <CASTING_COST cost="{G}" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Human" />
  <SUB_TYPE metaname="Mutant" />
  <EXPANSION value="DPI" />
  <RARITY metaname="C" />
  <POWER value="0" />
  <TOUGHNESS value="0" />
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY">
    return TriggerObject():GetCardType():Test(CARD_TYPE_CREATURE) and TriggerObject() ~= EffectSource()
    </TRIGGER>
    <INTERVENING_IF>
    return EffectSource() ~= nil and TriggerObject() ~= nil and EffectSource():CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0
    </INTERVENING_IF>
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil and TriggerObject() ~= nil then
       TriggerObject():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
       EffectSource():RemoveCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
    <MAY tag="CARD_QUERY_GRAFT" always_prompt="1" />
    <AUTO_SKIP>
    return EffectSource() == nil or TriggerObject() == nil
    </AUTO_SKIP>
  </TRIGGERED_ABILITY>
  <SFX text="COMBAT_GREEN_MAGIC_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_GREEN_MAGIC_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Formal Request Thread

Postby Xander9009 » 18 Jul 2013, 09:07

Master Necro wrote:
thefiremind wrote:
Master Necro wrote:It puts the counters on a creature now but it doesn't give me the option to move one counter when another creature enters the battlefield.
Re-copy both abilities from my CODE snippet, I'm sure enough that they work.

On an unrelated note, I can't remember if this is the topic where I wrote the difference between BEGINNING_OF_STEP and BEGINNING_OF_PLAYERS_STEP, anyway, I was partially wrong. BEGINNING_OF_PLAYERS_STEP isn't a shortcut for BEGINNING_OF_STEP with TriggerPlayer():MyTurn() == true, because BEGINNING_OF_STEP now works differently from DotP2013: it doesn't bring any TriggerPlayer() information, and it triggers only once per step, not once for each player per step. This means that if we write BEGINNING_OF_STEP simple_qualifier="controller" as we used to do in DotP2013, that trigger will never happen because TriggerPlayer() is nil and will never be equal to EffectController().
No, it doesn't work, when I have just Riaks code that looks like this:

Code: Select all
<TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
 <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
<RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       TriggerObject():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
        EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
It just adds the counters but it doesn't let me move them when another creature enters the battlefield.

But when I add components from your code:

Code: Select all
<TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
 <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
    <INTERVENING_IF>
    return EffectSource() ~= nil and TriggerObject() ~= nil and EffectSource():CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0
    </INTERVENING_IF>
<RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       TriggerObject():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
        EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
<MAY tag="CARD_QUERY_GRAFT" always_prompt="1" />
    <AUTO_SKIP>
    return EffectSource() == nil or TriggerObject() == nil
    </AUTO_SKIP>
</TRIGGERED_ABILITY>
It doesn't work at all and sends my card directly to the graveyard when it's played.

And just a quick question I think I am not coding Hellbent right, so can someone please take a look, this is the Hellbent from Cackling Flames:

Code: Select all
<RESOLUTION_TIME_ACTION>
   local player = EffectController():Hand_Count() == 0
    local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
    local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
   if player ~= nil then
       if ( target_creature ~= nil ) then
          EffectSourceLKI():DealDamageTo( 5, target_creature )
       elseif ( target_player ~= nil ) then   
          EffectSourceLKI():DealDamageTo( 5, target_player )
       end
   end
   else
 if ( target_creature ~= nil ) then
          EffectSourceLKI():DealDamageTo( 3, target_creature )
       elseif ( target_player ~= nil ) then   
          EffectSourceLKI():DealDamageTo( 3, target_player )
       end
    </RESOLUTION_TIME_ACTION>
I haven't looked into it a great deal, but Graft needs two separate triggered abilities. The first one would be the one you had working already so when it enters the battlefield it gets the counters. The movement of the counters will need to be done in a different triggered ability. The code thefiremind posted had both triggered abilities, but the code you posted only has one triggered ability. It's missing the ability that activates when it enters the battlefield. Also, how it's set up at the moment, if it managed to stay on te battlefield and you moved a +1/+1 counter to another creature, it would actually add a counter to both creatures. Anyway, the entire code thefiremind posted should be copied, not just part of it. The code we're talking about that needs to be used is the code in this post.

As for the other card:
Code: Select all
local player = EffectController():Hand_Count() == 0
asks the following: set the variable (player) to (does this player's hand size equal zero?). But that doesn't make any sense to the computer (or to humans). It should be: Does (this player)(number of cards in hand) == 0? [Yes (do this)][No (do this other thing instead)]. That look like this:
Code: Select all
if EffectController():Hand_Count() == 0 then
     do this
else
     do this other thing
end
Which means the code you need is this:
Code: Select all
local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if EffectController():Hand_Count() == 0 then
     if ( target_creature ~= nil ) then
          EffectSourceLKI():DealDamageTo( 5, target_creature )
     elseif ( target_player ~= nil ) then   
          EffectSourceLKI():DealDamageTo( 5, target_player )
     end
else
     if ( target_creature ~= nil ) then
          EffectSourceLKI():DealDamageTo( 3, target_creature )
     elseif ( target_player ~= nil ) then   
          EffectSourceLKI():DealDamageTo( 3, target_player )
     end
end
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Formal Request Thread

Postby Master Necro » 18 Jul 2013, 09:27

Xander9009 wrote:I haven't looked into it a great deal, but Graft needs two separate triggered abilities. The first one would be the one you had working already so when it enters the battlefield it gets the counters. The movement of the counters will need to be done in a different triggered ability. The code thefiremind posted had both triggered abilities, but the code you posted only has one triggered ability. It's missing the ability that activates when it enters the battlefield. Also, how it's set up at the moment, if it managed to stay on te battlefield and you moved a +1/+1 counter to another creature, it would actually add a counter to both creatures. Anyway, the entire code thefiremind posted should be copied, not just part of it. The code we're talking about that needs to be used is the code in this post.

As for the other card:
Code: Select all
local player = EffectController():Hand_Count() == 0
asks the following: set the variable (player) to (does this player's hand size equal zero?). But that doesn't make any sense to the computer (or to humans). It should be: Does (this player)(number of cards in hand) == 0? [Yes (do this)][No (do this other thing instead)]. That look like this:
Code: Select all
if EffectController():Hand_Count() == 0 then
     do this
else
     do this other thing
end
Which means the code you need is this:
Code: Select all
local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if EffectController():Hand_Count() == 0 then
     if ( target_creature ~= nil ) then
          EffectSourceLKI():DealDamageTo( 5, target_creature )
     elseif ( target_player ~= nil ) then   
          EffectSourceLKI():DealDamageTo( 5, target_player )
     end
else
     if ( target_creature ~= nil ) then
          EffectSourceLKI():DealDamageTo( 3, target_creature )
     elseif ( target_player ~= nil ) then   
          EffectSourceLKI():DealDamageTo( 3, target_player )
     end
end
Thanks for the other card.

But please listen to me concerning graft, I DID copy the entire code from that post you can see it here I had an example of Simic Initiate:

Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="10">
  <FILENAME text="SIMIC_INITIATE_17107441" />
  <CARDNAME text="SIMIC_INITIATE" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="17107441" />
  <ARTID value="A107441" />
  <ARTIST name="Dany Orizio" />
  <CASTING_COST cost="{G}" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Human" />
  <SUB_TYPE metaname="Mutant" />
  <EXPANSION value="DPI" />
  <RARITY metaname="C" />
  <POWER value="0" />
  <TOUGHNESS value="0" />
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY">
    return TriggerObject():GetCardType():Test(CARD_TYPE_CREATURE) and TriggerObject() ~= EffectSource()
    </TRIGGER>
    <INTERVENING_IF>
    return EffectSource() ~= nil and TriggerObject() ~= nil and EffectSource():CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0
    </INTERVENING_IF>
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil and TriggerObject() ~= nil then
       TriggerObject():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
       EffectSource():RemoveCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
    <MAY tag="CARD_QUERY_GRAFT" always_prompt="1" />
    <AUTO_SKIP>
    return EffectSource() == nil or TriggerObject() == nil
    </AUTO_SKIP>
  </TRIGGERED_ABILITY>
  <SFX text="COMBAT_GREEN_MAGIC_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_GREEN_MAGIC_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
And it DOES NOT WORK it just puts the card directly to the graveyard because +1/+1 counters are not added.

Riak fixed that in his code here:

RiiakShiNal wrote:That would be because you missed part of the ability. This whole block:
Code: Select all
  <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
    <TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       -- change the amount of counters here for Graft 2, 3, etc.
       EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
Here it DOES put the counters on the creature but it doesn't let me move them.

So you see thefireminds code does not work.
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Formal Request Thread

Postby Xander9009 » 18 Jul 2013, 09:46

Master Necro wrote:But please listen to me concerning graft, I DID copy the entire code from that post you can see it here I had an example of Simic Initiate:

Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="10">
  <FILENAME text="SIMIC_INITIATE_17107441" />
  <CARDNAME text="SIMIC_INITIATE" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="17107441" />
  <ARTID value="A107441" />
  <ARTIST name="Dany Orizio" />
  <CASTING_COST cost="{G}" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Human" />
  <SUB_TYPE metaname="Mutant" />
  <EXPANSION value="DPI" />
  <RARITY metaname="C" />
  <POWER value="0" />
  <TOUGHNESS value="0" />
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY">
    return TriggerObject():GetCardType():Test(CARD_TYPE_CREATURE) and TriggerObject() ~= EffectSource()
    </TRIGGER>
    <INTERVENING_IF>
    return EffectSource() ~= nil and TriggerObject() ~= nil and EffectSource():CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0
    </INTERVENING_IF>
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil and TriggerObject() ~= nil then
       TriggerObject():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
       EffectSource():RemoveCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
    <MAY tag="CARD_QUERY_GRAFT" always_prompt="1" />
    <AUTO_SKIP>
    return EffectSource() == nil or TriggerObject() == nil
    </AUTO_SKIP>
  </TRIGGERED_ABILITY>
  <SFX text="COMBAT_GREEN_MAGIC_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_GREEN_MAGIC_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
And it DOES NOT WORK it just puts the card directly to the graveyard because +1/+1 counters are not added.

Riak fixed that in his code here:

RiiakShiNal wrote:That would be because you missed part of the ability. This whole block:
Code: Select all
  <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
    <TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       -- change the amount of counters here for Graft 2, 3, etc.
       EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
Here it DOES put the counters on the creature but it doesn't let me move them.

So you see thefireminds code does not work.
As I said, it needs two separate triggered abilities. The code you posted only has one. It needs
Code: Select all
<TRIGGERED_ABILITY>
add counters when it enters the battlefield in the first triggered ability
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
move counters to other creatures when they enter the battlefield in the second triggered ability.
</TRIGGERED_ABILITY>
The code you posted only has one triggered ability. It has
Code: Select all
<TRIGGERED_ABILITY>
move counters to other creatures when they enter the battlefield in the second triggered ability.
</TRIGGERED_ABILITY>
But it's missing
Code: Select all
<TRIGGERED_ABILITY>
add counters when it enters the battlefield in the first triggered ability
</TRIGGERED_ABILITY>
Riiak posted the the code for the half you were missing. You were supposed to add it to the card in addition to the code already there. Instead, you replaced what was there, so it still only had half of the code. The code for the creature should be this:
Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="10">
  <FILENAME text="SIMIC_INITIATE_17107441" />
  <CARDNAME text="SIMIC_INITIATE" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="17107441" />
  <ARTID value="A107441" />
  <ARTIST name="Dany Orizio" />
  <CASTING_COST cost="{G}" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Human" />
  <SUB_TYPE metaname="Mutant" />
  <EXPANSION value="DPI" />
  <RARITY metaname="C" />
  <POWER value="0" />
  <TOUGHNESS value="0" />

-----

  <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
    <TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       -- change the amount of counters here for Graft 2, 3, etc.
       EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>

-----

  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY">
    return TriggerObject():GetCardType():Test(CARD_TYPE_CREATURE) and TriggerObject() ~= EffectSource()
    </TRIGGER>
    <INTERVENING_IF>
    return EffectSource() ~= nil and TriggerObject() ~= nil and EffectSource():CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0
    </INTERVENING_IF>
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil and TriggerObject() ~= nil then
       TriggerObject():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
       EffectSource():RemoveCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
    <MAY tag="CARD_QUERY_GRAFT" always_prompt="1" />
    <AUTO_SKIP>
    return EffectSource() == nil or TriggerObject() == nil
    </AUTO_SKIP>
  </TRIGGERED_ABILITY>
  <SFX text="COMBAT_GREEN_MAGIC_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_GREEN_MAGIC_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
I haven't removed anything from the code you posted, I only added to it the part of thefiremind's post that was missing. I separated that section so you can see it clearly. Get rid of the separation when you try to use it (I don't think it would cause problems but better safe than sorry).
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Formal Request Thread

Postby Master Necro » 18 Jul 2013, 09:54

Xander9009 wrote:
Master Necro wrote:But please listen to me concerning graft, I DID copy the entire code from that post you can see it here I had an example of Simic Initiate:

Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="10">
  <FILENAME text="SIMIC_INITIATE_17107441" />
  <CARDNAME text="SIMIC_INITIATE" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="17107441" />
  <ARTID value="A107441" />
  <ARTIST name="Dany Orizio" />
  <CASTING_COST cost="{G}" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Human" />
  <SUB_TYPE metaname="Mutant" />
  <EXPANSION value="DPI" />
  <RARITY metaname="C" />
  <POWER value="0" />
  <TOUGHNESS value="0" />
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY">
    return TriggerObject():GetCardType():Test(CARD_TYPE_CREATURE) and TriggerObject() ~= EffectSource()
    </TRIGGER>
    <INTERVENING_IF>
    return EffectSource() ~= nil and TriggerObject() ~= nil and EffectSource():CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0
    </INTERVENING_IF>
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil and TriggerObject() ~= nil then
       TriggerObject():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
       EffectSource():RemoveCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
    <MAY tag="CARD_QUERY_GRAFT" always_prompt="1" />
    <AUTO_SKIP>
    return EffectSource() == nil or TriggerObject() == nil
    </AUTO_SKIP>
  </TRIGGERED_ABILITY>
  <SFX text="COMBAT_GREEN_MAGIC_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_GREEN_MAGIC_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
And it DOES NOT WORK it just puts the card directly to the graveyard because +1/+1 counters are not added.

Riak fixed that in his code here:

RiiakShiNal wrote:That would be because you missed part of the ability. This whole block:
Code: Select all
  <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
    <TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       -- change the amount of counters here for Graft 2, 3, etc.
       EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
Here it DOES put the counters on the creature but it doesn't let me move them.

So you see thefireminds code does not work.
As I said, it needs two separate triggered abilities. The code you posted only has one. It needs
Code: Select all
<TRIGGERED_ABILITY>
add counters when it enters the battlefield in the first triggered ability
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
move counters to other creatures when they enter the battlefield in the second triggered ability.
</TRIGGERED_ABILITY>
The code you posted only has one triggered ability. It has
Code: Select all
<TRIGGERED_ABILITY>
move counters to other creatures when they enter the battlefield in the second triggered ability.
</TRIGGERED_ABILITY>
But it's missing
Code: Select all
<TRIGGERED_ABILITY>
add counters when it enters the battlefield in the first triggered ability
</TRIGGERED_ABILITY>
Riiak posted the the code for the half you were missing. You were supposed to add it to the card in addition to the code already there. Instead, you replaced what was there, so it still only had half of the code. The code for the creature should be this:
Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="10">
  <FILENAME text="SIMIC_INITIATE_17107441" />
  <CARDNAME text="SIMIC_INITIATE" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Simic Initiate]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="17107441" />
  <ARTID value="A107441" />
  <ARTIST name="Dany Orizio" />
  <CASTING_COST cost="{G}" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Human" />
  <SUB_TYPE metaname="Mutant" />
  <EXPANSION value="DPI" />
  <RARITY metaname="C" />
  <POWER value="0" />
  <TOUGHNESS value="0" />

-----

  <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
    <TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       -- change the amount of counters here for Graft 2, 3, etc.
       EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>

-----

  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)]]></LOCALISED_TEXT>
    <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY">
    return TriggerObject():GetCardType():Test(CARD_TYPE_CREATURE) and TriggerObject() ~= EffectSource()
    </TRIGGER>
    <INTERVENING_IF>
    return EffectSource() ~= nil and TriggerObject() ~= nil and EffectSource():CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0
    </INTERVENING_IF>
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil and TriggerObject() ~= nil then
       TriggerObject():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
       EffectSource():RemoveCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
    <MAY tag="CARD_QUERY_GRAFT" always_prompt="1" />
    <AUTO_SKIP>
    return EffectSource() == nil or TriggerObject() == nil
    </AUTO_SKIP>
  </TRIGGERED_ABILITY>
  <SFX text="COMBAT_GREEN_MAGIC_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_GREEN_MAGIC_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
I haven't removed anything from the code you posted, I only added to it the part of thefiremind's post that was missing. I separated that section so you can see it clearly. Get rid of the separation when you try to use it (I don't think it would cause problems but better safe than sorry).
Dude look, I just posted the same thing the first code in my post you quoted, the Simic Initiate and it does not work, I just told you that it sends the card directly to the grave yard, test it and see for your self if you don't believe me.
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Formal Request Thread

Postby Xander9009 » 18 Jul 2013, 10:05

Master Necro wrote:Dude look, I just posted the same thing the first code in my post you quoted, the Simic Initiate and it does not work, I just told you that it sends the card directly to the grave yard, test it and see for your self if you don't believe me.
I just tested it and it worked flawlessly. Like I said, I CHANGED the code. I added a block to it that was not there before. It was going to the graveyard because there was no triggered ability that gave it a +1/+1 counter when it entered the battlefield, so it was just a 0/0 and immediately died. I added the block to it that gave it a +1/+1 counter when it entered (code that I got from thefiremind's post), and it worked. I also separated the code very clearly so you could see what was different. Go look at the last block of code I post and look for the section set apart with -----. That's the block I added. Again, I just played using the code I posted and it entered the battlefield with a +1/+1 counter and then another creature entered and asked if I wanted to move a counter, I said yes, and the counter moved. Now, calm down, have a look again, and see that the code I posted, which I just tested and have confirmed it's working, was the same as yours EXCEPT that I added a block of code.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Formal Request Thread

Postby Master Necro » 18 Jul 2013, 10:11

Xander9009 wrote:
Master Necro wrote:Dude look, I just posted the same thing the first code in my post you quoted, the Simic Initiate and it does not work, I just told you that it sends the card directly to the grave yard, test it and see for your self if you don't believe me.
I just tested it and it worked flawlessly. Like I said, I CHANGED the code. I added a block to it that was not there before. It was going to the graveyard because there was no triggered ability that gave it a +1/+1 counter when it entered the battlefield, so it was just a 0/0 and immediately died. I added the block to it that gave it a +1/+1 counter when it entered (code that I got from thefiremind's post), and it worked. I also separated the code very clearly so you could see what was different. Go look at the last block of code I post and look for the section set apart with -----. That's the block I added. Again, I just played using the code I posted and it entered the battlefield with a +1/+1 counter and then another creature entered and asked if I wanted to move a counter, I said yes, and the counter moved. Now, calm down, have a look again, and see that the code I posted, which I just tested and have confirmed it's working, was the same as yours EXCEPT that I added a block of code.
:oops: Ok I apologise. :oops:
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Formal Request Thread

Postby thefiremind » 18 Jul 2013, 10:15

Master Necro wrote:Riak fixed that in his code here
That's the problem, RiiakShiNal didn't fix anything, he just warned you that you were missing one of the 2 triggered abilities that I wrote. But rather than adding the missing ability, you deleted the previous one and substituted it with the other.

Graft (untested) | Open
Code: Select all
  <!-- FIRST TRIGGERED ABILITY -->
  <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
    <TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       -- change the amount of counters here for Graft 2, 3, etc.
       EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <!-- END OF FIRST TRIGGERED ABILITY -->

  <!-- SECOND TRIGGERED ABILITY -->
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Graft 1]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Greffe 1]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Injertar 1]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Pfropfen 1]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Innesto 1]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[移植 1]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Graft 1]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Прививка 1.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Enxerto 1]]></LOCALISED_TEXT>
    <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY">
    return TriggerObject():GetCardType():Test(CARD_TYPE_CREATURE) and TriggerObject() ~= EffectSource()
    </TRIGGER>
    <INTERVENING_IF>
    return EffectSource() ~= nil and TriggerObject() ~= nil and EffectSource():CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0
    </INTERVENING_IF>
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil and TriggerObject() ~= nil then
       TriggerObject():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
       EffectSource():RemoveCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
    <MAY tag="CARD_QUERY_GRAFT" always_prompt="1" />
    <AUTO_SKIP>
    return EffectSource() == nil or TriggerObject() == nil
    </AUTO_SKIP>
  </TRIGGERED_ABILITY>
  <!-- END OF SECOND TRIGGERED ABILITY -->
You can't use the first OR the second, you need to use the first AND the second. Clear now? :wink:
< 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: 722 times

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 20 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 20 users online :: 0 registered, 0 hidden and 20 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 20 guests

Login Form