Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Programming Talk
Magic Trick : Using exalted abilities
Moderator: CCGHQ Admins
Magic Trick : Using exalted abilities
by Yanna » 28 Jul 2010, 11:35
Hi !
Maybe you have already figured it out, but you can code exalted abilities !
Add a custom function :
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
- 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>
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests