Page 1 of 1

Anybody with a better idea for Slithering Shade?

PostPosted: 11 Sep 2013, 09:39
by thefiremind
I was searching for a way to code Slithering Shade with as less approximation as possible. The best I could think about is this:
Code: Select all
  <STATIC_ABILITY active_zone="ZONE_ANY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Defender]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Défenseur]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Defensor.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Verteidiger]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Difensore]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[防衛]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[수비태세]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Защитник]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Defensor]]></LOCALISED_TEXT>
    <CONTINUOUS_ACTION layer="6">
    local source = EffectSource()
    if source ~= nil then
       local characteristics = source:GetCurrentCharacteristics()
       local controller = EffectController()
       if source:GetZone() == ZONE_BATTLEFIELD and source:IsAttacking() == false and
       controller:MyTurn() and controller:Hand_Count() == 0 and
       MTG():GetPhase() == PHASE_COMBAT and MTG():GetStep() &lt; STEP_DECLARE_BLOCKERS then
          characteristics:Badge_Set(BADGE_DEFENDER)
       else
          characteristics:Bool_Set(CHARACTERISTIC_DEFENDER, 1)
       end
    end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
That means: it has defender, except when on the battlefield and not attacking and its controller has no cards in hand during his turn and it's the combat phase before blockers are declared, in which case it only has the defender badge. It's still a relatively long time without defender, which would badly interact with Overgrown Battlement and similar cards. I'm not coding Slithering Shade for a defender deck, so I can live with the approximation, but I'd like to know if someone had a better idea.