Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk



Help ! Static + Activable ability
Moderator: CCGHQ Admins
Help ! Static + Activable ability
by Borzut » 11 Jul 2011, 23:27
Hi !
Is it possible to code the Gemhide Sliver ?
His static ability is to give an activable ability to the other slivers.
So i need the code of a card who give an activable ability to another, an equipment for example...
Thanks
Is it possible to code the Gemhide Sliver ?
His static ability is to give an activable ability to the other slivers.
So i need the code of a card who give an activable ability to another, an equipment for example...
Thanks
- Borzut
- Posts: 8
- Joined: 09 Jul 2011, 05:24
- Has thanked: 0 time
- Been thanked: 0 time
Re: Help ! Static + Activable ability
by Kanash » 06 Aug 2011, 20:46
Hello,
I don't know if your problem was resolved, so I'll help you.
I've tried to code Gemhide Sliver, the finished result work fine.
Glad if that can help you.
Kanash
I don't know if your problem was resolved, so I'll help you.
I've tried to code Gemhide Sliver, the finished result work fine.
- Code: Select all
-->
<TOKEN_REGISTRATION type="_BLUE_MANA_Token" reservation="2" />
<TOKEN_REGISTRATION type="_BLACK_MANA_Token" reservation="2" />
<TOKEN_REGISTRATION type="_GREEN_MANA_Token" reservation="2" />
<TOKEN_REGISTRATION type="_WHITE_MANA_Token" reservation="2" />
<TOKEN_REGISTRATION type="_RED_MANA_Token" reservation="2" />
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<ACTIVATED_ABILITY tag="GEMHIDE_SLIVER_RULE_1" sorcery_time="0" layer="0" auto_skip="1" >
<COST type="TAP" >
<TARGET_DETERMINATION>
Object():GetFilter():SetController( Object():GetPlayer() )
Object():GetFilter():AddCardType( CARD_TYPE_CREATURE )
Object():GetFilter():AddExtra( FILTER_EXTRA_CREATURE_UNTAPPED )
Object():GetFilter():AddSubType( CREATURE_TYPE_SLIVER )
return TargetInPlayGoodF()
</TARGET_DETERMINATION>
<PLAYTIME>
ChooseTarget( "ChooseCreature" )
Object():GetPlayer():ChooseColour( "ChooseAColour", 1 )
</PLAYTIME>
</COST>
<EFFECT>
ClearFilter()
local LNG_COLOUR = Object():GetPlayer():GetChosenColour()
if (LNG_COLOUR == 4) then
ProduceBlueMana( 1 )
end
if (LNG_COLOUR == 3) then
ProduceBlackMana( 1 )
end
if (LNG_COLOUR == 1) then
ProduceRedMana( 1 )
end
if (LNG_COLOUR == 2) then
ProduceGreenMana( 1 )
end
if (LNG_COLOUR == 5) then
ProduceWhiteMana( 1 )
end
</EFFECT>
<!--
Glad if that can help you.
Kanash
Re: Help ! Static + Activable ability
by nabeshin » 07 Aug 2011, 00:54
And in DLC nobody has guessed to make something like -
" ProduceChosenColour() "
and coding becomes easier.
" ProduceChosenColour() "
and coding becomes easier.
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 5 guests