It is currently 18 Apr 2024, 02:31
   
Text Size

Untap cost and summoning sickness

Moderator: CCGHQ Admins

Untap cost and summoning sickness

Postby thefiremind » 14 May 2013, 11:28

I have never tried to code a card with the Image cost... until now. I discovered that DotP2013 supports it partially: it requires the permanent to be tapped, which is OK, but it ignores another rule...
Gatherer wrote:The "summoning sickness" rule applies to Image. If a creature with an Image ability hasn't been under your control since your most recent turn began, you can't activate that ability. Ignore this rule if the creature also has haste.
So if we want to code a creature with the Image cost, we need to manage the summoning sickness manually.

Let's quote the rules for reference:
Comprehensive Rules wrote:The term “summoning sickness” is an informal term which describes a creature’s inability to attack or to use activated abilities that include the tap symbol when it has come under a player’s control since the beginning of that player’s most recent turn. See rule 302.6. See also Haste.
This is how I would do it:
Code: Select all
  <TRIGGERED_ABILITY internal="1">
    <TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
    <RESOLUTION_TIME_ACTION>
    ObjectDC():Set_Int(1, 0)
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY internal="1">
    <TRIGGER value="CONTROLLER_CHANGED" simple_qualifier="self" />
    <RESOLUTION_TIME_ACTION>
    ObjectDC():Set_Int(1, 0)
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY internal="1">
    <TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
    return EffectController():MyTurn() ~= 0 and MTG():GetStep() == STEP_UNTAP
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    ObjectDC():Set_Int(1, 1)
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
I'm using ObjectDC's register #1 as a flag that says "no more summoning sickness". It's set to 0 when the creature enters the battlefield or changes controller, and it's set to 1 when the creature's controller starts a turn.

The Image ability will have:
Code: Select all
    <COST type="UntapSelf" />
    <AVAILABILITY>
    return ObjectDC():Get_Int(1) == 1 or
    Object():GetCurrentCharacteristics():Characteristic_Get( CHARACTERISTIC_HASTE ) ~= 0
    </AVAILABILITY>
I can't see any flaw in this, but if you see one, please tell me.
< 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 21 guests


Who is online

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

Login Form