It is currently 20 Jul 2025, 13:41
   
Text Size

Formal Request Thread

Moderator: CCGHQ Admins

Re: Formal Request Thread

Postby NeoAnderson » 22 Nov 2013, 15:31

Thanks as always my dear friend, Expecially for you patience, is really appreciated.
About the EffectDC issue i tought the same thing as you said, probably the continuos_block is evaluated before the resolution block so it point to a nil value.
It is unlucky we cannot set an order of evaluation of the blocks :-( would be more easy to manage the events.

About the trigger variations thanks for the informations, i will keep these informations for future implementations.

About the last point, so if i have correctly understand, the syntax was right, the only problem is i should pass the stored variable trough a DelayedDC and retrieve the value into delayed trigger into a resolution block.. i will make some experiments later and i will let you know.

Anyway Thanks again :-)
POST UPDATE : I have coded the card and now i am able to keep the player pointer stored into a global chest. I haven't used delayedDC.

Spirit Control | Open
Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="6">
   <FILENAME text="SPIRIT_CONTROL_U_7272233" />
   <CARDNAME text="SPIRIT_CONTROL_U" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Spirit Control]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Contrôle de l'Esprit]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Control de Espíritu]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Geist Kontrolle]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Controllo dello Spirito]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[精神コントロール]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[정신 제어]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Дух управления]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Controle de espírito]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="7272233" />
   <ARTID value="7227233" />
   <ARTIST name="DigitalArt© - Akasha" />
   <CASTING_COST cost="{2}{U}{U}{U}" />
   <TYPE metaname="Tribal" />
   <TYPE metaname="Instant" />
   <SUB_TYPE metaname="Divinity" />
   <EXPANSION value="DPI" />
   <RARITY metaname="R" />

<TRIGGERED_ABILITY resource_id="2">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If this creature is tapped you lose control of it. The new controller becomes the player who enchanted it. The effect is propagated to another target creature you control.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si cette créature est engagé vous perdez le contrôle de celui-ci. Le nouveau contrôleur devient le joueur qui a enchanté il. L'effet se propage à une autre créature ciblée que vous contrôlez.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si se pulsa esta criatura se pierde el control de la misma. El nuevo controlador se convierte en el jugador que encantó a él. El efecto se propaga a otra criatura objetivo que controles.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls diese Kreatur getappt Sie verlieren die Kontrolle über sie. Der neue Controller wird der Spieler, der sie bezaubert. Der Effekt wird auf einer anderen Kreatur deiner Wahl, die du kontrollierst propagiert.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se questa creatura viene tappata ne perdi il controllo. Il nuovo controllore diventa il giocatore che l'ha incantata e l'effetto viene propagato ad un'altra creatura bersaglio che controlli.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[このクリーチャーがタップされた場合、あなたはそれのコントロールを失う。新しいコントローラはそれを魅了選手になる。効果は、あなたがコントロールする他の対象のクリーチャーに伝播されます。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[이 생물이 탭 경우 당신은 그것의 통제를 잃게됩니다. 새로운 컨트롤러는 마법에 걸린 플레이어가됩니다. 효과는 사용자가 제어하는 또 다른 목표 생물에 전파됩니다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если это существо постучал вы теряете контроль над ним. Новый контроллер становится игрок, который очарован его. Эффект распространяется на другой целевое существо под вашим контролем.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se esta criatura é aproveitado você perder o controle da mesma. O novo controlador torna-se o jogador que encantou-lo. O efeito é propagado para outra criatura alvo que você controla.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <TRIGGER value="BECAME_TAPPED"  simple_qualifier="self" />
 <CLEANUP fire_once="1" /> 

  <PLAY_TIME_ACTION layer="2">
   
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(10)
  if player ~= nil then
   if TriggerObject() ~= nil then
           local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
         filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
         TriggerObject():Untap()       
         TriggerObject():SetBaseController(player)
        end
  end
end
</PLAY_TIME_ACTION>



 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(1)
   characteristics:GrantAbility(2)
       end
      end
    </CONTINUOUS_ACTION>



    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>

      </TRIGGERED_ABILITY>



     

   <TRIGGERED_ABILITY resource_id="1">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Propagation (Selective 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Propagation (Sélectif 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Propagación (Selectiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fortpflanzung (Selektiv 1) ]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Propagazione (Selettiva 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[Propagação (Seletiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD" />
 <CLEANUP fire_once="1" />

 <PLAY_TIME_ACTION layer="2">
   
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(10)
  if player ~= nil then
   if TriggerObject() ~= nil then
           local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
         filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
        end
  end
end
</PLAY_TIME_ACTION>



 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(1)
   characteristics:GrantAbility(2)
       end
      end
    </CONTINUOUS_ACTION>


    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>

  </TRIGGERED_ABILITY>


<SPELL_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Choose target creature, if the targeted creature becomes tapped, You gain the control of it. If its controller has other creatures on the battlefield, choose a new target to which to propagate the effect.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Choisissez la créature ciblée, si la créature ciblée devient engagé, vous gagnez le contrôle de celui-ci. Si son contrôleur a d'autres créatures sur le champ de bataille, choisissez une nouvelle cible à laquelle se propager l'effet.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Elija la criatura objetivo, si la criatura objetivo sea girada, Usted gana el control de ella. Si su controlador tiene otras criaturas en el campo de batalla, elige un nuevo objetivo para el cual se propague el efecto.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wählen Sie eine Kreatur deiner Wahl, wenn die gewählte Kreatur getappt wird, gewinnen Sie die Kontrolle über sie. Wenn seine Controller hat andere Kreaturen auf dem Schlachtfeld, wählen Sie ein neues Ziel, auf das der Effekt zu propagieren.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Scegli una creatura bersaglio, se la creatura bersaglio diventa TAPpata, ne Guadagni il controllo, se il suo controllore ha altre creature sul campo di battaglia, scegli un nuovo obiettivo a cui propagare l'effetto.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[対象となったクリーチャーがタップ状態になる場合には、あなたはそれのコントロールを得る、対象のクリーチャーを選択してください。そのコントローラーが戦場で他の生き物を持っている場合、影響を伝播するために、新しいターゲットを選択します。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[대상 생물이 도청 될 경우, 당신은 그것의 관리 권한을 획득, 대상 생물을 선택합니다. 그 컨트롤러가 전장에서 다른 생물이있는 경우, 효과를 전파하기에 새로운 대상을 선택합니다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Выберите целевое существо, если целевое существо поворачивается, Вы получаете контроль над ним. Если его контроллер имеет других существ на поле боя, выбрать новую цель для которой для распространения эффекта.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Escolha a criatura alvo, se a criatura alvo torna-se virado, você ganha o controle dela. Se seu controlador tem outras criaturas no campo de batalha, escolher um novo alvo para o qual a propagar o efeito.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[選擇目標生物,如果該目標生物成為橫置時,你獲得了它的控制。如果它的控制器具有其他生物在戰場上,選擇一個新的目標,其傳播的效果。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[選擇目標生物,如果該目標生物成為橫置時,你獲得了它的控制。如果它的控制器具有其他生物在戰場上,選擇一個新的目標,其傳播的效果。]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
      local filter = ClearFilter()
      filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
          </TARGET_DEFINITION>

      <PLAY_TIME_ACTION>
   local chest = MTG():DuelDataChest():Make_Chest( 100 )
   chest:Set_PlayerPtr(10, EffectController())       
       
    </PLAY_TIME_ACTION>

   <CONTINUOUS_ACTION layer="6">
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(1)
   characteristics:GrantAbility(2)
       end
    </CONTINUOUS_ACTION>


    <DURATION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
         return (target == nil) or (target:GetOwner() ~= target:GetController())
    </DURATION>

</SPELL_ABILITY>

<STATIC_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Propagation (Selective 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Propagation (Sélectif 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Propagación (Selectiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fortpflanzung (Selektiv 1) ]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Propagazione (Selettiva 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[Propagação (Seletiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
</STATIC_ABILITY>

<HELP title="MORE_INFO_PROPAGATION_TITLE_1" body="MORE_INFO_PROPAGATION_BODY_1" zone="ZONE_ANY" />

</CARD_V2>
Would be nice if You let me know your opinion Riiak also Firemind, Mc Brodie and other friends :-)

2. Question of day :-) I think to already know the answer (Nope) : Anyway if i have made a new ability, do you know if there is any possibility to define this new ability to be recognized by filters or some other kind of checking?
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby daniel473 » 24 Nov 2013, 01:53

I really could use lich!!!!

Here is black lotus HALELUYA HALELUYA





Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="2">
   <FILENAME text="BLACK_LOTUS_473456" />
   <CARDNAME text="BLACK_LOTUS" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Black Lotus]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Black Lotus]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Black Lotus]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Black Lotus]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Black Lotus]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Black Lotus]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Black Lotus]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Black Lotus]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Black Lotus]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[Black Lotus]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Black Lotus]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="473456" />
   <ARTID value="473456" />
   <ARTIST name="Chris Rahn" />
   <CASTING_COST cost="{0}" />
   <FLAVOURTEXT>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[It is not truth that matters, only victory.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[It is not truth that matters, only victory.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[It is not truth that matters, only victory.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[It is not truth that matters, only victory.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[It is not truth that matters, only victory.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[It is not truth that matters, only victory.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[It is not truth that matters, only victory.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[It is not truth that matters, only victory.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[It is not truth that matters, only victory.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[It is not truth that matters, only victory.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[It is not truth that matters, only victory.]]></LOCALISED_TEXT>
   </FLAVOURTEXT>
   <TYPE metaname="Artifact" />
   <EXPANSION value="DPI" />
   <RARITY metaname="R" />
   <ACTIVATED_ABILITY forced_skip="1" linked_ability_group="1">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Add three mana of any one color to your mana pool.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T} : Ajoutez trois manas de la couleur de votre choix à votre réserve.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: Agrega tres manás de un color cualquiera a tu reserva de maná.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Erhöhe deinen Manavorrat um drei Mana einer beliebigen Farbe.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Aggiungi alla tua riserva di mana tre mana di un qualsiasi colore.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:あなたのマナ・プールに、好きな色1色のマナ3点を加える。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: 원하는 한 가지 색의 마나 세 개를 당신의 마나풀에 담는다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: добавьте три маны одного любого цвета в ваше хранилище маны.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Adicione três manas de qualquer cor à sua reserva de mana.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[{T}:加三点任意颜色的单色法术力到你的法术力池中。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[{T}:加三點任意顏色的單色魔法力到你的魔法力池中。]]></LOCALISED_TEXT>
      <COST type="SacrificeSelf" />
         <PREREQUISITE>
    return EffectSource():IsTapped() == false and EffectController():IsAI() == false
    </PREREQUISITE>
         <RESOLUTION_TIME_ACTION>
    EffectController():ChooseColour( "CARD_QUERY_CHOOSE_COLOUR", true )
    </RESOLUTION_TIME_ACTION>
         <RESOLUTION_TIME_ACTION>
    LinkedDC():Set_Int(0, GetChosenColour() )
    </RESOLUTION_TIME_ACTION>
      </COST>
   </ACTIVATED_ABILITY>
   <STATIC_ABILITY linked_ability_group="1">
      <CONTINUOUS_ACTION layer="6">
    local colour = LinkedDC():Get_Int( 0 )
    local characteristics = EffectSource():GetCurrentCharacteristics()
    if colour ~= 0 then
      characteristics:GrantAbility(colour)
    else
      characteristics:GrantAbility(5)
    end
    </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
   <MANA_ABILITY resource_id="1">
      <PRODUCES amount="{W}" />
      <PRODUCES amount="{W}" />
      <PRODUCES amount="{W}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="2">
      <PRODUCES amount="{U}" />
      <PRODUCES amount="{U}" />
      <PRODUCES amount="{U}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="3">
      <PRODUCES amount="{B}" />
      <PRODUCES amount="{B}" />
      <PRODUCES amount="{B}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="4">
      <PRODUCES amount="{R}" />
      <PRODUCES amount="{R}" />
      <PRODUCES amount="{R}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="5">
      <PRODUCES amount="{G}" />
      <PRODUCES amount="{G}" />
      <PRODUCES amount="{G}" />
   </MANA_ABILITY>
   <AI_BASE_SCORE score="300" zone="ZONE_BATTLEFIELD" />
</CARD_V2>
ALL HAIL BLACK LOTUS
daniel473
 
Posts: 19
Joined: 13 Sep 2013, 14:36
Has thanked: 0 time
Been thanked: 1 time

Re: Formal Request Thread

Postby RiiakShiNal » 24 Nov 2013, 03:17

NeoAnderson wrote:POST UPDATE : I have coded the card and now i am able to keep the player pointer stored into a global chest. I haven't used delayedDC.

...

Would be nice if You let me know your opinion Riiak also Firemind, Mc Brodie and other friends :-)
You will have problems if it is cast by two different players as the last one to cast the spell will be the recipient of all creatures tapped afterwards due to the last one to cast it being the one stored in the PlayerPtr. For this ability you really need to make use of Delayed Triggers.

NeoAnderson wrote:2. Question of day :-) I think to already know the answer (Nope) : Anyway if i have made a new ability, do you know if there is any possibility to define this new ability to be recognized by filters or some other kind of checking?
Actually there is a way, but it requires some work. You can either:
  1. Make use of a characteristic that means nothing in the zone you are using it in for the purposes of checking. Note that this also requires that you not use one that is being used by other modders making the available pool very small.
  2. Roll your own using the Duel Data chest and Card Pointers. This can be quite complex as there are a lot of things to consider though ultimately complexity will vary depending on how generic your solution is (more generic means more complex).
  3. You make use of my ObjectDC functions (which you would already have as they are required for the Manual Mana functions) and you set a variable on the ObjectDC of the card which can then be read from other cards (and even filtered on using LUA conditions).
  4. You can make use of my Characteristic functions which allows for fake characteristics and additional handling via invisible manager tokens. This is a fairly generic system and allows for quite a bit. This is basically another layer on top of option 3, but is specialized towards characteristics and managers. This could be a good system to use for implementing special counters like -2/-2, -1/-0, or -0/-1 counters or for complex abilities you wanted to implement as a characteristic. Though for simple abilities or data you want to check it could be overkill and option 3 could be a better fit.

daniel473 wrote:Here is black lotus HALELUYA HALELUYA
...
ALL HAIL BLACK LOTUS
Your Black Lotus won't work as you sacrifice it in the ACTIVATED_ABILITY so before you can use the mana from the MANA_ABILITY it has already left the battlefield. The only way to properly code Black Lotus is to use Mana Tokens, granted I've already done this and you can find Black Lotus in my mod.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby NeoAnderson » 24 Nov 2013, 07:58

Riiak i have no words to say thank you.
You always focus the point.
About the way to filter a new ability, i have understand is not a simple thing, probably i will try something in future, anyway i agree with your opinion the duel data chest is the more complex way to resolve it.

2. About my card pointer issue you're right i didn't tought about this situation.
I am not sure how to resolve it with delayedDc expecially because i never forced a trigger with firetrigger function. Could you post an example of how you would resolve this problem?

2b. Is not possible to resolve it using a player data chest? If I understanded how it works it should be linked to the player istance, so whenever a different player call this function it should works on different addresses.

Something like this :

(Main Spell action)
Code: Select all
<PLAY_TIME_ACTION>
   local chest = EffectController():PlayerDataChest():Make_Chest( 100 )
   chest:Set_PlayerPtr(10, EffectController())       
</PLAY_TIME_ACTION>
(Reading action inside the trigger block)
Code: Select all
 <PLAY_TIME_ACTION layer="2">
local chest = EffectController():PlayerDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(10)
  if player ~= nil then
   if TriggerObject() ~= nil then
           local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
         TriggerObject():Untap()       
         TriggerObject():SetBaseController(player)
        end
  end
end
</PLAY_TIME_ACTION>
2b.(EDIT) I am just thinking this could not work because the EffectController() call into reading action refer to another player.


2c. Another possibile solution, tell me if is doable, is there a card unique value? Should be something like card_instance. What happens if i store the value into a duel data chest, making the chest with card_instance value?
Something like : local chest = MTG():DuelDataChest():Make_Chest( CARD_INSTANCE )
2c.(EDIT) I am just thinking this could not work because the reading action refer to another card.


I am sorry if i am writing a lot of not working ideas, i am just thinking about alternative solutions, it is like when you think and talk with yourself :-), is just a way to share my ideas and trying to improve my skills using your knowledge.
Anyway i am realizing is not so easy to avoid a DelayedDC call, because all the other ways, lose or overwrite the source information.
Please let me know i need your help because i cannot resolve this issue by myself my knowledge is not enough.

UPDATE :
3. I tought about a possible solution i tried to implement the DelayedDC but i had problems i still have to improve my knowledge to do it. My solution is not pretty looking but it should work or i hope so.
It is based on this reasoning :
I can store the player into a different index inside the DuelDataChest, we know that the players can be min 2 up to 4, so i can check the player into the main spell and then grant different abilities basing on the player who has launched the spell.

Grant different abilities just because so I can refer to a different index without keep it into a variable.


Now is not easy to test if this code will work because i should force the AI to play this spell, could you take a look and let me know what you think? Do you see something i have not considered?

Spirit Control (modified code) | Open
Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="6">
   <FILENAME text="SPIRIT_CONTROL_U_7272233" />
   <CARDNAME text="SPIRIT_CONTROL_U" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Spirit Control]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Contrôle de l'Esprit]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Control de Espíritu]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Geist Kontrolle]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Controllo dello Spirito]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[精神コントロール]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[정신 제어]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Дух управления]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Controle de espírito]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="7272233" />
   <ARTID value="7227233" />
   <ARTIST name="DigitalArt© - Akasha" />
   <CASTING_COST cost="{2}{U}{U}{U}" />
   <TYPE metaname="Tribal" />
   <TYPE metaname="Instant" />
   <SUB_TYPE metaname="Divinity" />
   <EXPANSION value="DPI" />
   <RARITY metaname="R" />

<TRIGGERED_ABILITY resource_id="2">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If this creature is tapped you lose control of it. The new controller becomes the player who enchanted it. The effect is propagated to another target creature you control.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si cette créature est engagé vous perdez le contrôle de celui-ci. Le nouveau contrôleur devient le joueur qui a enchanté il. L'effet se propage à une autre créature ciblée que vous contrôlez.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si se pulsa esta criatura se pierde el control de la misma. El nuevo controlador se convierte en el jugador que encantó a él. El efecto se propaga a otra criatura objetivo que controles.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls diese Kreatur getappt Sie verlieren die Kontrolle über sie. Der neue Controller wird der Spieler, der sie bezaubert. Der Effekt wird auf einer anderen Kreatur deiner Wahl, die du kontrollierst propagiert.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se questa creatura viene tappata ne perdi il controllo. Il nuovo controllore diventa il giocatore che l'ha incantata e l'effetto viene propagato ad un'altra creatura bersaglio che controlli.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[このクリーチャーがタップされた場合、あなたはそれのコントロールを失う。新しいコントローラはそれを魅了選手になる。効果は、あなたがコントロールする他の対象のクリーチャーに伝播されます。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[이 생물이 탭 경우 당신은 그것의 통제를 잃게됩니다. 새로운 컨트롤러는 마법에 걸린 플레이어가됩니다. 효과는 사용자가 제어하는 또 다른 목표 생물에 전파됩니다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если это существо постучал вы теряете контроль над ним. Новый контроллер становится игрок, который очарован его. Эффект распространяется на другой целевое существо под вашим контролем.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se esta criatura é aproveitado você perder o controle da mesma. O novo controlador torna-se o jogador que encantou-lo. O efeito é propagado para outra criatura alvo que você controla.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <TRIGGER value="BECAME_TAPPED"  simple_qualifier="self" />
 <CLEANUP fire_once="1" /> 

<PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(0)
  if player ~= nil then
      if TriggerObject() ~= nil then
         local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
         TriggerObject():Untap()       
         TriggerObject():SetBaseController(player)
     end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(1)
   characteristics:GrantAbility(2)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>


<TRIGGERED_ABILITY resource_id="1">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Propagation (Selective 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Propagation (Sélectif 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Propagación (Selectiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fortpflanzung (Selektiv 1) ]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Propagazione (Selettiva 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[Propagação (Seletiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD" />
 <CLEANUP fire_once="1" />
 <PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(0)
  if player ~= nil then
        if TriggerObject() ~= nil then
              local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
        end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(1)
   characteristics:GrantAbility(2)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>


<TRIGGERED_ABILITY resource_id="4">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If this creature is tapped you lose control of it. The new controller becomes the player who enchanted it. The effect is propagated to another target creature you control.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si cette créature est engagé vous perdez le contrôle de celui-ci. Le nouveau contrôleur devient le joueur qui a enchanté il. L'effet se propage à une autre créature ciblée que vous contrôlez.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si se pulsa esta criatura se pierde el control de la misma. El nuevo controlador se convierte en el jugador que encantó a él. El efecto se propaga a otra criatura objetivo que controles.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls diese Kreatur getappt Sie verlieren die Kontrolle über sie. Der neue Controller wird der Spieler, der sie bezaubert. Der Effekt wird auf einer anderen Kreatur deiner Wahl, die du kontrollierst propagiert.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se questa creatura viene tappata ne perdi il controllo. Il nuovo controllore diventa il giocatore che l'ha incantata e l'effetto viene propagato ad un'altra creatura bersaglio che controlli.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[このクリーチャーがタップされた場合、あなたはそれのコントロールを失う。新しいコントローラはそれを魅了選手になる。効果は、あなたがコントロールする他の対象のクリーチャーに伝播されます。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[이 생물이 탭 경우 당신은 그것의 통제를 잃게됩니다. 새로운 컨트롤러는 마법에 걸린 플레이어가됩니다. 효과는 사용자가 제어하는 또 다른 목표 생물에 전파됩니다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если это существо постучал вы теряете контроль над ним. Новый контроллер становится игрок, который очарован его. Эффект распространяется на другой целевое существо под вашим контролем.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se esta criatura é aproveitado você perder o controle da mesma. O novo controlador torna-se o jogador que encantou-lo. O efeito é propagado para outra criatura alvo que você controla.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <TRIGGER value="BECAME_TAPPED"  simple_qualifier="self" />
 <CLEANUP fire_once="1" /> 

  <PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(1)
  if player ~= nil then
      if TriggerObject() ~= nil then
         local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
         TriggerObject():Untap()       
         TriggerObject():SetBaseController(player)
     end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(3)
   characteristics:GrantAbility(4)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>


<TRIGGERED_ABILITY resource_id="3">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Propagation (Selective 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Propagation (Sélectif 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Propagación (Selectiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fortpflanzung (Selektiv 1) ]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Propagazione (Selettiva 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[Propagação (Seletiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD" />
 <CLEANUP fire_once="1" />

 <PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(1)
  if player ~= nil then
        if TriggerObject() ~= nil then
              local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
        end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(3)
   characteristics:GrantAbility(4)
       end
      end
    </CONTINUOUS_ACTION>


    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY resource_id="6">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If this creature is tapped you lose control of it. The new controller becomes the player who enchanted it. The effect is propagated to another target creature you control.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si cette créature est engagé vous perdez le contrôle de celui-ci. Le nouveau contrôleur devient le joueur qui a enchanté il. L'effet se propage à une autre créature ciblée que vous contrôlez.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si se pulsa esta criatura se pierde el control de la misma. El nuevo controlador se convierte en el jugador que encantó a él. El efecto se propaga a otra criatura objetivo que controles.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls diese Kreatur getappt Sie verlieren die Kontrolle über sie. Der neue Controller wird der Spieler, der sie bezaubert. Der Effekt wird auf einer anderen Kreatur deiner Wahl, die du kontrollierst propagiert.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se questa creatura viene tappata ne perdi il controllo. Il nuovo controllore diventa il giocatore che l'ha incantata e l'effetto viene propagato ad un'altra creatura bersaglio che controlli.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[このクリーチャーがタップされた場合、あなたはそれのコントロールを失う。新しいコントローラはそれを魅了選手になる。効果は、あなたがコントロールする他の対象のクリーチャーに伝播されます。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[이 생물이 탭 경우 당신은 그것의 통제를 잃게됩니다. 새로운 컨트롤러는 마법에 걸린 플레이어가됩니다. 효과는 사용자가 제어하는 또 다른 목표 생물에 전파됩니다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если это существо постучал вы теряете контроль над ним. Новый контроллер становится игрок, который очарован его. Эффект распространяется на другой целевое существо под вашим контролем.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se esta criatura é aproveitado você perder o controle da mesma. O novo controlador torna-se o jogador que encantou-lo. O efeito é propagado para outra criatura alvo que você controla.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <TRIGGER value="BECAME_TAPPED"  simple_qualifier="self" />
 <CLEANUP fire_once="1" /> 

<PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(2)
  if player ~= nil then
      if TriggerObject() ~= nil then
         local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
         TriggerObject():Untap()       
         TriggerObject():SetBaseController(player)
     end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(5)
   characteristics:GrantAbility(6)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY resource_id="5">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Propagation (Selective 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Propagation (Sélectif 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Propagación (Selectiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fortpflanzung (Selektiv 1) ]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Propagazione (Selettiva 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[Propagação (Seletiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD" />
 <CLEANUP fire_once="1" />
 <PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(2)
  if player ~= nil then
        if TriggerObject() ~= nil then
              local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
        end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(5)
   characteristics:GrantAbility(6)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>


<TRIGGERED_ABILITY resource_id="8">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If this creature is tapped you lose control of it. The new controller becomes the player who enchanted it. The effect is propagated to another target creature you control.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si cette créature est engagé vous perdez le contrôle de celui-ci. Le nouveau contrôleur devient le joueur qui a enchanté il. L'effet se propage à une autre créature ciblée que vous contrôlez.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si se pulsa esta criatura se pierde el control de la misma. El nuevo controlador se convierte en el jugador que encantó a él. El efecto se propaga a otra criatura objetivo que controles.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls diese Kreatur getappt Sie verlieren die Kontrolle über sie. Der neue Controller wird der Spieler, der sie bezaubert. Der Effekt wird auf einer anderen Kreatur deiner Wahl, die du kontrollierst propagiert.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se questa creatura viene tappata ne perdi il controllo. Il nuovo controllore diventa il giocatore che l'ha incantata e l'effetto viene propagato ad un'altra creatura bersaglio che controlli.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[このクリーチャーがタップされた場合、あなたはそれのコントロールを失う。新しいコントローラはそれを魅了選手になる。効果は、あなたがコントロールする他の対象のクリーチャーに伝播されます。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[이 생물이 탭 경우 당신은 그것의 통제를 잃게됩니다. 새로운 컨트롤러는 마법에 걸린 플레이어가됩니다. 효과는 사용자가 제어하는 또 다른 목표 생물에 전파됩니다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если это существо постучал вы теряете контроль над ним. Новый контроллер становится игрок, который очарован его. Эффект распространяется на другой целевое существо под вашим контролем.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se esta criatura é aproveitado você perder o controle da mesma. O novo controlador torna-se o jogador que encantou-lo. O efeito é propagado para outra criatura alvo que você controla.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <TRIGGER value="BECAME_TAPPED"  simple_qualifier="self" />
 <CLEANUP fire_once="1" /> 

<PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(3)
  if player ~= nil then
      if TriggerObject() ~= nil then
         local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
         TriggerObject():Untap()       
         TriggerObject():SetBaseController(player)
     end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(7)
   characteristics:GrantAbility(8)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY resource_id="7">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Propagation (Selective 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Propagation (Sélectif 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Propagación (Selectiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fortpflanzung (Selektiv 1) ]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Propagazione (Selettiva 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[Propagação (Seletiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD" />
 <CLEANUP fire_once="1" />
 <PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(3)
  if player ~= nil then
        if TriggerObject() ~= nil then
              local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
        end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(7)
   characteristics:GrantAbility(8)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>

<SPELL_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Choose target creature, if the targeted creature becomes tapped, You gain the control of it. If its controller has other creatures on the battlefield, choose a new target to which to propagate the effect.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Choisissez la créature ciblée, si la créature ciblée devient engagé, vous gagnez le contrôle de celui-ci. Si son contrôleur a d'autres créatures sur le champ de bataille, choisissez une nouvelle cible à laquelle se propager l'effet.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Elija la criatura objetivo, si la criatura objetivo sea girada, Usted gana el control de ella. Si su controlador tiene otras criaturas en el campo de batalla, elige un nuevo objetivo para el cual se propague el efecto.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wählen Sie eine Kreatur deiner Wahl, wenn die gewählte Kreatur getappt wird, gewinnen Sie die Kontrolle über sie. Wenn seine Controller hat andere Kreaturen auf dem Schlachtfeld, wählen Sie ein neues Ziel, auf das der Effekt zu propagieren.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Scegli una creatura bersaglio, se la creatura bersaglio diventa TAPpata, ne Guadagni il controllo, se il suo controllore ha altre creature sul campo di battaglia, scegli un nuovo obiettivo a cui propagare l'effetto.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[対象となったクリーチャーがタップ状態になる場合には、あなたはそれのコントロールを得る、対象のクリーチャーを選択してください。そのコントローラーが戦場で他の生き物を持っている場合、影響を伝播するために、新しいターゲットを選択します。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[대상 생물이 도청 될 경우, 당신은 그것의 관리 권한을 획득, 대상 생물을 선택합니다. 그 컨트롤러가 전장에서 다른 생물이있는 경우, 효과를 전파하기에 새로운 대상을 선택합니다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Выберите целевое существо, если целевое существо поворачивается, Вы получаете контроль над ним. Если его контроллер имеет других существ на поле боя, выбрать новую цель для которой для распространения эффекта.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Escolha a criatura alvo, se a criatura alvo torna-se virado, você ganha o controle dela. Se seu controlador tem outras criaturas no campo de batalha, escolher um novo alvo para o qual a propagar o efeito.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[選擇目標生物,如果該目標生物成為橫置時,你獲得了它的控制。如果它的控制器具有其他生物在戰場上,選擇一個新的目標,其傳播的效果。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[選擇目標生物,如果該目標生物成為橫置時,你獲得了它的控制。如果它的控制器具有其他生物在戰場上,選擇一個新的目標,其傳播的效果。]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
      local filter = ClearFilter()
      filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
          </TARGET_DEFINITION>

   <PLAY_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local chest = MTG():DuelDataChest():Make_Chest( 100 )
       local DC_Index = EffectDC():Make_Chest(1)
       local number = MTG():GetNumberOfPlayers()
       if number ~= nil then
         for i=0,(number-1) do
          local player = MTG():GetNthPlayer(i)
          if (player ~= nil) and (player == EffectController()) then
                    chest:Set_PlayerPtr(i, EffectController())
              DC_Index:Set_Int(10,i)
          end
               
        end
      end
    end
   </PLAY_TIME_ACTION>

   <CONTINUOUS_ACTION layer="6">
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
   local DC_Index = EffectDC():Get_Chest(1)
   if DC_Index ~= nil then
      local oPlayerIndex = DC_Index:Get_Int(10)
           local characteristics = target:GetCurrentCharacteristics()
      if oPlayerIndex == 0 then
         characteristics:GrantAbility(1)
         characteristics:GrantAbility(2)
           elseif  oPlayerIndex == 1 then
         characteristics:GrantAbility(3)
         characteristics:GrantAbility(4)
           elseif  oPlayerIndex == 2 then
         characteristics:GrantAbility(5)
         characteristics:GrantAbility(6)
           elseif  oPlayerIndex == 3 then
         characteristics:GrantAbility(7)
         characteristics:GrantAbility(8)
           end
        end
      end
    </CONTINUOUS_ACTION>


    <DURATION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
         return (target == nil) or (target:GetOwner() ~= target:GetController())
    </DURATION>

</SPELL_ABILITY>

<STATIC_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Propagation (Selective 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Propagation (Sélectif 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Propagación (Selectiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fortpflanzung (Selektiv 1) ]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Propagazione (Selettiva 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[Propagação (Seletiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
</STATIC_ABILITY>

<HELP title="MORE_INFO_PROPAGATION_TITLE_1" body="MORE_INFO_PROPAGATION_BODY_1" zone="ZONE_ANY" />

</CARD_V2>
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby RiiakShiNal » 24 Nov 2013, 17:17

NeoAnderson wrote:2. About my card pointer issue you're right i didn't tought about this situation.
I am not sure how to resolve it with delayedDc expecially because i never forced a trigger with firetrigger function. Could you post an example of how you would resolve this problem?
You don't use FireTrigger() with delayed triggers. You can think of a Delayed Trigger as a Global Trigger with an EffectDC() with pre-definable values.

Code: Select all
<SPELL_ABILITY>
...
  <RESOLUTION_TIME_ACTION>
    local oPlayer = EffectController()
    local oDelayDC = EffectDC():Make_Chest(1)
    local oTarget = EffectDC():Get_Targets(0):Get_CardPtr(0)
    oDelayDC:Set_CardPtr(0, oTarget)
    oDelayDC:Set_PlayerPtr(1, oPlayer)
    MTG():CreateDelayedTrigger(1, oDelayDC)
    MTG():CreateDelayedTrigger(2, oDelayDC)
  </RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY resource_id="1">
  <TRIGGER value="BECAME_TAPPED">
    return TriggerObject() ~= nil and TriggerObject == EffectDC():Get_CardPtr(0)
  </TRIGGER>
  <RESOLUTION_TIME_ACTION>
    if (TriggerObject() ~= nil) then
      TriggerObject():SetBaseController(EffectDC():Get_PlayerPtr(1))
    end
  </RESOLUTION_TIME_ACTION>
  <!-- Pick new target -->
  <RESOLUTION_TIME_ACTION>
    local oPlayer = EffectDC():Get_PlayerPtr(1)
    local oDelayDC = EffectDC():Make_Chest(3)
    -- Note: Target could be stored anyway so this line may have to change
    local oTarget = EffectDC():Get_Targets(2):Get_CardPtr(0)
    oDelayDC:Set_CardPtr(0, oTarget)
    oDelayDC:Set_PlayerPtr(1, oPlayer)
    MTG():CreateDelayedTrigger(1, oDelayDC)
    MTG():CreateDelayedTrigger(2, oDelayDC)
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id="2">
  <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD">
    return TriggerObject() ~= nil and TriggerObject == EffectDC():Get_CardPtr(0)
  </TRIGGER>
  <!-- Pick new target -->
  <RESOLUTION_TIME_ACTION>
    local oPlayer = EffectDC():Get_PlayerPtr(1)
    local oDelayDC = EffectDC():Make_Chest(3)
    -- Note: Target could be stored anyway so this line may have to change
    local oTarget = EffectDC():Get_Targets(2):Get_CardPtr(0)
    oDelayDC:Set_CardPtr(0, oTarget)
    oDelayDC:Set_PlayerPtr(1, oPlayer)
    MTG():CreateDelayedTrigger(1, oDelayDC)
    MTG():CreateDelayedTrigger(2, oDelayDC)
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
NeoAnderson wrote:2b. Is not possible to resolve it using a player data chest? If I understanded how it works it should be linked to the player istance, so whenever a different player call this function it should works on different addresses.

Something like this :

(Main Spell action)
Code: Select all
<PLAY_TIME_ACTION>
   local chest = EffectController():PlayerDataChest():Make_Chest( 100 )
   chest:Set_PlayerPtr(10, EffectController())       
</PLAY_TIME_ACTION>
(Reading action inside the trigger block)
Code: Select all
 <PLAY_TIME_ACTION layer="2">
local chest = EffectController():PlayerDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(10)
  if player ~= nil then
   if TriggerObject() ~= nil then
           local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
         TriggerObject():Untap()       
         TriggerObject():SetBaseController(player)
        end
  end
end
</PLAY_TIME_ACTION>
No this won't work because if Player A casts it on a creature controlled by Player B and Player B casts it on a creature controlled by Player A then Player A takes control of Player B's creature then attacks with it control will revert to Player B instead of Player A like it should this is due to reading from the PlayerDataChest() of the current player rather than of the player who it was controlled by when the effect was cast. Also this would fail in a multiplayer game where Player A casts it on a creature belonging to Player B and then Player C casts it on a creature also belonging to player B, Player C would be the recipient of both creatures instead of Player A getting one and Player C getting the other.

NeoAnderson wrote:2b.(EDIT) I am just thinking this could not work because the EffectController() call into reading action refer to another player.
EffectController() refers to the player who controls the effect, in the case of Granted abilities the EffectController() is the controller of the card that has been granted the ability. For example if you cast a spell that gives an opponent's creature Lifelink, that opponent would gain life, not you (though this is done by characteristic instead of ability the concept is the same).

NeoAnderson wrote:2c. Another possibile solution, tell me if is doable, is there a card unique value? Should be something like card_instance. What happens if i store the value into a duel data chest, making the chest with card_instance value?
Something like : local chest = MTG():DuelDataChest():Make_Chest( CARD_INSTANCE )
Card instance won't work because the pointer won't be valid after the card changes zones (not to mention it is not meant as an integer type so that could cause major problems) so you won't be able to get the value from the original card. Though linking chests to cards is something I did for my ObjectDC functions. Though you either have to link to the target card and handle it like I do for ObjectDC functions or you need to somehow pass along the integer of the chest (Delayed Triggers).

NeoAnderson wrote:2c.(EDIT) I am just thinking this could not work because the reading action refer to another card.
Again it is like I said you use it like I do for my ObjectDC functions or you use Delayed Triggers. Delayed Triggers are the easiest thing to do here.


NeoAnderson wrote:Anyway i am realizing is not so easy to avoid a DelayedDC call, because all the other ways, lose or overwrite the source information.
Please let me know i need your help because i cannot resolve this issue by myself my knowledge is not enough.
Delayed Triggers are the easiest thing to use here and offer the best solution with the least overhead.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby NeoAnderson » 24 Nov 2013, 17:48

RiiakShiNal wrote:
Code: Select all
<SPELL_ABILITY>
...
  <RESOLUTION_TIME_ACTION>
    local oPlayer = EffectController()
    local oDelayDC = EffectDC():Make_Chest(1)
    local oTarget = EffectDC():Get_Targets(0):Get_CardPtr(0)
    oDelayDC:Set_CardPtr(0, oTarget)
    oDelayDC:Set_PlayerPtr(1, oPlayer)
    MTG():CreateDelayedTrigger(1, oDelayDC)
    MTG():CreateDelayedTrigger(2, oDelayDC)
  </RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY resource_id="1">
  <TRIGGER value="BECAME_TAPPED">
    return TriggerObject() ~= nil and TriggerObject == EffectDC():Get_CardPtr(0)
  </TRIGGER>
  <RESOLUTION_TIME_ACTION>
    if (TriggerObject() ~= nil) then
      TriggerObject():SetBaseController(EffectDC():Get_PlayerPtr(1))
    end
  </RESOLUTION_TIME_ACTION>
  <!-- Pick new target -->
  <RESOLUTION_TIME_ACTION>
    local oPlayer = EffectDC():Get_PlayerPtr(1)
    local oDelayDC = EffectDC():Make_Chest(3)
    -- Note: Target could be stored anyway so this line may have to change
    local oTarget = EffectDC():Get_Targets(2):Get_CardPtr(0)
    oDelayDC:Set_CardPtr(0, oTarget)
    oDelayDC:Set_PlayerPtr(1, oPlayer)
    MTG():CreateDelayedTrigger(1, oDelayDC)
    MTG():CreateDelayedTrigger(2, oDelayDC)
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id="2">
  <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD">
    return TriggerObject() ~= nil and TriggerObject == EffectDC():Get_CardPtr(0)
  </TRIGGER>
  <!-- Pick new target -->
  <RESOLUTION_TIME_ACTION>
    local oPlayer = EffectDC():Get_PlayerPtr(1)
    local oDelayDC = EffectDC():Make_Chest(3)
    -- Note: Target could be stored anyway so this line may have to change
    local oTarget = EffectDC():Get_Targets(2):Get_CardPtr(0)
    oDelayDC:Set_CardPtr(0, oTarget)
    oDelayDC:Set_PlayerPtr(1, oPlayer)
    MTG():CreateDelayedTrigger(1, oDelayDC)
    MTG():CreateDelayedTrigger(2, oDelayDC)
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
Riiak I am sorry if I bother you with my questions, you're a really kind person.
I saw your code and when i tried to implement the card's code, with DelayedDC i made something similar, but probably You have fixed my missing points.
I just have some questions,
1. Doing in this way what happen if the target card activates the first delayed trigger (become tapped), it changes the controller, now what happen if it leaves the battlefield? The other delayed trigger will be also activated?? If yes there is a way to clear, the suspended delayed triggers??
2. this is a minor issue, when i was using the grant ability i was also giving to the card some text info, so the player could recognize which cards were under this effect. Should I have to add a static ability for the text, and grant it, to do the same with your code?
3. I tought about a possible solution without DelayedDC it isn't pretty looking but it should work or i hope so.
It is based on this reasoning :
I can store the player into a different index inside the DuelDataChest, we know that the players can be min 2 up to 4, so i can check the player into the main spell and then grant different abilities basing on the player who has launched the spell.

Grant different abilities just because so I can refer to a different index without keep it into a variable.


Now is not easy to test if this code will work because i should force the AI to play this spell, could you take a look and let me know what you think? Do you see something i have not considered?

Spirit Control (modified code) | Open
Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="6">
   <FILENAME text="SPIRIT_CONTROL_U_7272233" />
   <CARDNAME text="SPIRIT_CONTROL_U" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Spirit Control]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Contrôle de l'Esprit]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Control de Espíritu]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Geist Kontrolle]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Controllo dello Spirito]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[精神コントロール]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[정신 제어]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Дух управления]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Controle de espírito]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="7272233" />
   <ARTID value="7227233" />
   <ARTIST name="DigitalArt© - Akasha" />
   <CASTING_COST cost="{2}{U}{U}{U}" />
   <TYPE metaname="Tribal" />
   <TYPE metaname="Instant" />
   <SUB_TYPE metaname="Divinity" />
   <EXPANSION value="DPI" />
   <RARITY metaname="R" />

<TRIGGERED_ABILITY resource_id="2">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If this creature is tapped you lose control of it. The new controller becomes the player who enchanted it. The effect is propagated to another target creature you control.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si cette créature est engagé vous perdez le contrôle de celui-ci. Le nouveau contrôleur devient le joueur qui a enchanté il. L'effet se propage à une autre créature ciblée que vous contrôlez.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si se pulsa esta criatura se pierde el control de la misma. El nuevo controlador se convierte en el jugador que encantó a él. El efecto se propaga a otra criatura objetivo que controles.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls diese Kreatur getappt Sie verlieren die Kontrolle über sie. Der neue Controller wird der Spieler, der sie bezaubert. Der Effekt wird auf einer anderen Kreatur deiner Wahl, die du kontrollierst propagiert.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se questa creatura viene tappata ne perdi il controllo. Il nuovo controllore diventa il giocatore che l'ha incantata e l'effetto viene propagato ad un'altra creatura bersaglio che controlli.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[このクリーチャーがタップされた場合、あなたはそれのコントロールを失う。新しいコントローラはそれを魅了選手になる。効果は、あなたがコントロールする他の対象のクリーチャーに伝播されます。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[이 생물이 탭 경우 당신은 그것의 통제를 잃게됩니다. 새로운 컨트롤러는 마법에 걸린 플레이어가됩니다. 효과는 사용자가 제어하는 또 다른 목표 생물에 전파됩니다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если это существо постучал вы теряете контроль над ним. Новый контроллер становится игрок, который очарован его. Эффект распространяется на другой целевое существо под вашим контролем.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se esta criatura é aproveitado você perder o controle da mesma. O novo controlador torna-se o jogador que encantou-lo. O efeito é propagado para outra criatura alvo que você controla.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <TRIGGER value="BECAME_TAPPED"  simple_qualifier="self" />
 <CLEANUP fire_once="1" /> 

<PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(0)
  if player ~= nil then
      if TriggerObject() ~= nil then
         local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
         TriggerObject():Untap()       
         TriggerObject():SetBaseController(player)
     end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(1)
   characteristics:GrantAbility(2)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>


<TRIGGERED_ABILITY resource_id="1">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Propagation (Selective 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Propagation (Sélectif 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Propagación (Selectiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fortpflanzung (Selektiv 1) ]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Propagazione (Selettiva 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[Propagação (Seletiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD" />
 <CLEANUP fire_once="1" />
 <PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(0)
  if player ~= nil then
        if TriggerObject() ~= nil then
              local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
        end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(1)
   characteristics:GrantAbility(2)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>


<TRIGGERED_ABILITY resource_id="4">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If this creature is tapped you lose control of it. The new controller becomes the player who enchanted it. The effect is propagated to another target creature you control.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si cette créature est engagé vous perdez le contrôle de celui-ci. Le nouveau contrôleur devient le joueur qui a enchanté il. L'effet se propage à une autre créature ciblée que vous contrôlez.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si se pulsa esta criatura se pierde el control de la misma. El nuevo controlador se convierte en el jugador que encantó a él. El efecto se propaga a otra criatura objetivo que controles.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls diese Kreatur getappt Sie verlieren die Kontrolle über sie. Der neue Controller wird der Spieler, der sie bezaubert. Der Effekt wird auf einer anderen Kreatur deiner Wahl, die du kontrollierst propagiert.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se questa creatura viene tappata ne perdi il controllo. Il nuovo controllore diventa il giocatore che l'ha incantata e l'effetto viene propagato ad un'altra creatura bersaglio che controlli.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[このクリーチャーがタップされた場合、あなたはそれのコントロールを失う。新しいコントローラはそれを魅了選手になる。効果は、あなたがコントロールする他の対象のクリーチャーに伝播されます。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[이 생물이 탭 경우 당신은 그것의 통제를 잃게됩니다. 새로운 컨트롤러는 마법에 걸린 플레이어가됩니다. 효과는 사용자가 제어하는 또 다른 목표 생물에 전파됩니다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если это существо постучал вы теряете контроль над ним. Новый контроллер становится игрок, который очарован его. Эффект распространяется на другой целевое существо под вашим контролем.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se esta criatura é aproveitado você perder o controle da mesma. O novo controlador torna-se o jogador que encantou-lo. O efeito é propagado para outra criatura alvo que você controla.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <TRIGGER value="BECAME_TAPPED"  simple_qualifier="self" />
 <CLEANUP fire_once="1" /> 

  <PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(1)
  if player ~= nil then
      if TriggerObject() ~= nil then
         local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
         TriggerObject():Untap()       
         TriggerObject():SetBaseController(player)
     end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(3)
   characteristics:GrantAbility(4)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>


<TRIGGERED_ABILITY resource_id="3">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Propagation (Selective 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Propagation (Sélectif 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Propagación (Selectiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fortpflanzung (Selektiv 1) ]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Propagazione (Selettiva 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[Propagação (Seletiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD" />
 <CLEANUP fire_once="1" />

 <PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(1)
  if player ~= nil then
        if TriggerObject() ~= nil then
              local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
        end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(3)
   characteristics:GrantAbility(4)
       end
      end
    </CONTINUOUS_ACTION>


    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY resource_id="6">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If this creature is tapped you lose control of it. The new controller becomes the player who enchanted it. The effect is propagated to another target creature you control.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si cette créature est engagé vous perdez le contrôle de celui-ci. Le nouveau contrôleur devient le joueur qui a enchanté il. L'effet se propage à une autre créature ciblée que vous contrôlez.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si se pulsa esta criatura se pierde el control de la misma. El nuevo controlador se convierte en el jugador que encantó a él. El efecto se propaga a otra criatura objetivo que controles.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls diese Kreatur getappt Sie verlieren die Kontrolle über sie. Der neue Controller wird der Spieler, der sie bezaubert. Der Effekt wird auf einer anderen Kreatur deiner Wahl, die du kontrollierst propagiert.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se questa creatura viene tappata ne perdi il controllo. Il nuovo controllore diventa il giocatore che l'ha incantata e l'effetto viene propagato ad un'altra creatura bersaglio che controlli.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[このクリーチャーがタップされた場合、あなたはそれのコントロールを失う。新しいコントローラはそれを魅了選手になる。効果は、あなたがコントロールする他の対象のクリーチャーに伝播されます。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[이 생물이 탭 경우 당신은 그것의 통제를 잃게됩니다. 새로운 컨트롤러는 마법에 걸린 플레이어가됩니다. 효과는 사용자가 제어하는 또 다른 목표 생물에 전파됩니다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если это существо постучал вы теряете контроль над ним. Новый контроллер становится игрок, который очарован его. Эффект распространяется на другой целевое существо под вашим контролем.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se esta criatura é aproveitado você perder o controle da mesma. O novo controlador torna-se o jogador que encantou-lo. O efeito é propagado para outra criatura alvo que você controla.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <TRIGGER value="BECAME_TAPPED"  simple_qualifier="self" />
 <CLEANUP fire_once="1" /> 

<PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(2)
  if player ~= nil then
      if TriggerObject() ~= nil then
         local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
         TriggerObject():Untap()       
         TriggerObject():SetBaseController(player)
     end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(5)
   characteristics:GrantAbility(6)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY resource_id="5">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Propagation (Selective 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Propagation (Sélectif 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Propagación (Selectiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fortpflanzung (Selektiv 1) ]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Propagazione (Selettiva 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[Propagação (Seletiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD" />
 <CLEANUP fire_once="1" />
 <PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(2)
  if player ~= nil then
        if TriggerObject() ~= nil then
              local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
        end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(5)
   characteristics:GrantAbility(6)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>


<TRIGGERED_ABILITY resource_id="8">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If this creature is tapped you lose control of it. The new controller becomes the player who enchanted it. The effect is propagated to another target creature you control.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si cette créature est engagé vous perdez le contrôle de celui-ci. Le nouveau contrôleur devient le joueur qui a enchanté il. L'effet se propage à une autre créature ciblée que vous contrôlez.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si se pulsa esta criatura se pierde el control de la misma. El nuevo controlador se convierte en el jugador que encantó a él. El efecto se propaga a otra criatura objetivo que controles.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls diese Kreatur getappt Sie verlieren die Kontrolle über sie. Der neue Controller wird der Spieler, der sie bezaubert. Der Effekt wird auf einer anderen Kreatur deiner Wahl, die du kontrollierst propagiert.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se questa creatura viene tappata ne perdi il controllo. Il nuovo controllore diventa il giocatore che l'ha incantata e l'effetto viene propagato ad un'altra creatura bersaglio che controlli.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[このクリーチャーがタップされた場合、あなたはそれのコントロールを失う。新しいコントローラはそれを魅了選手になる。効果は、あなたがコントロールする他の対象のクリーチャーに伝播されます。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[이 생물이 탭 경우 당신은 그것의 통제를 잃게됩니다. 새로운 컨트롤러는 마법에 걸린 플레이어가됩니다. 효과는 사용자가 제어하는 또 다른 목표 생물에 전파됩니다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если это существо постучал вы теряете контроль над ним. Новый контроллер становится игрок, который очарован его. Эффект распространяется на другой целевое существо под вашим контролем.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se esta criatura é aproveitado você perder o controle da mesma. O novo controlador torna-se o jogador que encantou-lo. O efeito é propagado para outra criatura alvo que você controla.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[如果此生物橫置你失去的控制權。新的控制器將成為誰陶醉它的播放器。的影響傳播到你控制另一個目標生物。]]></LOCALISED_TEXT>
      <TRIGGER value="BECAME_TAPPED"  simple_qualifier="self" />
 <CLEANUP fire_once="1" /> 

<PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(3)
  if player ~= nil then
      if TriggerObject() ~= nil then
         local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
         TriggerObject():Untap()       
         TriggerObject():SetBaseController(player)
     end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(7)
   characteristics:GrantAbility(8)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY resource_id="7">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Propagation (Selective 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Propagation (Sélectif 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Propagación (Selectiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fortpflanzung (Selektiv 1) ]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Propagazione (Selettiva 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[Propagação (Seletiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD" />
 <CLEANUP fire_once="1" />
 <PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(3)
  if player ~= nil then
        if TriggerObject() ~= nil then
              local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
        end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(7)
   characteristics:GrantAbility(8)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>

<SPELL_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Choose target creature, if the targeted creature becomes tapped, You gain the control of it. If its controller has other creatures on the battlefield, choose a new target to which to propagate the effect.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Choisissez la créature ciblée, si la créature ciblée devient engagé, vous gagnez le contrôle de celui-ci. Si son contrôleur a d'autres créatures sur le champ de bataille, choisissez une nouvelle cible à laquelle se propager l'effet.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Elija la criatura objetivo, si la criatura objetivo sea girada, Usted gana el control de ella. Si su controlador tiene otras criaturas en el campo de batalla, elige un nuevo objetivo para el cual se propague el efecto.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wählen Sie eine Kreatur deiner Wahl, wenn die gewählte Kreatur getappt wird, gewinnen Sie die Kontrolle über sie. Wenn seine Controller hat andere Kreaturen auf dem Schlachtfeld, wählen Sie ein neues Ziel, auf das der Effekt zu propagieren.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Scegli una creatura bersaglio, se la creatura bersaglio diventa TAPpata, ne Guadagni il controllo, se il suo controllore ha altre creature sul campo di battaglia, scegli un nuovo obiettivo a cui propagare l'effetto.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[対象となったクリーチャーがタップ状態になる場合には、あなたはそれのコントロールを得る、対象のクリーチャーを選択してください。そのコントローラーが戦場で他の生き物を持っている場合、影響を伝播するために、新しいターゲットを選択します。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[대상 생물이 도청 될 경우, 당신은 그것의 관리 권한을 획득, 대상 생물을 선택합니다. 그 컨트롤러가 전장에서 다른 생물이있는 경우, 효과를 전파하기에 새로운 대상을 선택합니다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Выберите целевое существо, если целевое существо поворачивается, Вы получаете контроль над ним. Если его контроллер имеет других существ на поле боя, выбрать новую цель для которой для распространения эффекта.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Escolha a criatura alvo, se a criatura alvo torna-se virado, você ganha o controle dela. Se seu controlador tem outras criaturas no campo de batalha, escolher um novo alvo para o qual a propagar o efeito.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[選擇目標生物,如果該目標生物成為橫置時,你獲得了它的控制。如果它的控制器具有其他生物在戰場上,選擇一個新的目標,其傳播的效果。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[選擇目標生物,如果該目標生物成為橫置時,你獲得了它的控制。如果它的控制器具有其他生物在戰場上,選擇一個新的目標,其傳播的效果。]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
      local filter = ClearFilter()
      filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
          </TARGET_DEFINITION>

   <PLAY_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local chest = MTG():DuelDataChest():Make_Chest( 100 )
       local DC_Index = EffectDC():Make_Chest(1)
       local number = MTG():GetNumberOfPlayers()
       if number ~= nil then
         for i=0,(number-1) do
          local player = MTG():GetNthPlayer(i)
          if (player ~= nil) and (player == EffectController()) then
                    chest:Set_PlayerPtr(i, EffectController())
              DC_Index:Set_Int(10,i)
          end
               
        end
      end
    end
   </PLAY_TIME_ACTION>

   <CONTINUOUS_ACTION layer="6">
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
   local DC_Index = EffectDC():Get_Chest(1)
   if DC_Index ~= nil then
      local oPlayerIndex = DC_Index:Get_Int(10)
           local characteristics = target:GetCurrentCharacteristics()
      if oPlayerIndex == 0 then
         characteristics:GrantAbility(1)
         characteristics:GrantAbility(2)
           elseif  oPlayerIndex == 1 then
         characteristics:GrantAbility(3)
         characteristics:GrantAbility(4)
           elseif  oPlayerIndex == 2 then
         characteristics:GrantAbility(5)
         characteristics:GrantAbility(6)
           elseif  oPlayerIndex == 3 then
         characteristics:GrantAbility(7)
         characteristics:GrantAbility(8)
           end
        end
      end
    </CONTINUOUS_ACTION>


    <DURATION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
         return (target == nil) or (target:GetOwner() ~= target:GetController())
    </DURATION>

</SPELL_ABILITY>

<STATIC_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Propagation (Selective 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Propagation (Sélectif 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Propagación (Selectiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fortpflanzung (Selektiv 1) ]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Propagazione (Selettiva 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[Propagação (Seletiva 1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[傳播(選擇性1)]]></LOCALISED_TEXT>
</STATIC_ABILITY>

<HELP title="MORE_INFO_PROPAGATION_TITLE_1" body="MORE_INFO_PROPAGATION_BODY_1" zone="ZONE_ANY" />

</CARD_V2>
---------------------------------------------------------
---------------------------------------------------------


Not working :
Spirit Control Riiak Mod. | Open
Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="6">
   <FILENAME text="SPIRIT_CONTROL_U_7272233" />
   <CARDNAME text="SPIRIT_CONTROL_U" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Spirit Control]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Contrôle de l'Esprit]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Control de Espíritu]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Geist Kontrolle]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Controllo dello Spirito]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[精神コントロール]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[정신 제어]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Дух управления]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Controle de espírito]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="7272233" />
   <ARTID value="7227233" />
   <ARTIST name="DigitalArt© - Akasha" />
   <CASTING_COST cost="{2}{U}{U}{U}" />
   <TYPE metaname="Tribal" />
   <TYPE metaname="Instant" />
   <SUB_TYPE metaname="Divinity" />
   <EXPANSION value="DPI" />
   <RARITY metaname="R" />

<SPELL_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Choose target creature, if the targeted creature becomes

tapped, You gain the control of it. If its controller has other creatures on the battlefield, choose a new target

to which to propagate the effect.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Choisissez la créature ciblée, si la créature ciblée devient

engagé, vous gagnez le contrôle de celui-ci. Si son contrôleur a d'autres créatures sur le champ de bataille,

choisissez une nouvelle cible à laquelle se propager l'effet.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Elija la criatura objetivo, si la criatura objetivo sea girada,

Usted gana el control de ella. Si su controlador tiene otras criaturas en el campo de batalla, elige un nuevo

objetivo para el cual se propague el efecto.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wählen Sie eine Kreatur deiner Wahl, wenn die gewählte Kreatur

getappt wird, gewinnen Sie die Kontrolle über sie. Wenn seine Controller hat andere Kreaturen auf dem Schlachtfeld,

wählen Sie ein neues Ziel, auf das der Effekt zu propagieren.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Scegli una creatura bersaglio, se la creatura bersaglio diventa

TAPpata, ne Guadagni il controllo, se il suo controllore ha altre creature sul campo di battaglia, scegli un nuovo

obiettivo a cui propagare l'effetto.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[対象となったクリーチャーがタップ状態になる場合には、あなたはそれのコントロールを得る、対象のクリーチャーを選択してください。そ

のコントローラーが戦場で他の生き物を持っている場合、影響を伝播するために、新しいターゲットを選択します。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[대상 생물이 도청 될 경우, 당신은 그것의 관리 권한을 획득, 대상 생물을 선택합니다. 그 컨트

롤러가 전장에서 다른 생물이있는 경우, 효과를 전파하기에 새로운 대상을 선택합니다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Выберите целевое существо, если целевое существо

поворачивается, Вы получаете контроль над ним. Если его контроллер имеет других существ на поле боя, выбрать новую

цель для которой для распространения эффекта.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Escolha a criatura alvo, se a criatura alvo torna-se virado,

você ganha o controle dela. Se seu controlador tem outras criaturas no campo de batalha, escolher um novo alvo para

o qual a propagar o efeito.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[選擇目標生物,如果該目標生物成為橫置時,你獲得了它的控制。如果它的控制器具有其他生物在戰場上,選擇一個

新的目標,其傳播的效果。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[選擇目標生物,如果該目標生物成為橫置時,你獲得了它的控制。如果它的控制器具有其他生物在戰場上,選擇一個

新的目標,其傳播的效果。]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
      local filter = ClearFilter()
      filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
          </TARGET_DEFINITION>
  <RESOLUTION_TIME_ACTION>
    local oPlayer = EffectController()
    local oDelayDC = EffectDC():Make_Chest(1)
    local oTarget = EffectDC():Get_Targets(0):Get_CardPtr(0)
    oDelayDC:Set_CardPtr(0, oTarget)
    oDelayDC:Set_PlayerPtr(1, oPlayer)
    MTG():CreateDelayedTrigger(1, oDelayDC)
    MTG():CreateDelayedTrigger(2, oDelayDC)
  </RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>

<TRIGGERED_ABILITY resource_id="1">
  <TRIGGER value="BECAME_TAPPED">
    return TriggerObject() ~= nil and TriggerObject == EffectDC():Get_CardPtr(0)
  </TRIGGER>
 <RESOLUTION_TIME_ACTION>
    if (TriggerObject() ~= nil) then
      TriggerObject():SetBaseController(EffectDC():Get_PlayerPtr(1))
    end
  </RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
    local oPlayer = EffectDC():Get_PlayerPtr(1)
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
    filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
    local count = filter:Count()
    if count &gt; 0 then   
        oPlayer:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(2) )
    end
  </RESOLUTION_TIME_ACTION>
  <!-- Pick new target -->
  <RESOLUTION_TIME_ACTION>
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
    filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
    local count = filter:Count()
    if count &gt; 0 then   
        local oPlayer = EffectDC():Get_PlayerPtr(1)
       local oDelayDC = EffectDC():Make_Chest(3)
       -- Note: Target could be stored anyway so this line may have to change
       local oTarget = EffectDC():Get_Targets(2):Get_CardPtr(0)
       oDelayDC:Set_CardPtr(0, oTarget)
       oDelayDC:Set_PlayerPtr(1, oPlayer)
      MTG():CreateDelayedTrigger(1, oDelayDC)
   MTG():CreateDelayedTrigger(2, oDelayDC)
    end
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY resource_id="2">
  <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD">
    return TriggerObject() ~= nil and TriggerObject == EffectDC():Get_CardPtr(0)
  </TRIGGER>
 <RESOLUTION_TIME_ACTION>
    local oPlayer = EffectDC():Get_PlayerPtr(1)
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
    filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
    local count = filter:Count()
    if count &gt; 0 then   
        oPlayer:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(2) )
    end
  </RESOLUTION_TIME_ACTION>
  <!-- Pick new target -->
  <RESOLUTION_TIME_ACTION>
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
    filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
    local count = filter:Count()
    if count &gt; 0 then   
       local oPlayer = EffectDC():Get_PlayerPtr(1)
    local oDelayDC = EffectDC():Make_Chest(3)
       -- Note: Target could be stored anyway so this line may have to change
       local oTarget = EffectDC():Get_Targets(2):Get_CardPtr(0)
       oDelayDC:Set_CardPtr(0, oTarget)
       oDelayDC:Set_PlayerPtr(1, oPlayer)
       MTG():CreateDelayedTrigger(1, oDelayDC)
       MTG():CreateDelayedTrigger(2, oDelayDC)
    end
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

<HELP title="MORE_INFO_PROPAGATION_TITLE_1" body="MORE_INFO_PROPAGATION_BODY_1" zone="ZONE_ANY" />

</CARD_V2>
UPDATE : found the problem!!! there is a simple type missing "()" , inside the trigger object check you wrote TriggerObject instead of TriggerObject()!!!!
UDATE 2 : found another issue: The second Trigger Zone change doesn't trigger because you used ZONECHANGE_END if you change it with ZONECHANGE_BEGIN it works.
I also received the answer to my question I made before (point 1) each trigger will be executed. Now is there a way to exclude a trigger if the other one is executed?
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby Real » 24 Nov 2013, 19:34

Question, is it possible to code Clinging Mists? I thought I can simply combine Sleep and Tangle, but I realized it should only tap the attacking (vigilance) creatures.

Sorry, I'm a noob at this.
Real
 
Posts: 19
Joined: 12 Aug 2013, 16:23
Has thanked: 2 times
Been thanked: 0 time

Re: Formal Request Thread

Postby RiiakShiNal » 24 Nov 2013, 20:24

NeoAnderson wrote:Riiak I am sorry if I bother you with my questions, you're a really kind person.
I saw your code and when i tried to implement the card's code, with DelayedDC i made something similar, but probably You have fixed my missing points.
I just have some questions,
1. Doing in this way what happen if the target card activates the first delayed trigger (become tapped), it changes the controller, now what happen if it leaves the battlefield? The other delayed trigger will be also activated?? If yes there is a way to clear, the suspended delayed triggers??
My example is just that an example it is not complete. I did not put in any CLEANUP blocks to remove them once they are finished, nor have I put in MTG():RemoveDelayedTrigger() calls to remove the unneeded triggers. Technically though it could all be combined into a single TRIGGERED_ABILITY with multiple triggers and set to only fire once via a CLEANUP block, it could switch between slightly different code paths in the ability by setting an integer in the TRIGGER blocks to let you know which pieces to execute.

NeoAnderson wrote:2. this is a minor issue, when i was using the grant ability i was also giving to the card some text info, so the player could recognize which cards were under this effect. Should I have to add a static ability for the text, and grant it, to do the same with your code?
Yes, Delayed Triggers do not add text to cards as they are Global in nature and not tied to a card so you would need to GrantAbility() a STATIC_ABILITY in a CONTINUOUS_ACTION block to give the card the text. Though it should be noted that Delayed Triggers for a card are not affected by cards like Turn to Frog which call LoseAllAbilities(), but the Granted Ability may be affected depending on what layer (6 or less and it will be affected) it is assigned to. As such if a Card is affected by Turn to Frog it could lose the ability text, then killed, but the Delayed Trigger would still fire.

NeoAnderson wrote:3. I tought about a possible solution without DelayedDC it isn't pretty looking but it should work or i hope so.
It is based on this reasoning :
I can store the player into a different index inside the DuelDataChest, we know that the players can be min 2 up to 4, so i can check the player into the main spell and then grant different abilities basing on the player who has launched the spell.

Grant different abilities just because so I can refer to a different index without keep it into a variable.


Now is not easy to test if this code will work because i should force the AI to play this spell, could you take a look and let me know what you think? Do you see something i have not considered?
Theoretically, it could work, but it's very ugly and quite wasteful in terms of code. It is also difficult to debug due to the same code being in so many different places, so it could be that player 1 has no bugs, but if you are player 3 it doesn't work due to a bug.

NeoAnderson wrote:UPDATE : found the problem!!! there is a simple type missing "()" , inside the trigger object check you wrote TriggerObject instead of TriggerObject()!!!!
UDATE 2 : found another issue: The second Trigger Zone change doesn't trigger because you used ZONECHANGE_END if you change it with ZONECHANGE_BEGIN it works.
It's an example I never said it was complete or tested. I wrote it off the top of my head while typing up the post. I'm not running any of it through any form of code analysis, syntax checker, or the engine itself.

As for the TRIGGER, ZONECHANGE_END is what is used for "dies" triggers, though because the zone changed any non-protected card pointers get cleared, so the card pointers should be protected by using Protect_CardPtr() or LKIShield_CardPtr() depending on what information you need if any before being sent to the Delayed Trigger.

NeoAnderson wrote:I also received the answer to my question I made before (point 1) each trigger will be executed. Now is there a way to exclude a trigger if the other one is executed?
As I said earlier in this post you can use MTG():RemoveDelayedTrigger(), though it would probably be better to simply combine them into a single TRIGGERED_ABILITY with multiple TRIGGERs and switch off the code paths using an EffectDC() variable set in the TRIGGER block that way you can just use the fire_once in the CLEANUP block.
Code: Select all
<TRIGGERED_ABILITY resource_id="1">
  <TRIGGER value="BECAME_TAPPED">
    if (TriggerObject() == EffectDC():Get_CardPtr(0)) then
      EffectDC():Int_Set(10, 1)
      return true
    end
    return false
  </TRIGGER>
  <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD">
    if (TriggerObject() == EffectDC():Get_CardPtr(0)) then
      EffectDC():Int_Set(10, 2)
      return true
    end
    return false
  </TRIGGER>
  <RESOLUTION_TIME_ACTION>
    if (EffectDC():Int_Get(10) == 1) then
      -- Change Controller
    end
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
Real wrote:Question, is it possible to code Clinging Mists? I thought I can simply combine Sleep and Tangle, but I realized it should only tap the attacking (vigilance) creatures.
Yes, it is possible, but creatures are only considered attacking if they were chosen to attack in the DECLARE_ATTACKERS step and it is still within that combat phase. Though it needs to tap all attacking creatures not just those with vigilance as they could have been untapped by another effect after they were declared as attacking. So Sleep is inappropriate, but Tangle provides just about all you need you just have to change Hold() to TapAndHold().
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby Real » 24 Nov 2013, 21:43

Thanks Riiak. I am still trying to learn.

So, if I want to incorporate the fateful hour, I will need to have two 'if' clause. This is what I have. I'm pretty sure it's not correct. Can you correct my code?

Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="9">
   <FILENAME text="CLINGING_MISTS_262844" />
   <CARDNAME text="CLINGING_MISTS" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Clinging Mists]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Brumes tenaces]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Nieblas persistentes]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Undurchdringbarer Nebel]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Nebbie Impregnanti]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[しがみつく霧]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[들러붙는 안개]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Липкий Туман]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Brumas Pegajosas]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="262844" />
   <ARTID value="A262844" />
   <ARTIST name="Anthony Francisco" />
   <CASTING_COST cost="{2}{G}" />
   <TYPE metaname="Instant" />
   <EXPANSION value="DPI" />
   <RARITY metaname="C" />
   <SPELL_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Prevent all combat damage that would be dealt this turn.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Prévenez toutes les blessures de combat qui devraient être infligées ce tour-ci.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Prevén todo el daño de combate que se fuera a hacer este turno.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Verhindere allen Kampfschaden, der in diesem Zug zugefügt würde.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Previeni tutto il danno da combattimento che verrebbe inflitto in questo turno.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[このターンに与えられるすべての戦闘ダメージを軽減する。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[이 턴에 입혀지려 하는 모든 전투피해를 방지한다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Предотвратите все боевые повреждения, которые должны быть нанесены в этом ходу.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Previna todo o dano de combate que seria causado neste turno.]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION layer="8">
    local number = MTG():GetNumberOfPlayers()
    for i=0,(number-1) do
       local player = MTG():GetNthPlayer(i)
       if player ~= nil then
          local characteristics = player:GetCurrentCharacteristics()
          characteristics:Bool_Set( PLAYER_CHARACTERISTIC_CANT_TAKE_COMBAT_DAMAGE, 1 )
          characteristics:Bool_Set( PLAYER_CHARACTERISTIC_CREATURES_CANT_TAKE_COMBAT_DAMAGE, 1 )
       end
    end
    </CONTINUOUS_ACTION>
      <DURATION simple_duration="UntilEOT" />
   </SPELL_ABILITY>
   <SPELL_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[|Fateful hour| — If you have 5 or less life, tap all attacking creatures. Those creatures don't untap during their controller's next untap step.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[|Heure fatidique - Si vous avez 5 points de vie ou moins, engagez toutes les créatures attaquantes. Ces créatures ne se dégagent pas pendant la prochaine étape de dégagement de leur contrôleur.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[|Hora fatídica — Si tienes 5 vidas o menos, gira todas las criaturas atacantes. Esas criaturas no se enderezan durante el próximo paso de enderezar de su controlador.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[|Schicksalsstunde -- Falls du 5 Lebenspunkte oder weniger hast, tappe alle angreifenden Kreaturen. Diese Kreaturen enttappen nicht während des nächsten Enttappsegments ihres Beherrschers.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[|Ora fatidica — Se hai 5 o meno punti vita, TAPpa tutte le creature attaccanti. Quelle creature non STAPpano durante il prossimo STAP del loro controllore.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[|窮地 ― あなたのライフが5点以下である場合、すべての攻撃クリーチャーをタップする。それらのクリーチャーは、それらのコントローラーの次のアンタップ・ステップにアンタップしない。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[[운명의 시간 -- 당신의 생명이 5점 이하라면, 모든 공격생물들을 탭한다. 그 생물들은 조종자의 다음 언탭단에 언탭되지 않는다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[|Роковой час — Если количество ваших жизней меньше или равно 5, поверните все атакующие существа. Те существа не разворачиваются во время следующего шага разворота контролирующего их игрока.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[|Hora fatal — Se você tiver 5 ou menos pontos de vida, vire todas as criaturas atacantes. Estas criaturas não são desviradas durante a próxima etapa de desvirar de seus controladores.]]></LOCALISED_TEXT>
      <FILTER filter_id="1">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add( FE_IS_ATTACKING, true )
          </FILTER>
      <RESOLUTION_TIME_ACTION filter_id="1">
    if EffectController():GetLifeTotal() &gt; 5 then
    if FilteredCard() ~= nil then
       FilteredCard():TapAndHold()
    end
    </RESOLUTION_TIME_ACTION>
   </SPELL_ABILITY>
   <AI_AVAILABILITY window_step="declare_blockers" type="window" />
   <AI_AVAILABILITY type="in_response" response_source="1" />
   <AI_BASE_SCORE score="900" zone="ZONE_HAND" />
</CARD_V2>
Real
 
Posts: 19
Joined: 12 Aug 2013, 16:23
Has thanked: 2 times
Been thanked: 0 time

Re: Formal Request Thread

Postby NeoAnderson » 24 Nov 2013, 23:24

RiiakShiNal wrote:As I said earlier in this post you can use MTG():RemoveDelayedTrigger(), though it would probably be better to simply combine them into a single TRIGGERED_ABILITY with multiple TRIGGERs and switch off the code paths using an EffectDC() variable set in the TRIGGER block that way you can just use the fire_once in the CLEANUP block.
Thanks a lot my dear friend, do you know what?
I was going in the same direction, i was combining the 2 triggers into 1 with a variable to switch off the controller change, that is the only part who changes.

But i encountered a problem, this is not the first time i found this problem, if i combine these 2 triggers the zone change trigger doesn't work. I don't know why. I try both ZONECHANGE_END with protecting the card pointer and also the ZONECHANGE_BEGIN.
The weird thing is that if i separate the triggers it works!

Any idea of the reasons??

Code: Select all
<TRIGGERED_ABILITY resource_id="1">
  <TRIGGER value="BECAME_TAPPED">
    if (TriggerObject() == EffectDC():Get_CardPtr(0)) then
      EffectDC():Int_Set(10, 1)
      return true
    end
    return false
  </TRIGGER>
  <TRIGGER value="ZONECHANGE_BEGIN" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD">
    if (TriggerObject() == EffectDC():Get_CardPtr(0)) then
      EffectDC():Int_Set(10, 2)
      return true
    end
    return false
  </TRIGGER>

   <CLEANUP fire_once="1" />

  <RESOLUTION_TIME_ACTION>
    if (EffectDC():Int_Get(10) == 1) then
      -- Change Controller
   TriggerObject():SetBaseController(EffectDC():Get_PlayerPtr(1))
    end
  </RESOLUTION_TIME_ACTION>

<RESOLUTION_TIME_ACTION>
    local oPlayer = EffectDC():Get_PlayerPtr(1)
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
    filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
    local count = filter:Count()
    if count &gt; 0 then   
        oPlayer:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(2) )
    end
  </RESOLUTION_TIME_ACTION>
  <!-- Pick new target -->
  <RESOLUTION_TIME_ACTION>
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
    filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
    local count = filter:Count()
    if count &gt; 0 then   
        local oPlayer = EffectDC():Get_PlayerPtr(1)
       local oDelayDC = EffectDC():Make_Chest(3)
       -- Note: Target could be stored anyway so this line may have to change
       local oTarget = EffectDC():Get_Targets(2):Get_CardPtr(0)
       oDelayDC:Set_CardPtr(0, oTarget)
       oDelayDC:Set_PlayerPtr(1, oPlayer)
      MTG():CreateDelayedTrigger(1, oDelayDC)
    end
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
Some tests : If i change the trigger order only the first is executed. So if i put first the Zone change trigger it works but the Become tapped don't.
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby RiiakShiNal » 24 Nov 2013, 23:38

Real wrote:So, if I want to incorporate the fateful hour, I will need to have two 'if' clause. This is what I have. I'm pretty sure it's not correct. Can you correct my code?
Your problem is in this block:
Code: Select all
      <RESOLUTION_TIME_ACTION filter_id="1">
    if EffectController():GetLifeTotal() &gt; 5 then
    if FilteredCard() ~= nil then
       FilteredCard():TapAndHold()
    end
    </RESOLUTION_TIME_ACTION>
The problem is that you are missing an end, each if block needs to have a corresponding end statement. So the block should be more like this:
Code: Select all
    <RESOLUTION_TIME_ACTION filter_id="1">
    if EffectController():GetLifeTotal() &gt; 5 then
       if FilteredCard() ~= nil then
          FilteredCard():TapAndHold()
       end
    end
    </RESOLUTION_TIME_ACTION>
It's easier to keep track of where you need an end statement if you block indentions.

NeoAnderson wrote:Thanks a lot my dear friend, do you know what?
I was going in the same direction, i was combining the 2 triggers into 1 with a variable to switch off the controller change, that is the only part who changes.

But i encountered a problem, this is not the first time i found this problem, if i combine these 2 triggers the zone change trigger doesn't work. I don't know why. I try both ZONECHANGE_END with protecting the card pointer and also the ZONECHANGE_BEGIN.
The weird thing is that if i separate the triggers it works!

Any idea of the reasons??
I don't know why, that is odd. Looking at your code though you should probably change the last RESOLUTION_TIME_ACTION block to check for oTarget ~= nil instead of count > 0 since you don't actually need to do a count there.

You could try flipping the TRIGGERs and see if that works, but failing that you'll probably need to make use of MTG():RemoveDelayedTrigger().

So one of these should probably work:
Code: Select all
<TRIGGERED_ABILITY resource_id="1">
  <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD">
    if (TriggerObject() == EffectDC():Get_CardPtr(0)) then
      EffectDC():Int_Set(10, 2)
      return true
    end
    return false
  </TRIGGER>
  <TRIGGER value="BECAME_TAPPED">
    if (TriggerObject() == EffectDC():Get_CardPtr(0)) then
      EffectDC():Int_Set(10, 1)
      return true
    end
    return false
  </TRIGGER>

   <CLEANUP fire_once="1" />

  <RESOLUTION_TIME_ACTION>
    if (EffectDC():Int_Get(10) == 1) then
      -- Change Controller
   TriggerObject():SetBaseController(EffectDC():Get_PlayerPtr(1))
    end
  </RESOLUTION_TIME_ACTION>

<RESOLUTION_TIME_ACTION>
    local oPlayer = EffectDC():Get_PlayerPtr(1)
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
    filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
    local count = filter:Count()
    if count &gt; 0 then   
        oPlayer:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(2) )
    end
  </RESOLUTION_TIME_ACTION>
  <!-- Pick new target -->
  <RESOLUTION_TIME_ACTION>
    -- Note: Target could be stored anyway so this line may have to change
    local oTarget = EffectDC():Get_Targets(2):Get_CardPtr(0)
    if (oTarget ~= nil) then
        local oPlayer = EffectDC():Get_PlayerPtr(1)
       local oDelayDC = EffectDC():Make_Chest(3)
       oDelayDC:Set_CardPtr(0, oTarget)
       oDelayDC:Protect_CardPtr(0)
       oDelayDC:Set_PlayerPtr(1, oPlayer)
      MTG():CreateDelayedTrigger(1, oDelayDC)
    end
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
--Or--
Code: Select all
<TRIGGERED_ABILITY resource_id="1">
  <TRIGGER value="BECAME_TAPPED">
    if (TriggerObject() == EffectDC():Get_CardPtr(0)) then
      EffectDC():Int_Set(10, 1)
      MTG():RemoveDelayedTrigger(2)
      return true
    end
    return false
  </TRIGGER>

   <CLEANUP fire_once="1" />

  <RESOLUTION_TIME_ACTION>
    if (EffectDC():Int_Get(10) == 1) then
      -- Change Controller
   TriggerObject():SetBaseController(EffectDC():Get_PlayerPtr(1))
    end
  </RESOLUTION_TIME_ACTION>

<RESOLUTION_TIME_ACTION>
    local oPlayer = EffectDC():Get_PlayerPtr(1)
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
    filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
    local count = filter:Count()
    if count &gt; 0 then   
        oPlayer:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(2) )
    end
  </RESOLUTION_TIME_ACTION>
  <!-- Pick new target -->
  <RESOLUTION_TIME_ACTION>
    -- Note: Target could be stored anyway so this line may have to change
    local oTarget = EffectDC():Get_Targets(2):Get_CardPtr(0)
    if (oTarget ~= nil) then
        local oPlayer = EffectDC():Get_PlayerPtr(1)
       local oDelayDC = EffectDC():Make_Chest(3)
       oDelayDC:Set_CardPtr(0, oTarget)
       oDelayDC:Protect_CardPtr(0)
       oDelayDC:Set_PlayerPtr(1, oPlayer)
      MTG():CreateDelayedTrigger(1, oDelayDC)
      MTG():CreateDelayedTrigger(2, oDelayDC)
    end
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id="2">
  <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD">
    if (TriggerObject() == EffectDC():Get_CardPtr(0)) then
      EffectDC():Int_Set(10, 2)
      MTG():RemoveDelayedTrigger(1)
      return true
    end
    return false
  </TRIGGER>

   <CLEANUP fire_once="1" />

<RESOLUTION_TIME_ACTION>
    local oPlayer = EffectDC():Get_PlayerPtr(1)
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
    filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
    local count = filter:Count()
    if count &gt; 0 then   
        oPlayer:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(2) )
    end
  </RESOLUTION_TIME_ACTION>
  <!-- Pick new target -->
  <RESOLUTION_TIME_ACTION>
    -- Note: Target could be stored anyway so this line may have to change
    local oTarget = EffectDC():Get_Targets(2):Get_CardPtr(0)
    if (oTarget ~= nil) then
        local oPlayer = EffectDC():Get_PlayerPtr(1)
       local oDelayDC = EffectDC():Make_Chest(3)
       oDelayDC:Set_CardPtr(0, oTarget)
       oDelayDC:Protect_CardPtr(0)
       oDelayDC:Set_PlayerPtr(1, oPlayer)
      MTG():CreateDelayedTrigger(1, oDelayDC)
      MTG():CreateDelayedTrigger(2, oDelayDC)
    end
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby NeoAnderson » 25 Nov 2013, 01:29

RiiakShiNal wrote:I don't know why, that is odd. Looking at your code though you should probably change the last RESOLUTION_TIME_ACTION block to check for oTarget ~= nil instead of count > 0 since you don't actually need to do a count there.
Honestly i didn't remember why i used count > 0 but testing again, and again and again I did remember, if you use oTarget ~= nil the game generate a script log attempt to point a nil value. Using the filter with count avoid this script, because if you check before if there is a possible target probably will be at least a target.

RiiakShiNal wrote:You could try flipping the TRIGGERs and see if that works, but failing that you'll probably need to make use of MTG():RemoveDelayedTrigger().
As I said the post before i have already flipped the order of the triggers, anyway i tried again but only the first is considered. Probably Delayed Trigger check only for the first trigger value.

RiiakShiNal wrote:So one of these should probably work:
First code 1 trigger | Open
Code: Select all
<TRIGGERED_ABILITY resource_id="1">
  <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD">
    if (TriggerObject() == EffectDC():Get_CardPtr(0)) then
      EffectDC():Int_Set(10, 2)
      return true
    end
    return false
  </TRIGGER>
  <TRIGGER value="BECAME_TAPPED">
    if (TriggerObject() == EffectDC():Get_CardPtr(0)) then
      EffectDC():Int_Set(10, 1)
      return true
    end
    return false
  </TRIGGER>

   <CLEANUP fire_once="1" />

  <RESOLUTION_TIME_ACTION>
    if (EffectDC():Int_Get(10) == 1) then
      -- Change Controller
   TriggerObject():SetBaseController(EffectDC():Get_PlayerPtr(1))
    end
  </RESOLUTION_TIME_ACTION>

<RESOLUTION_TIME_ACTION>
    local oPlayer = EffectDC():Get_PlayerPtr(1)
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
    filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
    local count = filter:Count()
    if count &gt; 0 then   
        oPlayer:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(2) )
    end
  </RESOLUTION_TIME_ACTION>
  <!-- Pick new target -->
  <RESOLUTION_TIME_ACTION>
    -- Note: Target could be stored anyway so this line may have to change
    local oTarget = EffectDC():Get_Targets(2):Get_CardPtr(0)
    if (oTarget ~= nil) then
        local oPlayer = EffectDC():Get_PlayerPtr(1)
       local oDelayDC = EffectDC():Make_Chest(3)
       oDelayDC:Set_CardPtr(0, oTarget)
       oDelayDC:Protect_CardPtr(0)
       oDelayDC:Set_PlayerPtr(1, oPlayer)
      MTG():CreateDelayedTrigger(1, oDelayDC)
    end
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
--Or--
Second code 2 triggers with MTG():RemoveDelayedTrigger | Open
Code: Select all
<TRIGGERED_ABILITY resource_id="1">
  <TRIGGER value="BECAME_TAPPED">
    if (TriggerObject() == EffectDC():Get_CardPtr(0)) then
      EffectDC():Int_Set(10, 1)
      MTG():RemoveDelayedTrigger(2)
      return true
    end
    return false
  </TRIGGER>

   <CLEANUP fire_once="1" />

  <RESOLUTION_TIME_ACTION>
    if (EffectDC():Int_Get(10) == 1) then
      -- Change Controller
   TriggerObject():SetBaseController(EffectDC():Get_PlayerPtr(1))
    end
  </RESOLUTION_TIME_ACTION>

<RESOLUTION_TIME_ACTION>
    local oPlayer = EffectDC():Get_PlayerPtr(1)
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
    filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
    local count = filter:Count()
    if count &gt; 0 then   
        oPlayer:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(2) )
    end
  </RESOLUTION_TIME_ACTION>
  <!-- Pick new target -->
  <RESOLUTION_TIME_ACTION>
    -- Note: Target could be stored anyway so this line may have to change
    local oTarget = EffectDC():Get_Targets(2):Get_CardPtr(0)
    if (oTarget ~= nil) then
        local oPlayer = EffectDC():Get_PlayerPtr(1)
       local oDelayDC = EffectDC():Make_Chest(3)
       oDelayDC:Set_CardPtr(0, oTarget)
       oDelayDC:Protect_CardPtr(0)
       oDelayDC:Set_PlayerPtr(1, oPlayer)
      MTG():CreateDelayedTrigger(1, oDelayDC)
      MTG():CreateDelayedTrigger(2, oDelayDC)
    end
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id="2">
  <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD">
    if (TriggerObject() == EffectDC():Get_CardPtr(0)) then
      EffectDC():Int_Set(10, 2)
      MTG():RemoveDelayedTrigger(1)
      return true
    end
    return false
  </TRIGGER>

   <CLEANUP fire_once="1" />

<RESOLUTION_TIME_ACTION>
    local oPlayer = EffectDC():Get_PlayerPtr(1)
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
    filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
    local count = filter:Count()
    if count &gt; 0 then   
        oPlayer:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(2) )
    end
  </RESOLUTION_TIME_ACTION>
  <!-- Pick new target -->
  <RESOLUTION_TIME_ACTION>
    -- Note: Target could be stored anyway so this line may have to change
    local oTarget = EffectDC():Get_Targets(2):Get_CardPtr(0)
    if (oTarget ~= nil) then
        local oPlayer = EffectDC():Get_PlayerPtr(1)
       local oDelayDC = EffectDC():Make_Chest(3)
       oDelayDC:Set_CardPtr(0, oTarget)
       oDelayDC:Protect_CardPtr(0)
       oDelayDC:Set_PlayerPtr(1, oPlayer)
      MTG():CreateDelayedTrigger(1, oDelayDC)
      MTG():CreateDelayedTrigger(2, oDelayDC)
    end
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
The First one just work for the first trigger.
The second one with some adjustment works, but still have some problems.
For Example if an affected creature is tapped and while the delayed trigger is loading if another effect destroy that creature both trigger will be null, and the game also generate a ScriptLog where both trigger have tried to attempt to a nil value.
I am also thinking about what we have discuss before about the grant ability and the fact it will be not affected by LoseAllAbilities, and this is not a normal behaviour because should be assumed it is an ability so it should be lost.
For this reasons i'm think to make a step back to the version without DelayedDC, trying to understand how it works expecially in these particular cases. I know is Ugly coded, but the complexity of Delayed Trigger version is becoming exponentially harder, too many issues to fix. Anyway all your time spent to help me today is priceless, you also teached to me a lot of things that surely will help me to go forward! THANKS MY FRIEND.



UPDATE : I have made a revised version of my card trying to make the code more clean, i am using also LinkedDC, combined with EffectDC it seems to work, but i still have not a test when the other players cast this spell. The AI doesn't understand the card and simply don't uses it. I made a duel with 3 players and i used it at same time on 2 different players and it works.
What do you think of this solution???


Spirit Control (Revised With LinkedDC) | Open
Code: Select all
<SPELL_ABILITY linked_ability_group="1" >
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
      local filter = ClearFilter()
      filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
          </TARGET_DEFINITION>

   <PLAY_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local chest = MTG():DuelDataChest():Make_Chest( 100 )

       local number = MTG():GetNumberOfPlayers()
       if number ~= nil then
         for i=0,(number-1) do
          local player = MTG():GetNthPlayer(i)
          if (player ~= nil) and (player == EffectController()) then
                    chest:Set_PlayerPtr(i, EffectController())
              LinkedDC():Int_Set(10,i)
          end
               
        end
      end
    end
   </PLAY_TIME_ACTION>

   <CONTINUOUS_ACTION layer="6">
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
           local characteristics = target:GetCurrentCharacteristics()
         characteristics:GrantAbility(1)
         characteristics:GrantAbility(2)
      end
    </CONTINUOUS_ACTION>

    <DURATION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
         return (target == nil) or (target:GetOwner() ~= target:GetController())
    </DURATION>
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
</SPELL_ABILITY>


<TRIGGERED_ABILITY resource_id="1" linked_ability_group="1" >
      <TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD" />
 <CLEANUP fire_once="1" />
 <PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(LinkedDC():Int_Get(10))
  if player ~= nil then
        if TriggerObject() ~= nil then
              local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
    EffectDC():Set_Int(10,LinkedDC():Int_Get(10))
        end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      LinkedDC():Int_Set(10,EffectDC():Get_Int(10))
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(1)
   characteristics:GrantAbility(2)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY resource_id="2" linked_ability_group="1" >
      <TRIGGER value="BECAME_TAPPED"  simple_qualifier="self" />
 <CLEANUP fire_once="1" /> 

<PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(LinkedDC():Int_Get(10))
  if player ~= nil then
      if TriggerObject() ~= nil then
         local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
         TriggerObject():Untap()       
         TriggerObject():SetBaseController(player)
    EffectDC():Set_Int(10,LinkedDC():Int_Get(10))
     end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      LinkedDC():Int_Set(10,EffectDC():Get_Int(10))
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(1)
   characteristics:GrantAbility(2)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby RiiakShiNal » 25 Nov 2013, 15:03

NeoAnderson wrote:Honestly i didn't remember why i used count > 0 but testing again, and again and again I did remember, if you use oTarget ~= nil the game generate a script log attempt to point a nil value. Using the filter with count avoid this script, because if you check before if there is a possible target probably will be at least a target.
That can easily be fixed by doing this:
Code: Select all
local oTarget = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
This way it no longer complains if there were no creatures in play to become the new target without having to resort to doing a count.

NeoAnderson wrote:As I said the post before i have already flipped the order of the triggers, anyway i tried again but only the first is considered. Probably Delayed Trigger check only for the first trigger value.
Oh well, at least it was tried.

NeoAnderson wrote:The First one just work for the first trigger.
The second one with some adjustment works, but still have some problems.
For Example if an affected creature is tapped and while the delayed trigger is loading if another effect destroy that creature both trigger will be null, and the game also generate a ScriptLog where both trigger have tried to attempt to a nil value.
Well, that can be changed simply by moving the RemoveDelayedTrigger() call to a just before establishing the new triggers. The nils can be fixed by checking to make sure TriggerObject() is not nil or by using TriggerObjectLKI() to ensure you get the last known information.

NeoAnderson wrote:I am also thinking about what we have discuss before about the grant ability and the fact it will be not affected by LoseAllAbilities, and this is not a normal behaviour because should be assumed it is an ability so it should be lost.
For this reasons i'm think to make a step back to the version without DelayedDC, trying to understand how it works expecially in these particular cases. I know is Ugly coded, but the complexity of Delayed Trigger version is becoming exponentially harder, too many issues to fix. Anyway all your time spent to help me today is priceless, you also teached to me a lot of things that surely will help me to go forward! THANKS MY FRIEND.
Well ultimately, whatever works. Though you could get around the issue with LoseAllAbilities() by using a fake characteristic and checking for that in the Delayed Triggers.

NeoAnderson wrote:UPDATE : I have made a revised version of my card trying to make the code more clean, i am using also LinkedDC, combined with EffectDC it seems to work, but i still have not a test when the other players cast this spell. The AI doesn't understand the card and simply don't uses it. I made a duel with 3 players and i used it at same time on 2 different players and it works.
What do you think of this solution???


Spirit Control (Revised With LinkedDC) | Open
Code: Select all
<SPELL_ABILITY linked_ability_group="1" >
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
      local filter = ClearFilter()
      filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
          </TARGET_DEFINITION>

   <PLAY_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local chest = MTG():DuelDataChest():Make_Chest( 100 )

       local number = MTG():GetNumberOfPlayers()
       if number ~= nil then
         for i=0,(number-1) do
          local player = MTG():GetNthPlayer(i)
          if (player ~= nil) and (player == EffectController()) then
                    chest:Set_PlayerPtr(i, EffectController())
              LinkedDC():Int_Set(10,i)
          end
               
        end
      end
    end
   </PLAY_TIME_ACTION>

   <CONTINUOUS_ACTION layer="6">
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
           local characteristics = target:GetCurrentCharacteristics()
         characteristics:GrantAbility(1)
         characteristics:GrantAbility(2)
      end
    </CONTINUOUS_ACTION>

    <DURATION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
         return (target == nil) or (target:GetOwner() ~= target:GetController())
    </DURATION>
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
</SPELL_ABILITY>


<TRIGGERED_ABILITY resource_id="1" linked_ability_group="1" >
      <TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD" />
 <CLEANUP fire_once="1" />
 <PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(LinkedDC():Int_Get(10))
  if player ~= nil then
        if TriggerObject() ~= nil then
              local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
    EffectDC():Set_Int(10,LinkedDC():Int_Get(10))
        end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      LinkedDC():Int_Set(10,EffectDC():Get_Int(10))
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(1)
   characteristics:GrantAbility(2)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY resource_id="2" linked_ability_group="1" >
      <TRIGGER value="BECAME_TAPPED"  simple_qualifier="self" />
 <CLEANUP fire_once="1" /> 

<PLAY_TIME_ACTION layer="2">
local chest = MTG():DuelDataChest():Get_Chest( 100 )
if chest ~= nil then
  local player = chest:Get_PlayerPtr(LinkedDC():Int_Get(10))
  if player ~= nil then
      if TriggerObject() ~= nil then
         local filter = ClearFilter()
              filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
              filter:Add (FE_CARD_INSTANCE, OP_NOT, TriggerObject() )
              filter:SetZone( ZONE_BATTLEFIELD, TriggerObject():GetOwner() )
              local count = filter:Count()
              if count &gt; 0 then   
                  EffectDC():Set_Int( 88, 2 )
                  player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT", EffectDC():Make_Targets(0) )
              else
                 EffectDC():Set_Int( 88, 1 )
              end
         TriggerObject():Untap()       
         TriggerObject():SetBaseController(player)
    EffectDC():Set_Int(10,LinkedDC():Int_Get(10))
     end
  end
end
</PLAY_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      LinkedDC():Int_Set(10,EffectDC():Get_Int(10))
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(1)
   characteristics:GrantAbility(2)
       end
      end
    </CONTINUOUS_ACTION>

    <DURATION>
      local oActive = EffectDC():Get_Int(88)
      if oActive == 2 then
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
       return (target == nil) or (target:GetOwner() ~= target:GetController())
      end
    </DURATION>
</TRIGGERED_ABILITY>
This one will suffer from problems if someone else casts this spell from your graveyard (there are cards that allow that) as then the information in the LinkedDC() will be overwritten. For example Player A casts the spell on a creature belonging to Player B, Player B then casts the spell from Player A's graveyard on a Creature Player A controls, Player B then attacks, Player B retains control of his creature, but it untaps, Player A taps his creature and Player B gets it.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby Real » 25 Nov 2013, 15:19

Riiak, this is my final code. I added the end statement, however, the card does not recognize the fateful hour statement. The card will tap all the attacking creature(s) regardless if my life total is below 5 or not. Also, how do I add the "fog" animation? The animation you see when you play the card " Fog ".

Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="9">
   <FILENAME text="CLINGING_MISTS_262844" />
   <CARDNAME text="CLINGING_MISTS" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Clinging Mists]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Brumes tenaces]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Nieblas persistentes]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Undurchdringbarer Nebel]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Nebbie Impregnanti]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[しがみつく霧]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[들러붙는 안개]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Липкий Туман]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Brumas Pegajosas]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="262844" />
   <ARTID value="A262844" />
   <ARTIST name="Anthony Francisco" />
   <CASTING_COST cost="{2}{G}" />
   <TYPE metaname="Instant" />
   <EXPANSION value="DPI" />
   <RARITY metaname="C" />
   <SPELL_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Prevent all combat damage that would be dealt this turn.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Prévenez toutes les blessures de combat qui devraient être infligées ce tour-ci.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Prevén todo el daño de combate que se fuera a hacer este turno.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Verhindere allen Kampfschaden, der in diesem Zug zugefügt würde.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Previeni tutto il danno da combattimento che verrebbe inflitto in questo turno.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[このターンに与えられるすべての戦闘ダメージを軽減する。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[이 턴에 입혀지려 하는 모든 전투피해를 방지한다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Предотвратите все боевые повреждения, которые должны быть нанесены в этом ходу.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Previna todo o dano de combate que seria causado neste turno.]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION layer="8">
    local number = MTG():GetNumberOfPlayers()
    for i=0,(number-1) do
       local player = MTG():GetNthPlayer(i)
       if player ~= nil then
          local characteristics = player:GetCurrentCharacteristics()
          characteristics:Bool_Set( PLAYER_CHARACTERISTIC_CANT_TAKE_COMBAT_DAMAGE, 1 )
          characteristics:Bool_Set( PLAYER_CHARACTERISTIC_CREATURES_CANT_TAKE_COMBAT_DAMAGE, 1 )
       end
    end
    </CONTINUOUS_ACTION>
      <DURATION simple_duration="UntilEOT" />
   </SPELL_ABILITY>
   <SPELL_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[|Fateful hour| — If you have 5 or less life, tap all attacking creatures. Those creatures don't untap during their controller's next untap step.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[|Heure fatidique - Si vous avez 5 points de vie ou moins, engagez toutes les créatures attaquantes. Ces créatures ne se dégagent pas pendant la prochaine étape de dégagement de leur contrôleur.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[|Hora fatídica — Si tienes 5 vidas o menos, gira todas las criaturas atacantes. Esas criaturas no se enderezan durante el próximo paso de enderezar de su controlador.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[|Schicksalsstunde -- Falls du 5 Lebenspunkte oder weniger hast, tappe alle angreifenden Kreaturen. Diese Kreaturen enttappen nicht während des nächsten Enttappsegments ihres Beherrschers.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[|Ora fatidica — Se hai 5 o meno punti vita, TAPpa tutte le creature attaccanti. Quelle creature non STAPpano durante il prossimo STAP del loro controllore.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[|窮地 ― あなたのライフが5点以下である場合、すべての攻撃クリーチャーをタップする。それらのクリーチャーは、それらのコントローラーの次のアンタップ・ステップにアンタップしない。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[[운명의 시간 -- 당신의 생명이 5점 이하라면, 모든 공격생물들을 탭한다. 그 생물들은 조종자의 다음 언탭단에 언탭되지 않는다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[|Роковой час — Если количество ваших жизней меньше или равно 5, поверните все атакующие существа. Те существа не разворачиваются во время следующего шага разворота контролирующего их игрока.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[|Hora fatal — Se você tiver 5 ou menos pontos de vida, vire todas as criaturas atacantes. Estas criaturas não são desviradas durante a próxima etapa de desvirar de seus controladores.]]></LOCALISED_TEXT>
      <FILTER filter_id="1">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add( FE_IS_ATTACKING, true )
          </FILTER>
    <RESOLUTION_TIME_ACTION filter_id="1">
    if EffectController():GetLifeTotal() &gt; 5 then
       if FilteredCard() ~= nil then
          FilteredCard():TapAndHold()
       end
    end
    </RESOLUTION_TIME_ACTION>
   </SPELL_ABILITY>
   <AI_AVAILABILITY window_step="declare_blockers" type="window" />
   <AI_AVAILABILITY type="in_response" response_source="1" />
   <AI_BASE_SCORE score="900" zone="ZONE_HAND" />
</CARD_V2>
Real
 
Posts: 19
Joined: 12 Aug 2013, 16:23
Has thanked: 2 times
Been thanked: 0 time

Re: Formal Request Thread

Postby MC Brodie » 25 Nov 2013, 19:57

This is because you have your faithful hour set to go off if your life total >= to 5 :). Change that if statement from "&gt;" to "&lt;". Also, I'm not very familiar with the operator syntax off hand so if verify that "&lt;" is correct and that it's less than or equal to instead of just less than. I'd check the faithful hour card in the vanilla game.


And the code for spell/ability animations is the <SFX text"..."/> line. So just find this line in the code for Fog and apply it in a similar manner.
-----------------------------------------------------------------------
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

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 8 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 8 users online :: 0 registered, 0 hidden and 8 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 8 guests

Login Form