It is currently 26 Apr 2024, 16:05
   
Text Size

A little bug with Urborg Stalker.

Moderator: CCGHQ Admins

A little bug with Urborg Stalker.

Postby alexandreonly » 04 Aug 2012, 19:59

It work fine, but when one of my creatures is enchanted with any nonblack aura, Urborg Stalker cause the 1 damage in me too.

Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="URBORG_STALKER_4473" />
  <CARDNAME text="URBORG_STALKER" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Urborg Stalker]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Urborg Stalker]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Urborg Stalker]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Urborg Stalker]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Urborg Stalker]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Urborg Stalker]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Urborg Stalker]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Urborg Stalker]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Urborg Stalker]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="4473" />
  <ARTID value="4473" />
  <ARTIST name="Cliff Nielsen" />
  <CASTING_COST cost="{3}{B}" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“May you be a stalker’s dream.”
Urborg curse]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[“May you be a stalker’s dream.”
Urborg curse]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“May you be a stalker’s dream.”
Urborg curse]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[“May you be a stalker’s dream.”
Urborg curse]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“May you be a stalker’s dream.”
Urborg curse]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[“May you be a stalker’s dream.”
Urborg curse]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“May you be a stalker’s dream.”
Urborg curse]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[“May you be a stalker’s dream.”
Urborg curse]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“May you be a stalker’s dream.”
Urborg curse]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Horror" />
  <EXPANSION value="DPG" />
  <RARITY metaname="R" />
  <POWER value="2" />
  <TOUGHNESS value="4" />
  <TRIGGERED_ABILITY filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of each player’s upkeep, if that player controls a nonblack, nonland permanent, Urborg Stalker deals 1 damage to that player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[At the beginning of each player’s upkeep, if that player controls a nonblack, nonland permanent, Urborg Stalker deals 1 damage to that player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[At the beginning of each player’s upkeep, if that player controls a nonblack, nonland permanent, Urborg Stalker deals 1 damage to that player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[At the beginning of each player’s upkeep, if that player controls a nonblack, nonland permanent, Urborg Stalker deals 1 damage to that player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[At the beginning of each player’s upkeep, if that player controls a nonblack, nonland permanent, Urborg Stalker deals 1 damage to that player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[At the beginning of each player’s upkeep, if that player controls a nonblack, nonland permanent, Urborg Stalker deals 1 damage to that player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of each player’s upkeep, if that player controls a nonblack, nonland permanent, Urborg Stalker deals 1 damage to that player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[At the beginning of each player’s upkeep, if that player controls a nonblack, nonland permanent, Urborg Stalker deals 1 damage to that player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[At the beginning of each player’s upkeep, if that player controls a nonblack, nonland permanent, Urborg Stalker deals 1 damage to that player.]]></LOCALISED_TEXT>
    <TRIGGER value="BEGINNING_OF_STEP">
    return ( MTG():GetStep() == STEP_UPKEEP and TriggerPlayer():MyTurn() ~= 0 )
    </TRIGGER>
   <RESOLUTION_TIME_ACTION>
    local total = 0
    local filter = Object():GetFilter()
   local player = TriggerPlayer()
    filter:Clear()
   filter:SetController( player )
    filter:SetZone( ZONE_IN_PLAY )
    filter:AddCardType( CARD_TYPE_LAND )
   filter:AddColour( COLOUR_BLACK )
   filter:AddExtra( FILTER_EXTRA_FLIP_COLOUR )
   filter:AddExtra( FILTER_EXTRA_FLIP_CARD_TYPES )
    filter:NotTargetted()
    total = filter:CountStopAt( 1 ) 
   if total &gt; 0 then
      player:DealDamage( 1, Object() )
   end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <SFX text="COMBAT_CLAW_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_CLAW_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
alexandreonly
 
Posts: 145
Joined: 04 Jul 2011, 17:27
Has thanked: 0 time
Been thanked: 8 times

Re: A little bug with Urborg Stalker.

Postby thefiremind » 04 Aug 2012, 20:55

Did you try with SetPlayer instead of SetController? It should be the same in this case, but who knows...
< 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

Re: A little bug with Urborg Stalker.

Postby RiiakShiNal » 04 Aug 2012, 21:06

alexandreonly wrote:It work fine, but when one of my creatures is enchanted with any nonblack aura, Urborg Stalker cause the 1 damage in me too.
If you are the controller of the non-black aura then you should be on the receiving end of the 1 damage. An Aura is a non-land permanent.

So the question becomes who is the controller of the non-black aura on your creature that is causing you to take 1 damage?
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: A little bug with Urborg Stalker.

Postby alexandreonly » 04 Aug 2012, 21:26

RiiakShiNal wrote:
alexandreonly wrote:It work fine, but when one of my creatures is enchanted with any nonblack aura, Urborg Stalker cause the 1 damage in me too.
If you are the controller of the non-black aura then you should be on the receiving end of the 1 damage. An Aura is a non-land permanent.

So the question becomes who is the controller of the non-black aura on your creature that is causing you to take 1 damage?
My opponent is the controller of the aura.
alexandreonly
 
Posts: 145
Joined: 04 Jul 2011, 17:27
Has thanked: 0 time
Been thanked: 8 times

Re: A little bug with Urborg Stalker.

Postby RiiakShiNal » 04 Aug 2012, 22:35

alexandreonly wrote:My opponent is the controller of the aura.
In that case maybe there is a bug in the filter so you could try checking the controller on the card itself and see if that helps, like this:
Code: Select all
   <RESOLUTION_TIME_ACTION>
      local total = 0
      local filter = Object():GetFilter()
      local player = TriggerPlayer()
      filter:Clear()
      filter:SetController( player )
      filter:SetZone( ZONE_IN_PLAY )
      filter:AddCardType( CARD_TYPE_LAND )
      filter:AddColour( COLOUR_BLACK )
      filter:AddExtra( FILTER_EXTRA_FLIP_COLOUR )
      filter:AddExtra( FILTER_EXTRA_FLIP_CARD_TYPES )
      filter:NotTargetted()
      local count = filter:EvaluateObjects()
      if (count &gt; 0) then
         for i=0,count-1 do
            local card = filter:GetNthEvaluatedObject(i)
            if (card:GetController() == player) then
               total = total + 1
            end
         end
         if total &gt; 0 then
            player:DealDamage( 1, Object() )
         end
      end
   </RESOLUTION_TIME_ACTION>
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: A little bug with Urborg Stalker.

Postby alexandreonly » 05 Aug 2012, 00:13

RiiakShiNal wrote:
alexandreonly wrote:My opponent is the controller of the aura.
In that case maybe there is a bug in the filter so you could try checking the controller on the card itself and see if that helps, like this:
Code: Select all
   <RESOLUTION_TIME_ACTION>
      local total = 0
      local filter = Object():GetFilter()
      local player = TriggerPlayer()
      filter:Clear()
      filter:SetController( player )
      filter:SetZone( ZONE_IN_PLAY )
      filter:AddCardType( CARD_TYPE_LAND )
      filter:AddColour( COLOUR_BLACK )
      filter:AddExtra( FILTER_EXTRA_FLIP_COLOUR )
      filter:AddExtra( FILTER_EXTRA_FLIP_CARD_TYPES )
      filter:NotTargetted()
      local count = filter:EvaluateObjects()
      if (count &gt; 0) then
         for i=0,count-1 do
            local card = filter:GetNthEvaluatedObject(i)
            if (card:GetController() == player) then
               total = total + 1
            end
         end
         if total &gt; 0 then
            player:DealDamage( 1, Object() )
         end
      end
   </RESOLUTION_TIME_ACTION>
It's working fine now with your solution. Thanks
alexandreonly
 
Posts: 145
Joined: 04 Jul 2011, 17:27
Has thanked: 0 time
Been thanked: 8 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 27 guests


Who is online

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

Login Form