Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Programming Talk
Anybody with a better idea for Slithering Shade?
Moderator: CCGHQ Admins
Anybody with a better idea for Slithering Shade?
by 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() < STEP_DECLARE_BLOCKERS then
characteristics:Badge_Set(BADGE_DEFENDER)
else
characteristics:Bool_Set(CHARACTERISTIC_DEFENDER, 1)
end
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 33 guests