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

Fixing Searing Blaze

Moderator: CCGHQ Admins

Fixing Searing Blaze

Postby Shatterhouse » 11 Jun 2011, 02:04

Searing Blaze on the surface looks very simple, but the community implementation of Searing Blaze is incorrect. It's supposed to target both a player and a creature controlled by that player. Currently we're targeting just a creature and then dealing damage to that creature's controller, like in Chandra's Outrage. Spirit of the Hearth cares about the difference.

The code below will prompt the user to target a player, and then prompt again to target a creature. When the spell resolves it'll do however much damage it's supposed to do to both targets. I'm pretty sure I'll be able to filter it so that we only target creatures controlled by the targeted player(haven't yet), but I can't seem to figure out the last important bit:

How do we restrict the spell's availability so that we can only cast it if there's a targetable player that controls a targetable creature?

Current code:
Code: Select all
   <SPELL_ABILITY tag="SEARING_BLAZE_RULE_1" layer="0">

            <TARGET_DETERMINATION>
                 return TargetPlayerBad()
            </TARGET_DETERMINATION>
         
      <EFFECT>
         Object():Register_Player_Get(0):DealDamage( Object():Register_Get(0), Object() )
         Object():Register_Object_Get(0):DealDamage( Object():Register_Get(0), Object() )
      </EFFECT>
         
   </SPELL_ABILITY>

   <TRIGGERED_ABILITY zone="HAND" layer="0" forced_skip="1">
   <TRIGGER value="SPELL_PLAYED">
      return SelfTriggered()
   </TRIGGER>

      <PLAYTIME>
         TargetPlayerBad()
         ChooseTargetPlayer()
      </PLAYTIME>
      <EFFECT>
         if (Object():GetTargetPlayer()) ~= nil then
            Object():Register_Player_Set( 0, Object():GetTargetPlayer() )
         end
      </EFFECT>
      
   </TRIGGERED_ABILITY>

   <TRIGGERED_ABILITY zone="stack" layer="0">
   <TRIGGER value="ABILITY_RESOLVED">
      return SelfTriggered() and Object():Register_Get(1) ~= 1
   </TRIGGER>
            <PLAYTIME>
         Object():Register_Set(1,1)
         TargetCreatureBad()
              ChooseTargetCreature()
            </PLAYTIME>
      <EFFECT>
         if (Object():GetTargetCard()) ~= nil then
            Object():Register_Object_Set( 0, Object():GetTargetCard() )
         end
      </EFFECT>
      
   </TRIGGERED_ABILITY>

   <TRIGGERED_ABILITY zone="stack" layer="0" forced_skip="1">
   <TRIGGER value="TARGETS_CHOSEN">
      return SelfTriggered() and Object():Register_Get(1) ~= 1
   </TRIGGER>
      <EFFECT>
      </EFFECT>
   </TRIGGERED_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 4 guests


Who is online

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

Login Form