Page 1 of 1

Captivating vampire - Changing/Adding card subtypes

PostPosted: 06 Feb 2011, 11:52
by Mithrarian
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!