Page 1 of 1

A little bug with Urborg Stalker.

PostPosted: 04 Aug 2012, 19:59
by alexandreonly
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>

Re: A little bug with Urborg Stalker.

PostPosted: 04 Aug 2012, 20:55
by thefiremind
Did you try with SetPlayer instead of SetController? It should be the same in this case, but who knows...

Re: A little bug with Urborg Stalker.

PostPosted: 04 Aug 2012, 21:06
by RiiakShiNal
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?

Re: A little bug with Urborg Stalker.

PostPosted: 04 Aug 2012, 21:26
by alexandreonly
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.

Re: A little bug with Urborg Stalker.

PostPosted: 04 Aug 2012, 22:35
by RiiakShiNal
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>

Re: A little bug with Urborg Stalker.

PostPosted: 05 Aug 2012, 00:13
by alexandreonly
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