Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Programming Talk
Untap cost and summoning sickness
Moderator: CCGHQ Admins
Untap cost and summoning sickness
by thefiremind » 14 May 2013, 11:28
I have never tried to code a card with the 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...
Let's quote the rules for reference:
The ability will have:
So if we want to code a creature with the cost, we need to manage the summoning sickness manually.Gatherer wrote:The "summoning sickness" rule applies to . If a creature with an 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.
Let's quote the rules for reference:
This is how I would do it: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.
- 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>
The 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>
< 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 12 guests