It is currently 10 Nov 2025, 23:28
   
Text Size

Formal Request Thread

Moderator: CCGHQ Admins

Re: Formal Request Thread

Postby Zambooo » 04 Mar 2015, 12:27

RiiakShiNal wrote:This should solve Fork's problems, but I haven't tested it. The code is mostly yours, but with a few important changes:
  • Changed to using EffectDC() instead of LinkedDC().
  • Changed index of copy to 1 instead of 0 to prevent overwriting spell target (shouldn't matter in this case, but good practice).
  • Removed pointer protection as we want to stop applying the color red to the spell when it changes zones (as it ceases to exist once it resolves) which could have been causing the crashes.
  • Just used EffectController() directly instead of assigning to variable first since it is only used once in any given action anyway.
Fork modified ability | Open
Code: Select all
<SPELL_ABILITY>
   <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Copy target instant or sorcery spell, except that the copy is red. You may choose new targets for the copy.]]></LOCALISED_TEXT>
   <TARGET tag="CARD_QUERY_CHOOSE_SPELL_TO_COPY" definition="0" compartment="0" count="1" />
   <TARGET_DEFINITION id="0">
   local filter = ClearFilter()
   filter:SetZone( ZONE_STACK )
   local subfilter = filter:AddSubFilter_Or()
      subfilter:Add (FE_TYPE, OP_IS, CARD_TYPE_INSTANT)
      subfilter:Add (FE_TYPE, OP_IS, CARD_TYPE_SORCERY)
   </TARGET_DEFINITION>
   <RESOLUTION_TIME_ACTION>
   local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
   if target ~= nil then
      local copy = EffectController():CopySpell( target )
      EffectDC():Set_CardPtr(1, copy)
   end
   </RESOLUTION_TIME_ACTION>
   <CONTINUOUS_ACTION layer="5">
   local copy = EffectDC():Get_CardPtr(1)
   if copy ~= nil then
      local characteristics = copy:GetCurrentCharacteristics()
      characteristics:Colour_Set( COLOUR_RED )
   end
   </CONTINUOUS_ACTION>
   <DURATION simple_duration="UntilEOT" />
   <RESOLUTION_TIME_ACTION>
   local copy = EffectDC():Get_CardPtr(1)
   if copy ~= nil then
      EffectController():ChooseNewTargets( copy )
   end
   </RESOLUTION_TIME_ACTION>
   <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY" />
   <AI_MODIFIERS hold_priority="1" />
</SPELL_ABILITY>
I corrected Fork already when you said to me what was wrong and it worked. I've also released it in the CW.
When I was talking about "feeling uncomfortable with Chests" I was referring to my attempt of Mirrorweave :D
User avatar
Zambooo
 
Posts: 242
Joined: 01 Jul 2012, 21:33
Has thanked: 19 times
Been thanked: 17 times

Re: Formal Request Thread

Postby nivmizzet1 » 05 Mar 2015, 07:03

Is there any way to make the AI choose a specific player? e.g. when playing stuffy doll the AI always chooses itself, which is obviously a stupid move, and it would be much better if it always chose it's opponent. I tried searching for other cards that have 'choose a player' but there were very few and none of them had any sort of hint for the AI. I tried setting AI_SIMPLIFIED_TARGETING (as below) but it did nothing -- I'm guessing that's only used for setting targets that are cards and not players.

Code: Select all
   <TRIGGERED_ABILITY linked_ability_group="1" replacement_query="1">
      <TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
      <TARGET tag="CARD_QUERY_CHOOSE_PLAYER" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
         local filter = ClearFilter()
         filter:SetFilterType( FILTER_TYPE_PLAYERS )
      </TARGET_DEFINITION>
      <RESOLUTION_TIME_ACTION>
         local player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
         if player ~= nil then
            LinkedDC():Set_PlayerPtr(0, player)
         end
      </RESOLUTION_TIME_ACTION>
            <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ALLIED_ONLY" />
   </TRIGGERED_ABILITY>
It's not hugely important to sort this out as the AI struggles to use most of my decks, but it would be nice to have it sorted out if possible as it's really the only issue for the AI with this particular deck.
nivmizzet1
 
Posts: 617
Joined: 21 Mar 2013, 10:10
Has thanked: 100 times
Been thanked: 25 times

Re: Formal Request Thread

Postby sweetLu » 05 Mar 2015, 11:06

Wouldn't the simplified targeting be HINT_ENEMY_ONLY instead? I would think that would work.

Anyway if for some reason that doesn't work you could try having 2 choose player trigger abilities: the one you have and one that can only target an opponent. Then use a continuous action to grant Stuffy Doll the appropriate triggered ability (i.e. if controller is AI and at least one opponent does not have hexproof/shroud grant the modified triggered ability).
sweetLu
 
Posts: 181
Joined: 16 Jul 2014, 01:24
Has thanked: 21 times
Been thanked: 22 times

Re: Formal Request Thread

Postby nivmizzet1 » 06 Mar 2015, 01:46

sweetLu wrote:Wouldn't the simplified targeting be HINT_ENEMY_ONLY instead? I would think that would work.

Anyway if for some reason that doesn't work you could try having 2 choose player trigger abilities: the one you have and one that can only target an opponent. Then use a continuous action to grant Stuffy Doll the appropriate triggered ability (i.e. if controller is AI and at least one opponent does not have hexproof/shroud grant the modified triggered ability).
ah jeez, it must've been a long day; yeah, I was meant to dad the enemy only tag. I'll try that and report back.

Yep, it works.
nivmizzet1
 
Posts: 617
Joined: 21 Mar 2013, 10:10
Has thanked: 100 times
Been thanked: 25 times

Re: Formal Request Thread

Postby migookman » 06 Mar 2015, 08:40

I'm having problems getting Frenetic Efreet to phase out when the coin toss in won. If the flip loses, it sacrifices fine but a winning flip does nothing. The code I'm trying is as follows:

Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="FRENETIC_EFREET_3535" />
  <CARDNAME text="FRENETIC_EFREET" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Frenetic Efreet]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Frenetic Efreet]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Frenetic Efreet]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Frenetic Efreet]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Frenetic Efreet]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Frenetic Efreet]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Frenetic Efreet]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Frenetic Efreet]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Frenetic Efreet]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="3535" />
  <ARTID value="3535" />
  <ARTIST name="Thomas Gianni" />
  <CASTING_COST cost="{1}{U}{R}" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Efreet" />
  <EXPANSION value="MI" />
  <RARITY metaname="R" />
  <POWER value="2" />
  <TOUGHNESS value="1" />
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flying]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vol]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Vuela.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fliegend]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Volare]]></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[Voar]]></LOCALISED_TEXT>
    <INTRINSIC characteristic="CHARACTERISTIC_FLYING" />
  </STATIC_ABILITY>
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{0}: Flip a coin. If you win the flip, Frenetic Efreet phases out. If you lose the flip, sacrifice Frenetic Efreet.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{0}: Flip a coin. If you win the flip, Frenetic Efreet phases out. If you lose the flip, sacrifice Frenetic Efreet.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{0}: Flip a coin. If you win the flip, Frenetic Efreet phases out. If you lose the flip, sacrifice Frenetic Efreet.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{0}: Flip a coin. If you win the flip, Frenetic Efreet phases out. If you lose the flip, sacrifice Frenetic Efreet.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{0}: Lancia una moneta. Se vinci il lancio, l’Efreet Frenetico scompare. Se perdi il lancio, sacrifica l’Efreet Frenetico.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{0}: Flip a coin. If you win the flip, Frenetic Efreet phases out. If you lose the flip, sacrifice Frenetic Efreet.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{0}: Flip a coin. If you win the flip, Frenetic Efreet phases out. If you lose the flip, sacrifice Frenetic Efreet.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{0}: Flip a coin. If you win the flip, Frenetic Efreet phases out. If you lose the flip, sacrifice Frenetic Efreet.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{0}: Flip a coin. If you win the flip, Frenetic Efreet phases out. If you lose the flip, sacrifice Frenetic Efreet.]]></LOCALISED_TEXT>
    <COST mana_cost="{0}" type="Mana" />
    <RESOLUTION_TIME_ACTION>
    EffectController():FlipCoin()
    </RESOLUTION_TIME_ACTION>
        <RESOLUTION_TIME_ACTION>
       if EffectSource() ~= nil and EffectController():GetFlipResult() == COIN_FLIP_LOSE then
          EffectController():Sacrifice(EffectSource())
   end
    </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
     if EffectSource() ~= nil and EffectController():GetFlipResult() == COIN_FLIP_WIN then
     EffectSource():EffectDC():Set_Int(10,1)
           end
    </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
      EffectDC():Set_Int(10,0)
        end
    </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
      if EffectDC():Get_Int(10) == 1 then
       local oTarget = Object()
       if (oTarget ~= nil) then
         if RSN_Characteristics_GetInt( oTarget, NEO_PHASEOUT_SHIELD ) ~= 1 then
         RSN_Characteristics_Set( oTarget, NEO_PHASING_ABILITY, 1 )
            end
       end
      end
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
      if EffectDC():Get_Int(10) == 1 then
       local oTarget = Object()
       if (oTarget ~= nil) then
            RSN_Characteristics_Set( oTarget, NEO_PHASEOUT_TRIGGER, 1 )
             local filter = ClearFilter()
             filter:SetZone( ZONE_BATTLEFIELD )
             filter:Add( FE_PARENT_CARD, OP_IS, oTarget )
             local subfilter = filter:AddSubFilter_Or()
             subfilter:Add( FE_SUBTYPE, OP_IS, ENCHANTMENT_TYPE_AURA )
             subfilter:Add( FE_SUBTYPE, OP_IS, ARTIFACT_TYPE_EQUIPMENT )
             local filter_count = filter:EvaluateObjects()
             if filter_count &gt; 0 then
             if EffectSource() ~= nil and EffectController():GetFlipResult() == COIN_FLIP_WIN then
                for i=1,filter_count do
                    local cardA = filter:GetNthEvaluatedObject(i-1)
                    if cardA ~= nil then
                       RSN_Characteristics_Set( cardA, NEO_PHASEOUT_TRIGGER, 1 )
                    end
                end
             end
          end
       end
      end
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         if EffectDC():Get_Int(10) == 1 then
         MTG():ReevaluateContinuousEffects()
         end
   </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         MTG():ReevaluateContinuousEffects()
   </RESOLUTION_TIME_ACTION>
   </ACTIVATED_ABILITY>
   <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY">
      <TRIGGER value="BEGINNING_OF_STEP">
         if ((MTG():GetStep() == STEP_UPKEEP) and (MTG():GetTurnNumber() == 0)) then
           local chest = EffectController():PlayerDataChest():Get_Chest(NEO_CHEST_PHS)
             if chest ~= nil then
                return false
             else
                local chest = EffectController():PlayerDataChest():Make_Chest(NEO_CHEST_PHS)
                return true
             end
         end
      </TRIGGER>
      <RESOLUTION_TIME_ACTION>
         RSN_Characteristics_CreateManagers("_MANAGER_PHASING")
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
   <HELP title="MORE_INFO_TITLE_PHASING" body="MORE_INFO_BODY_PHASING" zone="ZONE_ANY" />
   <HELP title="MORE_INFO_BADGE_TITLE_10" body="MORE_INFO_BADGE_BODY_10" zone="ZONE_ANY" />
  <SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
  <TOKEN_REGISTRATION reservation="1" type="_MANAGER_PHASING" />
</CARD_V2>
User avatar
migookman
 
Posts: 135
Joined: 05 Aug 2014, 06:37
Has thanked: 22 times
Been thanked: 28 times

Re: Formal Request Thread

Postby RiiakShiNal » 06 Mar 2015, 11:57

Well, when you win the flip you are attempt to set a local index (10) to 1 (except EffectDC() can't be used as a function of EffectSource() so the ability errors and stops processing) then immediately afterwards you set it to 0 (if it were actually processing at this point).

Even then you should combine the flip checking into a single action like this:
Code: Select all
    <RESOLUTION_TIME_ACTION>
       if EffectSource() ~= nil and EffectController():GetFlipResult() == COIN_FLIP_LOSE then
          EffectController():Sacrifice(EffectSource())
       else
          EffectDC():Set_Int(10,1)
       end
    </RESOLUTION_TIME_ACTION>
I'm not familiar with the phasing code so I don't know if you are doing that right or not.
RiiakShiNal
Programmer
 
Posts: 2189
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby Zambooo » 06 Mar 2015, 23:51

to nivmizzet1

Mirrorweave tested | Open
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="MIRRORWEAVE_CW_153973" />
  <CARDNAME text="MIRRORWEAVE" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Mirrorweave]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Tisse-miroir]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Tejido especular]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Spiegelgewebe]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Trama a Specchio]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[鏡編み]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Mirrorweave]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Зеркальный Узор]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Espelho Prolífero]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="153973" />
  <ARTID value="CW153973" />
  <ARTIST name="Jim Pavelec" />
  <CASTING_COST cost="{2}{W/U}{W/U}" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“Those who are different are untrustworthy, unpredictable. Put your safety in the hands of your own kind.”
—Bowen, Barrenton guardcaptain]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Ceux qui sont différents sont imprévisibles et traîtres. Place ta sécurité entre les mains de tes congénères. »
—Bowen, capitaine de la garde de Barrenton]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“Aquellos que son distintos no son confiables, son impredecibles. Pon tu seguridad en manos de tu propia gente.”
—Bowen, capitán de la guardia de Bárrenton]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Diejenigen, die nicht sind wie wir, sind unzuverlässig und unberechenbar. Lege deine Sicherheit in die Hände deines eigenen Volkes.”
—Bowen, Kapitän der Wache von Barrenton]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Coloro che sono differenti non meritano fiducia, sono imprevedibili. Affida la tua sicurezza a quelli della tua stirpe.”
—Bowen, capitano delle guardie di Barrenton]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[「違ってる奴は、信頼もできないし、予想もできない。 安全ってものは自分の仲間の手の中にしまっとくもんだ。」
――バレントンの護衛長、ボウエン]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“Those who are different are untrustworthy, unpredictable. Put your safety in the hands of your own kind.”
—Bowen, Barrenton guardcaptain]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[«Те, кто не похожи на нас, непредсказуемы и не заслуживают доверия. Вверяй свою безопасность только в руки своих соплеменников».
— Боуэн, командир стражников Баррентона]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“Aqueles que são diferentes são traiçoeiros e imprevisíveis. Coloque sua segurança nas mãos do seu próprio povo.”
— Bowen, capitão da guarda de Barrenton]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Instant" />
  <EXPANSION value="SHM" />
  <RARITY metaname="R" />
 
  <SPELL_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Each other creature becomes a copy of target nonlegendary creature until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Chaque autre créature devient une copie de la créature non-légendaire ciblée jusqu’à la fin du tour.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cada otra criatura es una copia de la criatura objetivo que no sea legendaria hasta el final del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Alle anderen Kreaturen werden bis zum Ende des Zuges zu einer Kopie einer nichtlegendären Kreatur deiner Wahl.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogni altra creatura diventa una copia di una creatura non leggendaria bersaglio fino alla fine del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[伝説でないクリーチャー1体を対象とする。ターン終了時まで、他の各クリーチャーはそれのコピーになる。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Each other creature becomes a copy of target nonlegendary creature until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждое другое существо становится копией целевого нелегендарного существа до конца хода.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Cada outra criatura se torna uma cópia da criatura alvo que não seja lendária até o final do turno.]]></LOCALISED_TEXT>
   <SFX text="GLOBAL_DISTORTION_PLAY" />
   <TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_CLONE" definition="0" compartment="0" count="1" />
   
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
    filter:Add( FE_SUPERTYPE, OP_NOT, SUPERTYPE_LEGENDARY )
    </TARGET_DEFINITION>
   
   <RESOLUTION_TIME_ACTION>
   local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target_creature ~= nil then
      local filter = ClearFilter()
      filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
      filter:Add( FE_CARD_INSTANCE, OP_NOT, target_creature )
      local total = filter:Count()
      
      local delayDC = EffectDC():Make_Chest(2)
      delayDC:Set_Int(0, 0)      --count_so_far

      target_creature:StoreCopiableValues( EffectDC():Make_Chest(3) )      --Creature to copy values
   end
    </RESOLUTION_TIME_ACTION>
   
   <FILTER filter_id="1">
    local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if ( target_creature ~= nil ) then
       local filter = ClearFilter()
       filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
       filter:Add( FE_CARD_INSTANCE, OP_NOT, target_creature )
    end
    </FILTER>
   
   <RESOLUTION_TIME_ACTION filter_id="1">
   local delayDC = EffectDC():Get_Chest(2)
   
   local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target_creature ~= nil then
      if FilteredCard() ~= nil then
         local count_so_far = delayDC:Get_Int(0)      --0
         local next_count = count_so_far + 1         --1
         delayDC:Set_Int(0, next_count)
      end
   end
   </RESOLUTION_TIME_ACTION>
   <RESOLUTION_TIME_ACTION>
   local delayDC = EffectDC():Get_Chest(2)
   local count_so_far = delayDC:Get_Int(0)
   
   local chest_index = 2 * count_so_far
   delayDC:Set_Int(chest_index, chest_index)      --index for Chest
   
   local index_ptr = 4 * count_so_far
   delayDC:Set_Int(index_ptr, index_ptr)      --index for Ptr
   </RESOLUTION_TIME_ACTION>
   
   <RESOLUTION_TIME_ACTION filter_id="1">
    local delayDC = EffectDC():Get_Chest(2)
   local count_so_far = delayDC:Get_Int(0)
   local chest_index = 2 * count_so_far
   
   local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target_creature ~= nil then
      if FilteredCard() ~= nil then
      
         local chest_so_far = delayDC:Get_Int(chest_index)
         local next_chest = chest_so_far + 1
         
         FilteredCard():StoreCopiableValues( delayDC:Make_Chest(next_chest) )      --Copying creature values
         FilteredCard():UseCopiableValues( delayDC:Get_Chest(0) )
         
         delayDC:Set_Int(chest_index, next_chest)
      end
   end
    </RESOLUTION_TIME_ACTION>
   
   <RESOLUTION_TIME_ACTION filter_id="1">
    local delayDC = EffectDC():Get_Chest(2)
   local count_so_far = delayDC:Get_Int(0)
   local index_ptr = 4 * count_so_far
   
   local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target_creature ~= nil then
      if FilteredCard() ~= nil then
         local ptr_so_far = delayDC:Get_Int(index_ptr)
         local next_ptr = ptr_so_far + 1
         delayDC:Set_CardPtr( next_ptr, FilteredCard() )   --1
         delayDC:Set_Int(index_ptr, next_ptr)
      end
   end
    </RESOLUTION_TIME_ACTION>
   
   <RESOLUTION_TIME_ACTION>                        --Creating the DelayedTrigger
    local delayDC = EffectDC():Get_Chest(2)
    if ( delayDC:Get_Int(0) &gt; 0 ) then
      MTG():CreateDelayedTrigger(3, delayDC)            --DelayedTrigger ID
   end
    </RESOLUTION_TIME_ACTION>
   
   <CONTINUOUS_ACTION layer="1" filter_id="1">
   local delayDC = EffectDC():Get_Chest(2)
   if ( delayDC:Get_Int(0) &gt; 0 ) then
      if FilteredCard() ~= nil then
         if EffectDC():Get_Chest(3) ~= nil then
            FilteredCard():UseCopiableValues( EffectDC():Get_Chest(3) )
         end
      end
   end
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />   
    <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_NEUTRAL" />
  </SPELL_ABILITY>
 
  <TRIGGERED_ABILITY resource_id="3" replacement_effect="1">
   <CLEANUP fire_once="1" />
   <TRIGGER value="BEGINNING_OF_STEP">
      return MTG():GetStep() == STEP_CLEANUP
   </TRIGGER>
   <CONTINUOUS_ACTION layer="1">
    local count_so_far = EffectDC():Get_Int(0)
   
    if count_so_far &gt; 0 then
      for i = 1,(count_so_far) do
         
         local chest_count = 2 * count_so_far
         local ptr_count = 4 * count_so_far
         
         local target = EffectDC():Get_CardPtr( ptr_count + i )
         if target ~= nil then
            local chest_position = chest_count + i
            if EffectDC():Get_Chest(chest_position) ~= nil then
               target:UseCopiableValues( EffectDC():Get_Chest(chest_position) )
            end
         end
      end
    end
    </CONTINUOUS_ACTION>
   <DURATION>
      return false
   </DURATION>
  </TRIGGERED_ABILITY>
 
     <AUTHOR><![CDATA[Zambooo]]></AUTHOR>
   <EDITORS><![CDATA[Zambooo]]></EDITORS>
   <DATE><![CDATA[06-03-15]]></DATE>
</CARD_V2>
this time it works :D

PS: this was really hard to me FYI :P , but also taught me really useful stuff I didn't know before

Part2
I also got this
Code: Select all
[lua] [string "CHAOS_WARP_359681_TITLE (RESOLUTION_TIME_ACTION)~0x000007ed"]:3: attempt to index local 'player' (a nil value)
from Chaos Warp. The card, that is "official" looks quite ok to me though..
Chaos Warp | Open
Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="8">
  <FILENAME text="CHAOS_WARP_359681" />
  <CARDNAME text="CHAOS_WARP" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Chaos Warp]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Distorsion chaotique]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Distorsión caótica]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Chaosschleife]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Distorsione Caotica]]></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[Distorção Caótica]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="359681" />
  <ARTID value="137533" />
  <ARTIST name="Trevor Claxton" />
  <CASTING_COST cost="{2}{R}" />
  <TYPE metaname="Instant" />
  <EXPANSION value="DPI" />
  <RARITY metaname="R" />
  <SPELL_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[The owner of target permanent shuffles it into his or her library, then reveals the top card of his or her library. If it’s a permanent card, he or she puts it onto the battlefield.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Le propriétaire du permanent ciblé le mélange à sa bibliothèque et révèle ensuite la carte du dessus de sa bibliothèque. Si c'est une carte de permanent, il la met sur le champ de bataille.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El propietario del permanente objetivo lo baraja en su biblioteca y luego muestra la primera carta de su biblioteca. Si es una carta de permanente, la pone en el campo de batalla.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Der Besitzer einer bleibenden Karte deiner Wahl mischt diese in seine Bibliothek und zeigt dann die oberste Karte seiner Bibliothek offen vor. Falls es eine bleibende Karte ist, bringt er sie ins Spiel.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Il proprietario di un permanente bersaglio lo rimescola nel suo grimorio, poi rivela la prima carta del suo grimorio. Se è una carta permanente, la mette sul campo di battaglia.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[パーマネント1つを対象とする。それのオーナーはそれを自分のライブラリーに加えて切り直し、その後自分のライブラリーの一番上のカードを公開する。それがパーマネント・カードである場合、そのプレイヤーはそれを戦場に出す。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[지속물 한 개를 목표로 정한다. 그 지속물의 소유자는 그 지속물을 자신의 서고에 섞어 넣은 후 자신의 서고 맨 위의 카드를 공개한다. 그 카드가 지속물 카드라면, 그 지속물의 소유자는 그 카드를 전장에 놓는다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Владелец целевого перманента втасовывает его в свою библиотеку, затем показывает верхнюю карту своей библиотеки. Если это карта перманента, тот игрок кладет ее на поле битвы.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[O dono da permanente alvo a embaralha no próprio grimório e depois revela o card do topo do próprio grimório. Se for um card de permanente, ele o coloca no campo de batalha.]]></LOCALISED_TEXT>
    <SFX text="TARGET_SPARKS_PLAY" />
    <TARGET tag="CARD_QUERY_CHOOSE_PERMANENT_TO_SHUFFLE" definition="0" compartment="0" count="1" />
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:Add( FE_IS_PERMANENT, true )
    </TARGET_DEFINITION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if  target ~= nil then
       EffectDC():Set_PlayerPtr(1, target:GetOwner() )
       target:PutOnTopOfLibrary()
    end 
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target_player = EffectDC():Get_PlayerPtr(1)
    if target_player ~= nil then
       target_player:ShuffleLibrary()
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local player  = EffectDC():Get_PlayerPtr(1)
    local card = player:Library_GetTop()
    if card ~= nil then
       card:Reveal()
       local cardtype = card:GetCardType()
       if cardtype:IsPermanent() == true then
          card:PutOntoBattlefield( player )
       end
    end
    </RESOLUTION_TIME_ACTION>
    <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY" />
  </SPELL_ABILITY>
  <AI_AVAILABILITY window_step="begin_combat" window_turn="their_turn" type="window" />
  <AI_AVAILABILITY window_step="declare_attackers" window_turn="their_turn" type="window" />
  <AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
  <AI_AVAILABILITY window_step="declare_blockers" type="window" />
  <AI_AVAILABILITY window_step="end_of_turn" type="window" />
  <AI_AVAILABILITY type="in_response" response_source="1" response_target="1" />
  <AI_AVAILABILITY type="in_response" response_source="1" />
  <AI_BASE_SCORE score="900" zone="ZONE_HAND" />
</CARD_V2>
Any thoughts?
User avatar
Zambooo
 
Posts: 242
Joined: 01 Jul 2012, 21:33
Has thanked: 19 times
Been thanked: 17 times

Re: Formal Request Thread

Postby nivmizzet1 » 07 Mar 2015, 02:04

Zambooo wrote:to nivmizzet1

Mirrorweave tested | Open
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="MIRRORWEAVE_CW_153973" />
  <CARDNAME text="MIRRORWEAVE" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Mirrorweave]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Tisse-miroir]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Tejido especular]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Spiegelgewebe]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Trama a Specchio]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[鏡編み]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Mirrorweave]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Зеркальный Узор]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Espelho Prolífero]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="153973" />
  <ARTID value="CW153973" />
  <ARTIST name="Jim Pavelec" />
  <CASTING_COST cost="{2}{W/U}{W/U}" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“Those who are different are untrustworthy, unpredictable. Put your safety in the hands of your own kind.”
—Bowen, Barrenton guardcaptain]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Ceux qui sont différents sont imprévisibles et traîtres. Place ta sécurité entre les mains de tes congénères. »
—Bowen, capitaine de la garde de Barrenton]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“Aquellos que son distintos no son confiables, son impredecibles. Pon tu seguridad en manos de tu propia gente.”
—Bowen, capitán de la guardia de Bárrenton]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Diejenigen, die nicht sind wie wir, sind unzuverlässig und unberechenbar. Lege deine Sicherheit in die Hände deines eigenen Volkes.”
—Bowen, Kapitän der Wache von Barrenton]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Coloro che sono differenti non meritano fiducia, sono imprevedibili. Affida la tua sicurezza a quelli della tua stirpe.”
—Bowen, capitano delle guardie di Barrenton]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[「違ってる奴は、信頼もできないし、予想もできない。 安全ってものは自分の仲間の手の中にしまっとくもんだ。」
――バレントンの護衛長、ボウエン]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“Those who are different are untrustworthy, unpredictable. Put your safety in the hands of your own kind.”
—Bowen, Barrenton guardcaptain]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[«Те, кто не похожи на нас, непредсказуемы и не заслуживают доверия. Вверяй свою безопасность только в руки своих соплеменников».
— Боуэн, командир стражников Баррентона]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“Aqueles que são diferentes são traiçoeiros e imprevisíveis. Coloque sua segurança nas mãos do seu próprio povo.”
— Bowen, capitão da guarda de Barrenton]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Instant" />
  <EXPANSION value="SHM" />
  <RARITY metaname="R" />
 
  <SPELL_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Each other creature becomes a copy of target nonlegendary creature until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Chaque autre créature devient une copie de la créature non-légendaire ciblée jusqu’à la fin du tour.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cada otra criatura es una copia de la criatura objetivo que no sea legendaria hasta el final del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Alle anderen Kreaturen werden bis zum Ende des Zuges zu einer Kopie einer nichtlegendären Kreatur deiner Wahl.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogni altra creatura diventa una copia di una creatura non leggendaria bersaglio fino alla fine del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[伝説でないクリーチャー1体を対象とする。ターン終了時まで、他の各クリーチャーはそれのコピーになる。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Each other creature becomes a copy of target nonlegendary creature until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждое другое существо становится копией целевого нелегендарного существа до конца хода.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Cada outra criatura se torna uma cópia da criatura alvo que não seja lendária até o final do turno.]]></LOCALISED_TEXT>
   <SFX text="GLOBAL_DISTORTION_PLAY" />
   <TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_CLONE" definition="0" compartment="0" count="1" />
   
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
    filter:Add( FE_SUPERTYPE, OP_NOT, SUPERTYPE_LEGENDARY )
    </TARGET_DEFINITION>
   
   <RESOLUTION_TIME_ACTION>
   local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target_creature ~= nil then
      local filter = ClearFilter()
      filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
      filter:Add( FE_CARD_INSTANCE, OP_NOT, target_creature )
      local total = filter:Count()
      
      local delayDC = EffectDC():Make_Chest(2)
      delayDC:Set_Int(0, 0)      --count_so_far

      target_creature:StoreCopiableValues( EffectDC():Make_Chest(3) )      --Creature to copy values
   end
    </RESOLUTION_TIME_ACTION>
   
   <FILTER filter_id="1">
    local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if ( target_creature ~= nil ) then
       local filter = ClearFilter()
       filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
       filter:Add( FE_CARD_INSTANCE, OP_NOT, target_creature )
    end
    </FILTER>
   
   <RESOLUTION_TIME_ACTION filter_id="1">
   local delayDC = EffectDC():Get_Chest(2)
   
   local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target_creature ~= nil then
      if FilteredCard() ~= nil then
         local count_so_far = delayDC:Get_Int(0)      --0
         local next_count = count_so_far + 1         --1
         delayDC:Set_Int(0, next_count)
      end
   end
   </RESOLUTION_TIME_ACTION>
   <RESOLUTION_TIME_ACTION>
   local delayDC = EffectDC():Get_Chest(2)
   local count_so_far = delayDC:Get_Int(0)
   
   local chest_index = 2 * count_so_far
   delayDC:Set_Int(chest_index, chest_index)      --index for Chest
   
   local index_ptr = 4 * count_so_far
   delayDC:Set_Int(index_ptr, index_ptr)      --index for Ptr
   </RESOLUTION_TIME_ACTION>
   
   <RESOLUTION_TIME_ACTION filter_id="1">
    local delayDC = EffectDC():Get_Chest(2)
   local count_so_far = delayDC:Get_Int(0)
   local chest_index = 2 * count_so_far
   
   local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target_creature ~= nil then
      if FilteredCard() ~= nil then
      
         local chest_so_far = delayDC:Get_Int(chest_index)
         local next_chest = chest_so_far + 1
         
         FilteredCard():StoreCopiableValues( delayDC:Make_Chest(next_chest) )      --Copying creature values
         FilteredCard():UseCopiableValues( delayDC:Get_Chest(0) )
         
         delayDC:Set_Int(chest_index, next_chest)
      end
   end
    </RESOLUTION_TIME_ACTION>
   
   <RESOLUTION_TIME_ACTION filter_id="1">
    local delayDC = EffectDC():Get_Chest(2)
   local count_so_far = delayDC:Get_Int(0)
   local index_ptr = 4 * count_so_far
   
   local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target_creature ~= nil then
      if FilteredCard() ~= nil then
         local ptr_so_far = delayDC:Get_Int(index_ptr)
         local next_ptr = ptr_so_far + 1
         delayDC:Set_CardPtr( next_ptr, FilteredCard() )   --1
         delayDC:Set_Int(index_ptr, next_ptr)
      end
   end
    </RESOLUTION_TIME_ACTION>
   
   <RESOLUTION_TIME_ACTION>                        --Creating the DelayedTrigger
    local delayDC = EffectDC():Get_Chest(2)
    if ( delayDC:Get_Int(0) &gt; 0 ) then
      MTG():CreateDelayedTrigger(3, delayDC)            --DelayedTrigger ID
   end
    </RESOLUTION_TIME_ACTION>
   
   <CONTINUOUS_ACTION layer="1" filter_id="1">
   local delayDC = EffectDC():Get_Chest(2)
   if ( delayDC:Get_Int(0) &gt; 0 ) then
      if FilteredCard() ~= nil then
         if EffectDC():Get_Chest(3) ~= nil then
            FilteredCard():UseCopiableValues( EffectDC():Get_Chest(3) )
         end
      end
   end
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />   
    <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_NEUTRAL" />
  </SPELL_ABILITY>
 
  <TRIGGERED_ABILITY resource_id="3" replacement_effect="1">
   <CLEANUP fire_once="1" />
   <TRIGGER value="BEGINNING_OF_STEP">
      return MTG():GetStep() == STEP_CLEANUP
   </TRIGGER>
   <CONTINUOUS_ACTION layer="1">
    local count_so_far = EffectDC():Get_Int(0)
   
    if count_so_far &gt; 0 then
      for i = 1,(count_so_far) do
         
         local chest_count = 2 * count_so_far
         local ptr_count = 4 * count_so_far
         
         local target = EffectDC():Get_CardPtr( ptr_count + i )
         if target ~= nil then
            local chest_position = chest_count + i
            if EffectDC():Get_Chest(chest_position) ~= nil then
               target:UseCopiableValues( EffectDC():Get_Chest(chest_position) )
            end
         end
      end
    end
    </CONTINUOUS_ACTION>
   <DURATION>
      return false
   </DURATION>
  </TRIGGERED_ABILITY>
 
     <AUTHOR><![CDATA[Zambooo]]></AUTHOR>
   <EDITORS><![CDATA[Zambooo]]></EDITORS>
   <DATE><![CDATA[06-03-15]]></DATE>
</CARD_V2>
this time it works :D

PS: this was really hard to me FYI :P , but also taught me really useful stuff I didn't know before
wow, thanks zamboo. that's awesome (haven't tested it yet, but i'll take you on your word that it works).
nivmizzet1
 
Posts: 617
Joined: 21 Mar 2013, 10:10
Has thanked: 100 times
Been thanked: 25 times

Re: Formal Request Thread

Postby nivmizzet1 » 07 Mar 2015, 02:16

Zambooo wrote:Part2
I also got this
Code: Select all
[lua] [string "CHAOS_WARP_359681_TITLE (RESOLUTION_TIME_ACTION)~0x000007ed"]:3: attempt to index local 'player' (a nil value)
from Chaos Warp. The card, that is "official" looks quite ok to me though..
Chaos Warp | Open
Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="8">
  <FILENAME text="CHAOS_WARP_359681" />
  <CARDNAME text="CHAOS_WARP" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Chaos Warp]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Distorsion chaotique]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Distorsión caótica]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Chaosschleife]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Distorsione Caotica]]></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[Distorção Caótica]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="359681" />
  <ARTID value="137533" />
  <ARTIST name="Trevor Claxton" />
  <CASTING_COST cost="{2}{R}" />
  <TYPE metaname="Instant" />
  <EXPANSION value="DPI" />
  <RARITY metaname="R" />
  <SPELL_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[The owner of target permanent shuffles it into his or her library, then reveals the top card of his or her library. If it’s a permanent card, he or she puts it onto the battlefield.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Le propriétaire du permanent ciblé le mélange à sa bibliothèque et révèle ensuite la carte du dessus de sa bibliothèque. Si c'est une carte de permanent, il la met sur le champ de bataille.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El propietario del permanente objetivo lo baraja en su biblioteca y luego muestra la primera carta de su biblioteca. Si es una carta de permanente, la pone en el campo de batalla.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Der Besitzer einer bleibenden Karte deiner Wahl mischt diese in seine Bibliothek und zeigt dann die oberste Karte seiner Bibliothek offen vor. Falls es eine bleibende Karte ist, bringt er sie ins Spiel.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Il proprietario di un permanente bersaglio lo rimescola nel suo grimorio, poi rivela la prima carta del suo grimorio. Se è una carta permanente, la mette sul campo di battaglia.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[パーマネント1つを対象とする。それのオーナーはそれを自分のライブラリーに加えて切り直し、その後自分のライブラリーの一番上のカードを公開する。それがパーマネント・カードである場合、そのプレイヤーはそれを戦場に出す。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[지속물 한 개를 목표로 정한다. 그 지속물의 소유자는 그 지속물을 자신의 서고에 섞어 넣은 후 자신의 서고 맨 위의 카드를 공개한다. 그 카드가 지속물 카드라면, 그 지속물의 소유자는 그 카드를 전장에 놓는다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Владелец целевого перманента втасовывает его в свою библиотеку, затем показывает верхнюю карту своей библиотеки. Если это карта перманента, тот игрок кладет ее на поле битвы.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[O dono da permanente alvo a embaralha no próprio grimório e depois revela o card do topo do próprio grimório. Se for um card de permanente, ele o coloca no campo de batalha.]]></LOCALISED_TEXT>
    <SFX text="TARGET_SPARKS_PLAY" />
    <TARGET tag="CARD_QUERY_CHOOSE_PERMANENT_TO_SHUFFLE" definition="0" compartment="0" count="1" />
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:Add( FE_IS_PERMANENT, true )
    </TARGET_DEFINITION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if  target ~= nil then
       EffectDC():Set_PlayerPtr(1, target:GetOwner() )
       target:PutOnTopOfLibrary()
    end 
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target_player = EffectDC():Get_PlayerPtr(1)
    if target_player ~= nil then
       target_player:ShuffleLibrary()
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local player  = EffectDC():Get_PlayerPtr(1)
    local card = player:Library_GetTop()
    if card ~= nil then
       card:Reveal()
       local cardtype = card:GetCardType()
       if cardtype:IsPermanent() == true then
          card:PutOntoBattlefield( player )
       end
    end
    </RESOLUTION_TIME_ACTION>
    <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY" />
  </SPELL_ABILITY>
  <AI_AVAILABILITY window_step="begin_combat" window_turn="their_turn" type="window" />
  <AI_AVAILABILITY window_step="declare_attackers" window_turn="their_turn" type="window" />
  <AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
  <AI_AVAILABILITY window_step="declare_blockers" type="window" />
  <AI_AVAILABILITY window_step="end_of_turn" type="window" />
  <AI_AVAILABILITY type="in_response" response_source="1" response_target="1" />
  <AI_AVAILABILITY type="in_response" response_source="1" />
  <AI_BASE_SCORE score="900" zone="ZONE_HAND" />
</CARD_V2>
Any thoughts?
I have another version of chaos warp -- I'm not sure who coded it or what mod it's from, but maybe give it a go instead. I can't tell you specifically what might be the problem with the code you posted, but maybe you can work it out by comparison to this code, if this code is alright.

Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="CHAOS_WARP_281236" />
  <CARDNAME text="CHAOS_WARP" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Chaos Warp]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Distorsion chaotique]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Distorsión caótica]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Chaosschleife]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Distorsione Caotica]]></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[Distorção Caótica]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="281236" />
  <ARTID value="137533" />
  <ARTIST name="Trevor Claxton" />
  <CASTING_COST cost="{2}{R}" />
  <TYPE metaname="Instant" />
  <EXPANSION value="DPG" />
  <RARITY metaname="R" />
  <SPELL_ABILITY dangerous="1" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[The owner of target permanent shuffles it into his or her library, then reveals the top card of his or her library. If it’s a permanent card, he or she puts it onto the battlefield.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Le propriétaire du permanent ciblé le mélange à sa bibliothèque et révèle ensuite la carte du dessus de sa bibliothèque. Si c’est une carte de permanent, il la met sur le champ de bataille.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El propietario del permanente objetivo lo baraja en su biblioteca y luego muestra la primera carta de su biblioteca. Si es una carta de permanente, la pone en el campo de batalla.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Der Besitzer einer bleibenden Karte deiner Wahl mischt diese in seine Bibliothek und zeigt dann die oberste Karte seiner Bibliothek offen vor. Falls es eine bleibende Karte ist, bringt er sie ins Spiel.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Il proprietario di un permanente bersaglio lo rimescola nel suo grimorio, poi rivela la prima carta del suo grimorio. Se è una carta permanente, la mette sul campo di battaglia.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[パーマネント1つを対象とする。それのオーナーはそれを自分のライブラリーに加えて切り直し、その後自分のライブラリーの一番上のカードを公開する。 それがパーマネント・カードである場合、そのプレイヤーはそれを戦場に出す。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[지속물 한 개를 목표로 정한다. 그 지속물의 소유자는 그 지속물을 자신의 서고에 섞어 넣은 후 자신의 서고 맨 위의 카드를 공개한다. 그 카드가 지속물 카드라면, 그 지속물의 소유자는 그 카드를 전장에 놓는다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Владелец целевого перманента втасовывает его в свою библиотеку, затем показывает верхнюю карту своей библиотеки. Если это карта перманента, тот игрок кладет ее на поле битвы.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[O dono da permanente alvo a embaralha no próprio grimório e depois revela o card do topo do próprio grimório. Se for um card de permanente, ele o coloca no campo de batalha.]]></LOCALISED_TEXT>
    <TARGET_DEFINITION id="0">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:SetZone( ZONE_IN_PLAY )
    filter:SetHint( HINT_ENEMY, EffectController() )
    </TARGET_DEFINITION>
    <TARGET_DETERMINATION>
    return AtLeastOneTargetFromDefinition(0)
    </TARGET_DETERMINATION>
    <PLAY_TIME_ACTION target_choosing="1">
    EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_PERMANENT_TO_SHUFFLE", EffectDC():Make_Targets(0) )
    </PLAY_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local owner = target:GetOwner()
       target:PutInLibrary( -1 )
       EffectDC():Set_PlayerPtr(1, owner)
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local player = EffectDC():Get_PlayerPtr(1)
    if player ~= nil then
       player:ShuffleLibrary()
       
       local card = player:Library_GetNth(0)
       if card ~= nil then
          card:GuidedReveal( ZONE_LIBRARY, ZONE_LIBRARY )
          if (card:GetCardType():IsPermanent() ~= 0) then
             if card:GetCardType():Test( CARD_TYPE_ENCHANTMENT ) ~= 0 and card:GetSubType():Test( ENCHANTMENT_TYPE_AURA ) ~= 0 then
                player:PseudoPlaySpell( card )
             else
                card:PutIntoPlay( player )
             end
          end
       end
       
    end
    </RESOLUTION_TIME_ACTION>
  </SPELL_ABILITY>
  <AI_AVAILABILITY type="in_response" />
  <AI_AVAILABILITY step="begin_combat" turn="their_turn" />
  <AI_AVAILABILITY step="main_1" turn="my_turn" />
  <AI_AVAILABILITY step="declare_attackers" turn="their_turn" />
  <AI_AVAILABILITY step="declare_blockers" />
  <AI_AVAILABILITY step="end_of_turn" />
  <AI_BASE_SCORE score="900" zone="ZONE_HAND" />
</CARD_V2>
nivmizzet1
 
Posts: 617
Joined: 21 Mar 2013, 10:10
Has thanked: 100 times
Been thanked: 25 times

Re: Formal Request Thread

Postby mrmay » 07 Mar 2015, 03:25

looking for sol ring code if this is the right spot to get cards. also looking for doubling season thanks
mrmay
 
Posts: 6
Joined: 07 Mar 2015, 02:59
Has thanked: 0 time
Been thanked: 0 time

Re: Formal Request Thread

Postby Zambooo » 07 Mar 2015, 12:06

nivmizzet1 wrote:I have another version of chaos warp -- I'm not sure who coded it or what mod it's from, but maybe give it a go instead. I can't tell you specifically what might be the problem with the code you posted, but maybe you can work it out by comparison to this code, if this code is alright.

Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="CHAOS_WARP_281236" />
  <CARDNAME text="CHAOS_WARP" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Chaos Warp]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Distorsion chaotique]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Distorsión caótica]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Chaosschleife]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Distorsione Caotica]]></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[Distorção Caótica]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="281236" />
  <ARTID value="137533" />
  <ARTIST name="Trevor Claxton" />
  <CASTING_COST cost="{2}{R}" />
  <TYPE metaname="Instant" />
  <EXPANSION value="DPG" />
  <RARITY metaname="R" />
  <SPELL_ABILITY dangerous="1" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[The owner of target permanent shuffles it into his or her library, then reveals the top card of his or her library. If it’s a permanent card, he or she puts it onto the battlefield.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Le propriétaire du permanent ciblé le mélange à sa bibliothèque et révèle ensuite la carte du dessus de sa bibliothèque. Si c’est une carte de permanent, il la met sur le champ de bataille.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El propietario del permanente objetivo lo baraja en su biblioteca y luego muestra la primera carta de su biblioteca. Si es una carta de permanente, la pone en el campo de batalla.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Der Besitzer einer bleibenden Karte deiner Wahl mischt diese in seine Bibliothek und zeigt dann die oberste Karte seiner Bibliothek offen vor. Falls es eine bleibende Karte ist, bringt er sie ins Spiel.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Il proprietario di un permanente bersaglio lo rimescola nel suo grimorio, poi rivela la prima carta del suo grimorio. Se è una carta permanente, la mette sul campo di battaglia.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[パーマネント1つを対象とする。それのオーナーはそれを自分のライブラリーに加えて切り直し、その後自分のライブラリーの一番上のカードを公開する。 それがパーマネント・カードである場合、そのプレイヤーはそれを戦場に出す。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[지속물 한 개를 목표로 정한다. 그 지속물의 소유자는 그 지속물을 자신의 서고에 섞어 넣은 후 자신의 서고 맨 위의 카드를 공개한다. 그 카드가 지속물 카드라면, 그 지속물의 소유자는 그 카드를 전장에 놓는다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Владелец целевого перманента втасовывает его в свою библиотеку, затем показывает верхнюю карту своей библиотеки. Если это карта перманента, тот игрок кладет ее на поле битвы.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[O dono da permanente alvo a embaralha no próprio grimório e depois revela o card do topo do próprio grimório. Se for um card de permanente, ele o coloca no campo de batalha.]]></LOCALISED_TEXT>
    <TARGET_DEFINITION id="0">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:SetZone( ZONE_IN_PLAY )
    filter:SetHint( HINT_ENEMY, EffectController() )
    </TARGET_DEFINITION>
    <TARGET_DETERMINATION>
    return AtLeastOneTargetFromDefinition(0)
    </TARGET_DETERMINATION>
    <PLAY_TIME_ACTION target_choosing="1">
    EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_PERMANENT_TO_SHUFFLE", EffectDC():Make_Targets(0) )
    </PLAY_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local owner = target:GetOwner()
       target:PutInLibrary( -1 )
       EffectDC():Set_PlayerPtr(1, owner)
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local player = EffectDC():Get_PlayerPtr(1)
    if player ~= nil then
       player:ShuffleLibrary()
       
       local card = player:Library_GetNth(0)
       if card ~= nil then
          card:GuidedReveal( ZONE_LIBRARY, ZONE_LIBRARY )
          if (card:GetCardType():IsPermanent() ~= 0) then
             if card:GetCardType():Test( CARD_TYPE_ENCHANTMENT ) ~= 0 and card:GetSubType():Test( ENCHANTMENT_TYPE_AURA ) ~= 0 then
                player:PseudoPlaySpell( card )
             else
                card:PutIntoPlay( player )
             end
          end
       end
       
    end
    </RESOLUTION_TIME_ACTION>
  </SPELL_ABILITY>
  <AI_AVAILABILITY type="in_response" />
  <AI_AVAILABILITY step="begin_combat" turn="their_turn" />
  <AI_AVAILABILITY step="main_1" turn="my_turn" />
  <AI_AVAILABILITY step="declare_attackers" turn="their_turn" />
  <AI_AVAILABILITY step="declare_blockers" />
  <AI_AVAILABILITY step="end_of_turn" />
  <AI_BASE_SCORE score="900" zone="ZONE_HAND" />
</CARD_V2>
Are you sure this card is not from DotP2013? cause it seems so to me LOL


mrmay wrote:looking for sol ring code if this is the right spot to get cards. also looking for doubling season thanks
Doubling Season is already in the "official pack", and Sol Ring is already in the CW too..
User avatar
Zambooo
 
Posts: 242
Joined: 01 Jul 2012, 21:33
Has thanked: 19 times
Been thanked: 17 times

Re: Formal Request Thread

Postby nivmizzet1 » 07 Mar 2015, 15:23

Zambooo wrote:
nivmizzet1 wrote:I have another version of chaos warp -- I'm not sure who coded it or what mod it's from, but maybe give it a go instead. I can't tell you specifically what might be the problem with the code you posted, but maybe you can work it out by comparison to this code, if this code is alright.

Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="CHAOS_WARP_281236" />
  <CARDNAME text="CHAOS_WARP" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Chaos Warp]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Distorsion chaotique]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Distorsión caótica]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Chaosschleife]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Distorsione Caotica]]></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[Distorção Caótica]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="281236" />
  <ARTID value="137533" />
  <ARTIST name="Trevor Claxton" />
  <CASTING_COST cost="{2}{R}" />
  <TYPE metaname="Instant" />
  <EXPANSION value="DPG" />
  <RARITY metaname="R" />
  <SPELL_ABILITY dangerous="1" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[The owner of target permanent shuffles it into his or her library, then reveals the top card of his or her library. If it’s a permanent card, he or she puts it onto the battlefield.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Le propriétaire du permanent ciblé le mélange à sa bibliothèque et révèle ensuite la carte du dessus de sa bibliothèque. Si c’est une carte de permanent, il la met sur le champ de bataille.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El propietario del permanente objetivo lo baraja en su biblioteca y luego muestra la primera carta de su biblioteca. Si es una carta de permanente, la pone en el campo de batalla.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Der Besitzer einer bleibenden Karte deiner Wahl mischt diese in seine Bibliothek und zeigt dann die oberste Karte seiner Bibliothek offen vor. Falls es eine bleibende Karte ist, bringt er sie ins Spiel.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Il proprietario di un permanente bersaglio lo rimescola nel suo grimorio, poi rivela la prima carta del suo grimorio. Se è una carta permanente, la mette sul campo di battaglia.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[パーマネント1つを対象とする。それのオーナーはそれを自分のライブラリーに加えて切り直し、その後自分のライブラリーの一番上のカードを公開する。 それがパーマネント・カードである場合、そのプレイヤーはそれを戦場に出す。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[지속물 한 개를 목표로 정한다. 그 지속물의 소유자는 그 지속물을 자신의 서고에 섞어 넣은 후 자신의 서고 맨 위의 카드를 공개한다. 그 카드가 지속물 카드라면, 그 지속물의 소유자는 그 카드를 전장에 놓는다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Владелец целевого перманента втасовывает его в свою библиотеку, затем показывает верхнюю карту своей библиотеки. Если это карта перманента, тот игрок кладет ее на поле битвы.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[O dono da permanente alvo a embaralha no próprio grimório e depois revela o card do topo do próprio grimório. Se for um card de permanente, ele o coloca no campo de batalha.]]></LOCALISED_TEXT>
    <TARGET_DEFINITION id="0">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:SetZone( ZONE_IN_PLAY )
    filter:SetHint( HINT_ENEMY, EffectController() )
    </TARGET_DEFINITION>
    <TARGET_DETERMINATION>
    return AtLeastOneTargetFromDefinition(0)
    </TARGET_DETERMINATION>
    <PLAY_TIME_ACTION target_choosing="1">
    EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_PERMANENT_TO_SHUFFLE", EffectDC():Make_Targets(0) )
    </PLAY_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local owner = target:GetOwner()
       target:PutInLibrary( -1 )
       EffectDC():Set_PlayerPtr(1, owner)
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local player = EffectDC():Get_PlayerPtr(1)
    if player ~= nil then
       player:ShuffleLibrary()
       
       local card = player:Library_GetNth(0)
       if card ~= nil then
          card:GuidedReveal( ZONE_LIBRARY, ZONE_LIBRARY )
          if (card:GetCardType():IsPermanent() ~= 0) then
             if card:GetCardType():Test( CARD_TYPE_ENCHANTMENT ) ~= 0 and card:GetSubType():Test( ENCHANTMENT_TYPE_AURA ) ~= 0 then
                player:PseudoPlaySpell( card )
             else
                card:PutIntoPlay( player )
             end
          end
       end
       
    end
    </RESOLUTION_TIME_ACTION>
  </SPELL_ABILITY>
  <AI_AVAILABILITY type="in_response" />
  <AI_AVAILABILITY step="begin_combat" turn="their_turn" />
  <AI_AVAILABILITY step="main_1" turn="my_turn" />
  <AI_AVAILABILITY step="declare_attackers" turn="their_turn" />
  <AI_AVAILABILITY step="declare_blockers" />
  <AI_AVAILABILITY step="end_of_turn" />
  <AI_BASE_SCORE score="900" zone="ZONE_HAND" />
</CARD_V2>
Are you sure this card is not from DotP2013? cause it seems so to me LOL

You're absolutely right. I did my search one level too high; I wondered why it didn't show up in Riiak's deck builder, lol :oops:
nivmizzet1
 
Posts: 617
Joined: 21 Mar 2013, 10:10
Has thanked: 100 times
Been thanked: 25 times

Re: Formal Request Thread

Postby Xander9009 » 07 Mar 2015, 18:48

Try this.

Chaos Warp - Untested | Open
Code: Select all
<SPELL_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[The owner of target permanent shuffles it into his or her library, then reveals the top card of his or her library. If it’s a permanent card, he or she puts it onto the battlefield.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Le propriétaire du permanent ciblé le mélange à sa bibliothèque et révèle ensuite la carte du dessus de sa bibliothèque. Si c'est une carte de permanent, il la met sur le champ de bataille.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El propietario del permanente objetivo lo baraja en su biblioteca y luego muestra la primera carta de su biblioteca. Si es una carta de permanente, la pone en el campo de batalla.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Der Besitzer einer bleibenden Karte deiner Wahl mischt diese in seine Bibliothek und zeigt dann die oberste Karte seiner Bibliothek offen vor. Falls es eine bleibende Karte ist, bringt er sie ins Spiel.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Il proprietario di un permanente bersaglio lo rimescola nel suo grimorio, poi rivela la prima carta del suo grimorio. Se è una carta permanente, la mette sul campo di battaglia.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[パーマネント1つを対象とする。それのオーナーはそれを自分のライブラリーに加えて切り直し、その後自分のライブラリーの一番上のカードを公開する。 それがパーマネント・カードである場合、そのプレイヤーはそれを戦場に出す。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[지속물 한 개를 목표로 정한다. 그 지속물의 소유자는 그 지속물을 자신의 서고에 섞어 넣은 후 자신의 서고 맨 위의 카드를 공개한다. 그 카드가 지속물 카드라면, 그 지속물의 소유자는 그 카드를 전장에 놓는다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Владелец целевого перманента втасовывает его в свою библиотеку, затем показывает верхнюю карту своей библиотеки. Если это карта перманента, тот игрок кладет ее на поле битвы.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[O dono da permanente alvo a embaralha no próprio grimório e depois revela o card do topo do próprio grimório. Se for um card de permanente, ele o coloca no campo de batalha.]]></LOCALISED_TEXT>
      <SFX text="TARGET_SPARKS_PLAY" />
      <TARGET tag="CARD_QUERY_CHOOSE_PERMANENT_TO_SHUFFLE" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
         local filter = ClearFilter()
         filter:Add( FE_IS_PERMANENT, true )
      </TARGET_DEFINITION>
      <RESOLUTION_TIME_ACTION>
         local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
         if target ~= nil then
             EffectDC():Set_PlayerPtr(1, target:GetOwner())
             target:PutOnTopOfLibrary()
         end
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         local player = EffectDC():Get_PlayerPtr(1)
         if player ~= nil then
            player:ShuffleLibrary()
         end
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         local player = EffectDC():Get_PlayerPtr(1)
         if player ~= nil then
            local card = player:Library_GetTop()
            if card ~= nil then
               card:Reveal()
               if card:GetCardType():IsPermanent() then
                  card:PutOntoBattlefield( player )
               end
            end
         end
      </RESOLUTION_TIME_ACTION>
      <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY" />
   </SPELL_ABILITY>
The only changes SHOULD be that the player is checked for nil before it's used (always good practice). Then if it doesn't work properly, you'll now the player isn't being stored properly. That could be either something overlapping with its chest register (not the case here), or the player not being retrieved from the card properly (in which case you should try GetPlayer() instead of GetOwner()).
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Formal Request Thread

Postby Zambooo » 07 Mar 2015, 19:06

Xander9009 wrote:Try this.

Chaos Warp - Untested | Open
Code: Select all
<SPELL_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[The owner of target permanent shuffles it into his or her library, then reveals the top card of his or her library. If it’s a permanent card, he or she puts it onto the battlefield.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Le propriétaire du permanent ciblé le mélange à sa bibliothèque et révèle ensuite la carte du dessus de sa bibliothèque. Si c'est une carte de permanent, il la met sur le champ de bataille.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El propietario del permanente objetivo lo baraja en su biblioteca y luego muestra la primera carta de su biblioteca. Si es una carta de permanente, la pone en el campo de batalla.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Der Besitzer einer bleibenden Karte deiner Wahl mischt diese in seine Bibliothek und zeigt dann die oberste Karte seiner Bibliothek offen vor. Falls es eine bleibende Karte ist, bringt er sie ins Spiel.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Il proprietario di un permanente bersaglio lo rimescola nel suo grimorio, poi rivela la prima carta del suo grimorio. Se è una carta permanente, la mette sul campo di battaglia.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[パーマネント1つを対象とする。それのオーナーはそれを自分のライブラリーに加えて切り直し、その後自分のライブラリーの一番上のカードを公開する。 それがパーマネント・カードである場合、そのプレイヤーはそれを戦場に出す。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[지속물 한 개를 목표로 정한다. 그 지속물의 소유자는 그 지속물을 자신의 서고에 섞어 넣은 후 자신의 서고 맨 위의 카드를 공개한다. 그 카드가 지속물 카드라면, 그 지속물의 소유자는 그 카드를 전장에 놓는다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Владелец целевого перманента втасовывает его в свою библиотеку, затем показывает верхнюю карту своей библиотеки. Если это карта перманента, тот игрок кладет ее на поле битвы.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[O dono da permanente alvo a embaralha no próprio grimório e depois revela o card do topo do próprio grimório. Se for um card de permanente, ele o coloca no campo de batalha.]]></LOCALISED_TEXT>
      <SFX text="TARGET_SPARKS_PLAY" />
      <TARGET tag="CARD_QUERY_CHOOSE_PERMANENT_TO_SHUFFLE" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
         local filter = ClearFilter()
         filter:Add( FE_IS_PERMANENT, true )
      </TARGET_DEFINITION>
      <RESOLUTION_TIME_ACTION>
         local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
         if target ~= nil then
             EffectDC():Set_PlayerPtr(1, target:GetOwner())
             target:PutOnTopOfLibrary()
         end
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         local player = EffectDC():Get_PlayerPtr(1)
         if player ~= nil then
            player:ShuffleLibrary()
         end
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         local player = EffectDC():Get_PlayerPtr(1)
         if player ~= nil then
            local card = player:Library_GetTop()
            if card ~= nil then
               card:Reveal()
               if card:GetCardType():IsPermanent() then
                  card:PutOntoBattlefield( player )
               end
            end
         end
      </RESOLUTION_TIME_ACTION>
      <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY" />
   </SPELL_ABILITY>
The only changes SHOULD be that the player is checked for nil before it's used (always good practice). Then if it doesn't work properly, you'll now the player isn't being stored properly. That could be either something overlapping with its chest register (not the case here), or the player not being retrieved from the card properly (in which case you should try GetPlayer() instead of GetOwner()).
The point is that I've used this card too several times, and never got that error.. Maybe the trick is really to use GetPlayer(), cause I THINK the error was caused once the enemy used chaos warp on a creature he owned but I was controlling through some aura..
User avatar
Zambooo
 
Posts: 242
Joined: 01 Jul 2012, 21:33
Has thanked: 19 times
Been thanked: 17 times

Re: Formal Request Thread

Postby RiiakShiNal » 07 Mar 2015, 19:13

If you change it to use GetPlayer() then you will have altered the ability and it will not work as it is supposed to. Chaos Warp says the Owner of target permanent not the current controller.

  • GetOwner() - Retrieves the player who's deck owns the card (this should never ever return nil).
  • GetPlayer() - Retrieves the current controller of the card or if that is not available (for example the card is exiled, in library, hand, or graveyard) only then will it return the owner of the card.

So as I mentioned you can't replace GetOwner() with GetPlayer() in this case otherwise you will introduce bugs.
RiiakShiNal
Programmer
 
Posts: 2189
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 11 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 11 users online :: 0 registered, 0 hidden and 11 guests (based on users active over the past 10 minutes)
Most users ever online was 9824 on 10 Nov 2025, 04:33

Users browsing this forum: No registered users and 11 guests

Login Form