It is currently 25 Apr 2024, 12:14
   
Text Size

Captivating vampire - Changing/Adding card subtypes

Moderator: CCGHQ Admins

Captivating vampire - Changing/Adding card subtypes

Postby Mithrarian » 06 Feb 2011, 11:52

I am coding "Captivating vampire". I have nearly finished him, but I haven't already found a way to add the vampire subtype to the controlled card. (BTW: I temporary put only 2 vamps to tap for debug purposes...)

Code: Select all
      <ACTIVATED_ABILITY tag="CAPTIVATING_VAMPIRE_RULE_2" layer="0" forced_skip="1">
         
     <COST type="Target">
     <TARGET_DETERMINATION>
        ClearFilter()
      Object():GetFilter():NotTargetted()
      Object():GetFilter():AddCardType( CARD_TYPE_CREATURE )
      Object():GetFilter():AddSubType( CREATURE_TYPE_VAMPIRE )
           Object():GetFilter():AddExtra( FILTER_EXTRA_CREATURE_UNTAPPED )
      Object():GetFilter():SetZone( ZONE_IN_PLAY )
      Object():GetFilter():SetPlayer( Object():GetController() )
      Object():GetPlayer():SetTargetCount( 2 )
        return TargetAllBadF()
     </TARGET_DETERMINATION>
     <PLAYTIME> 
       Object():GetPlayer():SetTargetPrompt( 0, "CHOOSETARGETUNTAPPEDVAMPIREA" )
       Object():GetPlayer():SetTargetPrompt( 1, "CHOOSETARGETUNTAPPEDVAMPIREE" )
      Object():GetPlayer():ChooseTargets()
     </PLAYTIME>
     </COST>        
     <EFFECT>
       for i=0, 1 do
         if Object():GetNthAuxTargetCard( i ) ~= nil then
            Object():GetNthAuxTargetCard( i ):Tap()
         end
      end
      Object():Register_Set( 1, 1 )
     </EFFECT>
   
      </ACTIVATED_ABILITY>

<TRIGGERED_ABILITY layer="0" forced_skip="1" >

   <TRIGGER value="ABILITY_RESOLVED">
      return SelfTriggered() and Object():Register_Get( 1 ) == 1   
   </TRIGGER>

   <PRE_EFFECT>
      Object():Register_Inc( 0 )
      Object():Register_Set( 1, 0 )
   </PRE_EFFECT>
      
   <PLAYTIME>
      Object():GetFilter():Clear()
      Object():GetFilter():AddCardType( CARD_TYPE_CREATURE )
      Object():GetFilter():SetZone( ZONE_IN_PLAY )
      Object():GetPlayer():ChooseTarget( "ChooseCreatureToControl" )
          </PLAYTIME>
      
   <EFFECT>
      if Object():GetTargetCard() ~= nil then
         PutTargetCardIntoPlay( Object():GetPlayer() )
      end
   </EFFECT>

</TRIGGERED_ABILITY>

In fact, I have not found card that change the types and / or colours of target cards (e.g. no Raise from the grave developed yet) ...

Thank you for you help in advance!
Mithrarian
 
Posts: 7
Joined: 06 Feb 2011, 10:48
Has thanked: 0 time
Been thanked: 0 time

Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 26 guests


Who is online

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

Login Form