It is currently 11 May 2025, 09:22
   
Text Size

Help ! Static + Activable ability

Moderator: CCGHQ Admins

Help ! Static + Activable ability

Postby 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
Borzut
 
Posts: 8
Joined: 09 Jul 2011, 05:24
Has thanked: 0 time
Been thanked: 0 time

Re: Help ! Static + Activable ability

Postby 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.

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>
            

<!--
The new effect for the sliver : "Tap an untapped Sliver you control : add one mana of any color to your mana pool"

Glad if that can help you.


Kanash
Kanash
 
Posts: 4
Joined: 15 Dec 2010, 22:20
Has thanked: 0 time
Been thanked: 1 time

Re: Help ! Static + Activable ability

Postby nabeshin » 07 Aug 2011, 00:54

And in DLC nobody has guessed to make something like -
" ProduceChosenColour() "
and coding becomes easier.
User avatar
nabeshin
 
Posts: 207
Joined: 27 Jun 2011, 20:07
Has thanked: 5 times
Been thanked: 31 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 5 guests


Who is online

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

Login Form