It is currently 25 Apr 2024, 04:49
   
Text Size

Magic Trick : Using exalted abilities

Moderator: CCGHQ Admins

Magic Trick : Using exalted abilities

Postby Yanna » 28 Jul 2010, 11:35

Hi !

Maybe you have already figured it out, but you can code exalted abilities !

Add a custom function :

Code: Select all
function IsExalted()
-- ////////////////////////////////////////////////////////////////////////////////////////
-- return true if there is only one attacking creature, otherwise false
-- ////////////////////////////////////////////////////////////////////////////////////////
        Object():GetFilter():Clear()
        Object():GetFilter():AddCardType( CARD_TYPE_CREATURE )
        Object():GetFilter():SetController( Object():GetController() )
        Object():GetFilter():AddExtra( FILTER_EXTRA_CREATURE_ATTACKING )
        local LNG_ATTACKERS = (Object():GetFilter():Count())
        if ( LNG_ATTACKERS == 1 ) then
          return true
        else
          return false
        end
end
Then on the cards that make use of exalted abilities :

Code: Select all

    <TRIGGERED_ABILITY layer="7c" tag="QASALI_PRIDEMAGE_RULE_1" >

      <TRIGGER value="ATTACKING">
       return IsExalted()
      </TRIGGER>

      <EFFECT>
       PlusOnePlusOne()
      </EFFECT>

      <DURATION>
        return UntilEndOfTurn()
      </DURATION>

    </TRIGGERED_ABILITY>

It's been bugging me for a while but now works correctly ^^ New release will include the Qasali Pridemage in an interesting GW deck :)
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 19 guests


Who is online

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

Login Form