It is currently 01 Sep 2025, 06:52
   
Text Size

Community's FreeCastingCost() broken by Etherium Sculptor

Moderator: CCGHQ Admins

Community's FreeCastingCost() broken by Etherium Sculptor

Postby Shatterhouse » 26 Apr 2011, 03:39

No idea why. If an Etherium Sculptor is present anywhere in the game(any player's hand, library, graveyard, etc.) the Community function FreeCastingCost() stops working.

It has something to do with the influencing_zone="Hand" tag. So I'm guessing any other cards with that tag in a static ability will screw up FreeCastingCost().
Shatterhouse
 
Posts: 72
Joined: 20 Apr 2011, 00:07
Has thanked: 0 time
Been thanked: 2 times

Re: Community's FreeCastingCost() broken by Etherium Sculpto

Postby Shatterhouse » 26 Apr 2011, 04:38

Figured out the problem. Or at least, a solution.

I added yet more code to Staggershock to give it its own cost-influencing static ability at the same level as the Etherium Sculptor's. The code down below is ugly, but rebound's pretty fun to play with.

Code: Select all
    <SPELL_ABILITY tag="STAGGERSHOCK_RULE_1" layer="0">
      <TARGET_DETERMINATION>
        return TargetCreatureOrPlayerBad()
      </TARGET_DETERMINATION>
      <PLAYTIME>
        if(Object():Register_Get(0) == 2) then
          Object():Register_Set(0,0)
        elseif(Object():Register_Get(0) == 1) then
          Object():Register_Set(0,2)
        else
          Object():Register_Set(0,1)
        end
        ChooseTarget( "ChooseCreatureOrPlayerTwoDamage" )
      </PLAYTIME>
      <EFFECT>
        DealDamageToTarget( 2 )
        if(Object():Register_Get(0) == 1) then
          Object():Register_Set(7,1)
          Object():RemoveFromGame()
        end
      </EFFECT>
    </SPELL_ABILITY>
    <STATIC_ABILITY tag="" zone="Hand" influencing_zone="Hand" layer="8">
      <FILTER>
       return ( (Object():Register_Get(0) == 1) and (Subject():Register_Get(7) == 1) and OwnedByYou() and InHand() )
      </FILTER>
      <EFFECT>
       FreeCastingCost()
      </EFFECT>
    </STATIC_ABILITY>
 <TRIGGERED_ABILITY tag="STAGGERSHOCK_RULE_2" layer="0" zone="REMOVED_FROM_GAME">
  <TRIGGER value="BEGINNING_OF_STEP">
  if Object():Register_Get(0) == 1 then
    return MyStep(STEP_UNTAP)
  end
  </TRIGGER>
      <EFFECT>
        ReturnThisCardToOwnersHand()
        Flash()
      </EFFECT>
  </TRIGGERED_ABILITY>
 <TRIGGERED_ABILITY tag="STAGGERSHOCK_RULE_3" layer="0" zone="HAND">
  <TRIGGER value="BEGINNING_OF_STEP">
  if Object():Register_Get(0) == 1 then
    return MyUpkeep()
  end
  </TRIGGER>
      <EFFECT>
        if(Object():Register_Get(0) == 0) then
          <!-- do nothing -->
        else
          Object():Register_Set(0,2)
          Object():RemoveFromGame()
        end
      </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 8 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 8 users online :: 0 registered, 0 hidden and 8 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 8 guests

Login Form