Page 1 of 1

Community's FreeCastingCost() broken by Etherium Sculptor

PostPosted: 26 Apr 2011, 03:39
by Shatterhouse
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().

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

PostPosted: 26 Apr 2011, 04:38
by Shatterhouse
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>