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

Making things deal damage to other things

Moderator: CCGHQ Admins

Making things deal damage to other things

Postby Shatterhouse » 11 Jun 2011, 02:44

Playing around with Searing Blaze led me to this.

Object():GetTargetCard():DealDamage( Object():GetTargetCard():GetCurrentPower(), Object():GetTargetCard() )

The bold part in the above damage function is the source of the damage. For normal spells like Shock, that would be itself, or Object(), because the spell itself does the damage to its target. The above code is for Kiku's Shadow. It causes a creature to do damage to itself equal to its power. It's cool, because you can use it on something like Phyrexian Obliterator, and the source of the damage is the creature itself, so the Obliterator's controller has to sacrifice permanents instead of you.

This opens the door for other spells like Soul's Fire that you might want to use on a creature that has a dealt-damage-trigger, like Abyssal Specter.

Code: Select all
   <SPELL_ABILITY tag="KIKUS_SHADOW_RULE_1" layer="0">

            <TARGET_DETERMINATION>
                 return TargetCreatureBad()
            </TARGET_DETERMINATION>
         
      <PLAYTIME>
         ChooseTargetCreature()
      </PLAYTIME>
      <EFFECT>
         Object():GetTargetCard():DealDamage( Object():GetTargetCard():GetCurrentPower(), Object():GetTargetCard() )
      </EFFECT>
         
   </SPELL_ABILITY>
Shatterhouse
 
Posts: 72
Joined: 20 Apr 2011, 00:07
Has thanked: 0 time
Been thanked: 2 times

Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 6 guests


Who is online

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

Login Form