Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk



A little bug with Urborg Stalker.
Moderator: CCGHQ Admins
A little bug with Urborg Stalker.
by 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 > 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.
by 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...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
Re: A little bug with Urborg Stalker.
by RiiakShiNal » 04 Aug 2012, 21:06
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.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.
So the question becomes who is the controller of the non-black aura on your creature that is causing you to take 1 damage?
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: A little bug with Urborg Stalker.
by alexandreonly » 04 Aug 2012, 21:26
My opponent is the controller of the aura.RiiakShiNal wrote: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.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.
So the question becomes who is the controller of the non-black aura on your creature that is causing you to take 1 damage?
- alexandreonly
- Posts: 145
- Joined: 04 Jul 2011, 17:27
- Has thanked: 0 time
- Been thanked: 8 times
Re: A little bug with Urborg Stalker.
by RiiakShiNal » 04 Aug 2012, 22:35
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:alexandreonly wrote:My opponent is the controller of the aura.
- 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 > 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 > 0 then
player:DealDamage( 1, Object() )
end
end
</RESOLUTION_TIME_ACTION>
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: A little bug with Urborg Stalker.
by alexandreonly » 05 Aug 2012, 00:13
It's working fine now with your solution. ThanksRiiakShiNal wrote: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:alexandreonly wrote:My opponent is the controller of the aura.
- 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 > 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 > 0 then
player:DealDamage( 1, Object() )
end
end
</RESOLUTION_TIME_ACTION>
- alexandreonly
- Posts: 145
- Joined: 04 Jul 2011, 17:27
- Has thanked: 0 time
- Been thanked: 8 times
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 21 guests