It is currently 25 Apr 2024, 19:54
   
Text Size

Problem with "Sigil Tracer"

Moderator: CCGHQ Admins

Problem with "Sigil Tracer"

Postby Zambooo » 25 Jul 2012, 16:20

With Sigil Tracer everything goes right until I have to choose the wizards to tap, cause I can choose again only sorcery or instant in the stack >.>
Of course is just a silly mistake but I can't find it D:

Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="SIGIL_TRACER_152590" />
  <CARDNAME text="SIGIL_TRACER" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Sigil Tracer]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Disegnatore di Sigilli]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="152590" />
  <ARTID value="152590" />
  <ARTIST name="Dan Scott" />
  <CASTING_COST cost="{1}{U}{U}" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA["The reflection is true. It is you who are distorted and false."]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA["Il riflesso è veritiero. Sei tu a essere falso e distorto."]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Merfolk" order_de-DE="0" order_es-ES="1" order_fr-FR="0" order_it-IT="1" order_jp-JA="0" order_ko-KR="0" order_pt-BR="0" order_ru-RU="0" />
  <SUB_TYPE metaname="Wizard" order_de-DE="1" order_es-ES="0" order_fr-FR="1" order_it-IT="0" order_jp-JA="1" order_ko-KR="1" order_pt-BR="1" order_ru-RU="1" />
  <EXPANSION value="DPG" />
  <RARITY metaname="R" />
  <POWER value="2" />
  <TOUGHNESS value="2" />
 
  <ACTIVATED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{U}, Tap two untapped Wizards you control: Copy target instant or sorcery spell. You may choose new targets for the copy.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{U}, TAPpa due Maghi STAPpati che controlli: Copia una magia istantaneo o stregoneria bersaglio. Puoi scegliere nuovi bersagli per la copia.]]></LOCALISED_TEXT>
    <COST type="Mana" cost="{1}{U}" />
    <COST type="generic">
      <TARGET_DEFINITION id="6">
      local filter = Object():GetFilter()
      filter:Clear()
      filter:AddCardType( CARD_TYPE_CREATURE )
      filter:AddSubType( CREATURE_TYPE_WIZARD )
      filter:SetPlayer( EffectController() )
      filter:SetZone( ZONE_IN_PLAY )
      filter:SetHint( HINT_ENEMY, EffectController() )
      filter:SetCardInstance( Object() )
      filter:AddExtra( FILTER_EXTRA_CREATURE_UNTAPPED + FILTER_EXTRA_FLIP_CARD_INSTANCE )
      </TARGET_DEFINITION>
      <TARGET_DETERMINATION>
      return AtLeastNTargetsFromDefinition(6, 2)
      </TARGET_DETERMINATION>
      <PLAY_TIME_ACTION>
      local player = EffectController()
      player:SetTargetCount( 2 )
      for i=0,1 do
         player:SetTargetPrompt( i, "CARD_QUERY_CHOOSE_CREATURE_TAP" )
      end
      player:ChooseTargets( 0, EffectDC():Make_Targets(0) )
      </PLAY_TIME_ACTION>
     <RESOLUTION_TIME_ACTION>
      local target_a = EffectDC():Get_Targets(0):Get_NthCardPtr(0)
      local target_b = EffectDC():Get_Targets(0):Get_NthCardPtr(1)
      if target_a ~= nil then
         target_a:Tap()
      end
      if target_b ~= nil then
         target_b:Tap()
      end
      </RESOLUTION_TIME_ACTION></COST>
   
   <TARGET_DEFINITION id="0">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddCardType( CARD_TYPE_INSTANT )
    filter:AddCardType( CARD_TYPE_SORCERY )
    filter:SetZone( ZONE_STACK )
    filter:SetHint( HINT_NEUTRAL, EffectController() )
    </TARGET_DEFINITION>
    <TARGET_DETERMINATION>
    return AtLeastOneTargetFromDefinition(0)
    </TARGET_DETERMINATION>
    <PLAY_TIME_ACTION target_choosing="1">
    EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_SPELL_TO_COPY", EffectDC():Make_Targets(1) )
    </PLAY_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(1):Get_CardPtr(0)
    if target ~= nil then
       EffectController():CopySpellWithNewTargets( target )
    end
    </RESOLUTION_TIME_ACTION>
  </ACTIVATED_ABILITY>
 
  <SFX text="COMBAT_PLASMA_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_PLASMA_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
User avatar
Zambooo
 
Posts: 242
Joined: 01 Jul 2012, 21:33
Has thanked: 19 times
Been thanked: 17 times

Re: Problem with "Sigil Tracer"

Postby RiiakShiNal » 25 Jul 2012, 17:50

It looks like the problem is in the Cost's play time action, for your ChooseTargets you have a 0 where you should have a 6.
Code: Select all
      <PLAY_TIME_ACTION>
      local player = EffectController()
      player:SetTargetCount( 2 )
      for i=0,1 do
         player:SetTargetPrompt( i, "CARD_QUERY_CHOOSE_CREATURE_TAP" )
      end
      player:ChooseTargets( 6, EffectDC():Make_Targets(0) )
      </PLAY_TIME_ACTION>
The first parameter of any ChooseTarget variant is the target validation, though you can use NO_VALIDATION or use an id that you have not used in the code if you have set up the filter beforehand. If you define a target definition with the integer you use for that parameter you need to make sure you used the right integer.
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Problem with "Sigil Tracer"

Postby Zambooo » 26 Jul 2012, 15:33

Thanks now it works properly. Can I ask you now how can I add Sigil Tracer as an optional Wizard to tap? (I mean I can't choose it, but it's a Wizard too!)
I know this might seem silly but I really don't know how to do it >.>
User avatar
Zambooo
 
Posts: 242
Joined: 01 Jul 2012, 21:33
Has thanked: 19 times
Been thanked: 17 times

Re: Problem with "Sigil Tracer"

Postby RiiakShiNal » 26 Jul 2012, 15:40

Zambooo wrote:Thanks now it works properly. Can I ask you now how can I add Sigil Tracer as an optional Wizard to tap? (I mean I can't choose it, but it's a Wizard too!)
I know this might seem silly but I really don't know how to do it >.>
Sure in your Target definition you just need to remove the specification that says you can't use that card (in other words remove SetCardInstance() and FILTER_EXTRA_FLIP_CARD_INSTANCE like so):
Code: Select all
      <TARGET_DEFINITION id="6">
      local filter = Object():GetFilter()
      filter:Clear()
      filter:AddCardType( CARD_TYPE_CREATURE )
      filter:AddSubType( CREATURE_TYPE_WIZARD )
      filter:SetPlayer( EffectController() )
      filter:SetZone( ZONE_IN_PLAY )
      filter:SetHint( HINT_ENEMY, EffectController() )
      filter:AddExtra( FILTER_EXTRA_CREATURE_UNTAPPED )
      </TARGET_DEFINITION>
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 22 guests


Who is online

In total there are 22 users online :: 0 registered, 0 hidden and 22 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 22 guests

Login Form