Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Programming Talk
Captivating vampire - Changing/Adding card subtypes
Moderator: CCGHQ Admins
Captivating vampire - Changing/Adding card subtypes
by 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...)
Thank you for you help in advance!
- 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>
Thank you for you help in advance!
- Mithrarian
- Posts: 7
- Joined: 06 Feb 2011, 10:48
- Has thanked: 0 time
- Been thanked: 0 time
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 26 guests