It is currently 27 Apr 2024, 17:20
   
Text Size

Anybody with a better idea for Slithering Shade?

Moderator: CCGHQ Admins

Anybody with a better idea for Slithering Shade?

Postby thefiremind » 11 Sep 2013, 09:39

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.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 721 times

Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 33 guests


Who is online

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

Login Form