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



Talk about new cards here
Moderator: CCGHQ Admins
Re: Talk about new cards here
by RiiakShiNal » 26 May 2013, 13:25
Planes are stored in the CARDS directory along with all other cards. If you want to find all the planes you have installed relatively quickly and you have my deck builder you could always just set the filter to only show planes. Once you find the one you are looking for just right-click on it and choose "View Card" and it will give you the source of the card.
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: Talk about new cards here
by thefiremind » 26 May 2013, 13:31
EDIT: forget what I wrote earlier in this place: I only made a typo: isAI instead of IsAI (the first "i" needs to be capital).BloodReyvyn wrote:The script log says this about 4 times.
[lua] [string "TEMPORAL_EXTORTION_126814_TITLE (RESOLUTION_TIME_ACTION) [2566]"]:8: attempt to call method 'isAI' (a nil value)
Planechase cards are inside the WADs that end with "_PC" (just a convention, nothing carved on stone). You might have my custom WAD together with the original one. Anyway exchanging life totals is quite easy:BloodReyvyn wrote:Ummm by the way, where are the Planechase cards saved? I know one of them allows you to exchange life totals with an opponent during your upkeep, which is very similar to the Magus, so I was just gonna alter that code to save time.
- Code: Select all
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if target ~= nil then
local my_life = EffectController():GetLifeTotal()
local target_life = target:GetLifeTotal()
EffectController():SetLifeTotal( target_life )
target:SetLifeTotal( my_life )
end
</RESOLUTION_TIME_ACTION>

Last edited by thefiremind on 26 May 2013, 13:51, edited 1 time in total.
< 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: Talk about new cards here
by BloodReyvyn » 26 May 2013, 13:38
Will definitely check that out once I am home. I was just reading the thread. Looks cool, now maybe more people can build decks... and assuming all goes well, it will definitely speed up the deck building process as I have just been coding the XMLs myself (which is fairly straight-forward as far as just building a deck with other peoples' cards, but I can see a lot of people who aren't very computer-savvy being intimidated by anything having to do with writing any actual code).
I will change that when I get home, thefiremind, I have 2 hours left here unless I get done early (fat chance). I used my dropbox this morning to move a couple files so I could post while I am on break... kinda popping in and out of here when my manager isn't around. The admins here are pretty lenient about doing a few personal things here and there, but I can't really install steam or DotP. Not sure they's like that much...
Anyway, that above code is so much simpler than what I was doing... lol I will use that instead. I was totally over-complicating it (such as my brain works most of the time).
I will change that when I get home, thefiremind, I have 2 hours left here unless I get done early (fat chance). I used my dropbox this morning to move a couple files so I could post while I am on break... kinda popping in and out of here when my manager isn't around. The admins here are pretty lenient about doing a few personal things here and there, but I can't really install steam or DotP. Not sure they's like that much...

Anyway, that above code is so much simpler than what I was doing... lol I will use that instead. I was totally over-complicating it (such as my brain works most of the time).
"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
-
BloodReyvyn - Posts: 421
- Joined: 19 May 2013, 13:29
- Has thanked: 53 times
- Been thanked: 40 times
Re: Talk about new cards here
by RiiakShiNal » 26 May 2013, 13:49
Agreed, building deck XML is pretty straight-forward, which is why a good deck building utility can be coded. That is also probably why there will be a lot of people who won't even bother with the utility. Well, that and the fact that DotP 2014 is coming out soon.
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: Talk about new cards here
by BloodReyvyn » 26 May 2013, 13:59
Sweet, got off early since a coworker needed some more hours and offered to take the rest of my shift... Off off and away... bbl
EDIT: So, I am home and tested Stuffy Doll, only have one issue with it. The only code that seems not to be working is the "Select an Opponent" part. He's Indestructible, can deal damage to himself, and I can assume he attempted to deal damage to the "chosen" player, except that I never got to choose a player.
As far as the Temporal Extortion, that fixed it.
Now my script log doesn't like Stuffy Doll, saying there is an "then missing near return." Did I miss a then statement somewhere? If so, I am totally overlooking it....
EDIT: So, I am home and tested Stuffy Doll, only have one issue with it. The only code that seems not to be working is the "Select an Opponent" part. He's Indestructible, can deal damage to himself, and I can assume he attempted to deal damage to the "chosen" player, except that I never got to choose a player.
As far as the Temporal Extortion, that fixed it.

Now my script log doesn't like Stuffy Doll, saying there is an "then missing near return." Did I miss a then statement somewhere? If so, I am totally overlooking it....
"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
-
BloodReyvyn - Posts: 421
- Joined: 19 May 2013, 13:29
- Has thanked: 53 times
- Been thanked: 40 times
Re: Talk about new cards here
by BloodReyvyn » 26 May 2013, 15:42
Sorry for double posting, but yeah my Stuffy Doll is having issues.
I found the missing "then" in the opponent selection code... then re-read the card... I always thought it said opponent, but it says player...
Fixed the then and tested it just to see if I could even target an opponent, but no love there. Obviously, I coded it wrong and am just missing the whole point, probably because I cannibalized code from The Rack...
I found the missing "then" in the opponent selection code... then re-read the card... I always thought it said opponent, but it says player...

Fixed the then and tested it just to see if I could even target an opponent, but no love there. Obviously, I coded it wrong and am just missing the whole point, probably because I cannibalized code from The Rack...
"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
-
BloodReyvyn - Posts: 421
- Joined: 19 May 2013, 13:29
- Has thanked: 53 times
- Been thanked: 40 times
Re: Talk about new cards here
by thefiremind » 26 May 2013, 15:52
Looking at your new code would definitely help...
anyway, did you remember to remove the SetOwner from the filter? It's needed only when you filter opponents (it probably stands there to tell "whose opponent you need").

< 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: Talk about new cards here
by BloodReyvyn » 26 May 2013, 15:58
Whoops, I copied the text but didn't paste it... Apparently I am in fail mode today 

- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2>
<FILENAME text="STUFFY_DOLL_279711" />
<CARDNAME text="STUFFY_DOLL" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Stuffy Doll]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Poupée de son]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Muñeca de trapo]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Ausgestopfte Puppe]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Bambola di Pezza]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ぬいぐるみ人形]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[푹신한 인형]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Мягкая Кукла]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Boneco Empalhado]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="279711" />
<ARTID value="A279711" />
<ARTIST name="David Rapoza" />
<CASTING_COST cost="{5}" />
<TYPE metaname="Artifact" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Construct" />
<EXPANSION value="M13" />
<RARITY metaname="R" />
<POWER value="0" />
<TOUGHNESS value="1" />
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Stuffy Doll enters the battlefield, choose a player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quand la Poupée de son arrive sur le champ de bataille, choisissez un joueur.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[En cuanto la Muñeca de trapo entre al campo de batalla, elige un jugador.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sowie die Ausgestopfte Puppe ins Spiel kommt, bestimme einen Spieler.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mentre la Bambola di Pezza entra nel campo di battaglia, scegli un giocatore.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ぬいぐるみ人形が戦場に出るに際し、プレイヤーを1人選ぶ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[푹신한 인형이 전장에 들어올 시에, 플레이어 한 명을 선택한다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[При выходе Мягкой Куклы на поле битвы выберите игрока.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conforme Boneco Empalhado entra no campo de batalha, escolha um jogador.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:SetFilterType( FILTER_TYPE_PLAYERS )
filter:SetOwner( EffectController() )
filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
filter:NotTargetted()
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION target_choosing="1">
EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_PLAYER", EffectDC():Make_Targets(0) )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
local delayDC = EffectDC():Make_Chest(1)
delayDC:Set_PlayerPtr(0, player)
MTG():CreateDelayedTrigger(1, delayDC)
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
EffectDC():Protect_CardPtr( COMPARTMENT_ID_EFFECT_SOURCE )
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="0">
local player = ObjectDC():Get_PlayerPtr(0)
if player ~= nil then
player:AddBadge(PLAYER_BADGE_ICON_CHOSEN_PLAYER, "PLAYER_CHOSEN_ICON")
end
</CONTINUOUS_ACTION>
<DURATION>
return (EffectSource() == nil)
</DURATION>
</TRIGGERED_ABILITY>
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Stuffy Doll is indestructible.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[La Poupée de son est indestructible.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[La Muñeca de trapo es indestructible.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Die Ausgestopfte Puppe ist unzerstörbar.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La Bambola di Pezza è indistruttibile.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ぬいぐるみ人形は破壊されない。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[푹신한 인형은 파괴될 수 없다. 푹신한 인형이 피해를 입을 때마다, 푹신한 인형은 선택한 플레이어에게 그만큼의 피해를 입힌다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Мягкая Кукла не может быть уничтожена.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Boneco Empalhado é indestrutível.]]></LOCALISED_TEXT>
<CONTINUOUS_ACTION>
local characteristics = Object():GetCurrentCharacteristics()
characteristics:Characteristic_Set( CHARACTERISTIC_INDESTRUCTIBLE, 1 )
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Stuffy Doll is dealt damage, it deals that much damage to the chosen player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que des blessures sont infligées à la Poupée de son, elle inflige autant de blessures au joueur choisi.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que la Muñeca de trapo reciba daño, esta le hace esa misma cantidad de daño al jugador elegido.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn der Ausgestopften Puppe Schaden zugefügt wird, fügt sie dem bestimmten Spieler ebenso viele Schadenspunkte zu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta viene inflitto danno alla Bambola di Pezza, essa infligge altrettanti danni al giocatore scelto.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ぬいぐるみ人形にダメージが与えられるたび、それはその点数に等しい点数のダメージを選ばれたプレイヤーに与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: 푹신한 인형은 스스로에게 피해 1점을 입힌다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда Мягкой Кукле наносятся повреждения, она наносит столько же повреждений выбранному игроку.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que Boneco Empalhado sofre dano, ele causa uma quantidade equivalente de dano ao jogador escolhido. ]]></LOCALISED_TEXT>
<TRIGGER value="CREATURE_TOOK_DAMAGE" simple_qualifier="self">
EffectDC():Set_CardPtr(2, SecondaryObject())
EffectDC():LKIShield_CardPtr(2)
local chosen_opponent = ObjectDC():Get_PlayerPtr(0)
if chosen_opponent ~= nil then
return true
else
return false
end
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local chosen_opponent = ObjectDC():Get_PlayerPtr(0)
local source = EffectSource()
if source == nil then
source = Object()
end
if chosen_opponent ~= nil then
local damage = GetDamageDealt( self )
if damage > 0 then
chosen_opponent:DealDamage( damage, source )
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Stuffy Doll deals 1 damage to itself.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T} : La Poupée de son s’inflige 1 blessure.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: La Muñeca de trapo se hace 1 punto de daño a sí misma.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Die Ausgestopfte Puppe fügt sich selber 1 Schadenspunkt zu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: La Bambola di Pezza infligge 1 danno a sé stessa.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:ぬいぐるみ人形は自身に1点のダメージを与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: Stuffy Doll deals 1 damage to itself.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: Мягкая Кукла наносит 1 повреждение сама себе.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Boneco Empalhado causa 1 ponto de dano a si mesmo.]]></LOCALISED_TEXT>
<COST type="TapSelf" />
<RESOLUTION_TIME_ACTION>
local source = EffectSource()
if source == nil then
source = Object()
end
source:DealDamage(1, source)
</RESOLUTION_TIME_ACTION>
<AI_AVAILABILITY type="in_response" />
<AI_AVAILABILITY step="begin_combat" turn="their_turn" />
<AI_AVAILABILITY step="main_1" turn="my_turn" />
<AI_AVAILABILITY step="declare_attackers" turn="their_turn" />
<AI_AVAILABILITY step="declare_blockers" />
<AI_AVAILABILITY step="end_of_turn" />
<SFX text="TARGET_LIGHTNING_PLAY" />
</ACTIVATED_ABILITY>
<SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
Last edited by BloodReyvyn on 26 May 2013, 16:14, edited 1 time in total.
"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
-
BloodReyvyn - Posts: 421
- Joined: 19 May 2013, 13:29
- Has thanked: 53 times
- Been thanked: 40 times
Re: Talk about new cards here
by thefiremind » 26 May 2013, 16:09
I can't see anything wrong (if removing SetOwner didn't help), but maybe I'm just missing something.
Anyway, when you paste real code, [ code] is better than [ spoiler] because it keeps the indentation. If you really want to save space, you can always do [ spoiler][ code]the code[ /code][ /spoiler].
Anyway, when you paste real code, [ code] is better than [ spoiler] because it keeps the indentation. If you really want to save space, you can always do [ spoiler][ code]the code[ /code][ /spoiler].
< 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: Talk about new cards here
by BloodReyvyn » 26 May 2013, 16:42
Changed it to code... Not sure what is missing 'cuz that code seems to do nothing at all
"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
-
BloodReyvyn - Posts: 421
- Joined: 19 May 2013, 13:29
- Has thanked: 53 times
- Been thanked: 40 times
Re: Talk about new cards here
by thefiremind » 26 May 2013, 18:03
Now that I look better into it, you didn't put the right tags on the "As Stuffy Doll enters the battlefield..." triggered ability. If you look at Sewer Nemesis, which is similar, you'll find this:
- Code: Select all
<TRIGGERED_ABILITY pre_trigger="1" replacement_query="1" active_zone="ZONE_TRANSITION">
< 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: Talk about new cards here
by BloodReyvyn » 26 May 2013, 18:34
hmmm that did something, but now the game crashes when I try to start a match. I tried removing each tag one by one, but until I removed them all it would either "Stop Working" via windows error window, or crash to desktop with "Fatal Error: An unknown error occurred." message...
Weird since I even copied the exact code from Sewer Nemesis directly, since it is supposed to do exactly the same thing, and that code crashes as well.
Really stumped on this one...
Thanks for all the help anyway.

Weird since I even copied the exact code from Sewer Nemesis directly, since it is supposed to do exactly the same thing, and that code crashes as well.
Really stumped on this one...

Thanks for all the help anyway.

"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
-
BloodReyvyn - Posts: 421
- Joined: 19 May 2013, 13:29
- Has thanked: 53 times
- Been thanked: 40 times
Re: Talk about new cards here
by thefiremind » 26 May 2013, 18:42
I think I understood now... you are setting a delayed trigger that is nowhere to be found. There's another triggered ability on Sewer Nemesis that you didn't copy:
- Code: Select all
<TRIGGERED_ABILITY internal="1" resource_id="1" active_zone="ZONE_IN_PLAY">
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
<CLEANUP fire_once="1" />
<RESOLUTION_TIME_ACTION>
ObjectDC():Set_PlayerPtr(0, EffectDC():Get_PlayerPtr(0))
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
< 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: Talk about new cards here
by BloodReyvyn » 26 May 2013, 18:55
](./images/smilies/eusa_wall.gif)
I am officially starting to hate this card...
NEVERMIND, I put the tags in the wrong place. Finally got the select a character part working, although it does no damage to the chosen player after being dealt damage... The effect triggers, but no damage gets dealt. Gonna see if I can find out why.
Nope... I'm so done with this card today, sick of looking at it, just done for now.

I tried recoding the damage to chosen player part about 3 times now and it doesn't do a thing. Maybe I'll try again tonight, but I been staring down code for too long today and my eyes and head are killin' me.
Here's the code as it stands now:
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2>
<FILENAME text="STUFFY_DOLL_279711" />
<CARDNAME text="STUFFY_DOLL" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Stuffy Doll]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Poupée de son]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Muñeca de trapo]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Ausgestopfte Puppe]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Bambola di Pezza]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ぬいぐるみ人形]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[푹신한 인형]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Мягкая Кукла]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Boneco Empalhado]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="279711" />
<ARTID value="A279711" />
<ARTIST name="David Rapoza" />
<CASTING_COST cost="{5}" />
<TYPE metaname="Artifact" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Construct" />
<EXPANSION value="M13" />
<RARITY metaname="R" />
<POWER value="0" />
<TOUGHNESS value="1" />
<TRIGGERED_ABILITY pre_trigger="1" replacement_query="1" active_zone="ZONE_TRANSITION">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Stuffy Doll enters the battlefield, choose a player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quand la Poupée de son arrive sur le champ de bataille, choisissez un joueur.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[En cuanto la Muñeca de trapo entre al campo de batalla, elige un jugador.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sowie die Ausgestopfte Puppe ins Spiel kommt, bestimme einen Spieler.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mentre la Bambola di Pezza entra nel campo di battaglia, scegli un giocatore.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ぬいぐるみ人形が戦場に出るに際し、プレイヤーを1人選ぶ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[푹신한 인형이 전장에 들어올 시에, 플레이어 한 명을 선택한다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[При выходе Мягкой Куклы на поле битвы выберите игрока.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conforme Boneco Empalhado entra no campo de batalha, escolha um jogador.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:SetFilterType( FILTER_TYPE_PLAYERS )
filter:NotTargetted()
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION target_choosing="1">
EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_PLAYER", EffectDC():Make_Targets(0) )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
local delayDC = EffectDC():Make_Chest(1)
delayDC:Set_PlayerPtr(0, player)
MTG():CreateDelayedTrigger(1, delayDC)
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
EffectDC():Protect_CardPtr( COMPARTMENT_ID_EFFECT_SOURCE )
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="0">
local player = ObjectDC():Get_PlayerPtr(0)
if player ~= nil then
player:AddBadge(PLAYER_BADGE_ICON_CHOSEN_PLAYER, "PLAYER_CHOSEN_ICON")
end
</CONTINUOUS_ACTION>
<DURATION>
return (EffectSource() == nil)
</DURATION>
</TRIGGERED_ABILITY>
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Stuffy Doll is indestructible.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[La Poupée de son est indestructible.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[La Muñeca de trapo es indestructible.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Die Ausgestopfte Puppe ist unzerstörbar.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La Bambola di Pezza è indistruttibile.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ぬいぐるみ人形は破壊されない。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[푹신한 인형은 파괴될 수 없다. 푹신한 인형이 피해를 입을 때마다, 푹신한 인형은 선택한 플레이어에게 그만큼의 피해를 입힌다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Мягкая Кукла не может быть уничтожена.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Boneco Empalhado é indestrutível.]]></LOCALISED_TEXT>
<CONTINUOUS_ACTION>
local characteristics = Object():GetCurrentCharacteristics()
characteristics:Characteristic_Set( CHARACTERISTIC_INDESTRUCTIBLE, 1 )
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Stuffy Doll is dealt damage, it deals that much damage to the chosen player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que des blessures sont infligées à la Poupée de son, elle inflige autant de blessures au joueur choisi.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que la Muñeca de trapo reciba daño, esta le hace esa misma cantidad de daño al jugador elegido.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn der Ausgestopften Puppe Schaden zugefügt wird, fügt sie dem bestimmten Spieler ebenso viele Schadenspunkte zu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta viene inflitto danno alla Bambola di Pezza, essa infligge altrettanti danni al giocatore scelto.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ぬいぐるみ人形にダメージが与えられるたび、それはその点数に等しい点数のダメージを選ばれたプレイヤーに与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: 푹신한 인형은 스스로에게 피해 1점을 입힌다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда Мягкой Кукле наносятся повреждения, она наносит столько же повреждений выбранному игроку.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que Boneco Empalhado sofre dano, ele causa uma quantidade equivalente de dano ao jogador escolhido. ]]></LOCALISED_TEXT>
<TRIGGER value="CREATURE_TOOK_DAMAGE" simple_qualifier="self" />
<RESOLUTION_TIME_ACTION>
local chosen_opponent = ObjectDC():Get_PlayerPtr(0)
local source = EffectSource()
if source == nil then
source = Object()
end
if chosen_opponent ~= nil then
local damage = GetDamageDealt( self )
if damage > 0 then
chosen_opponent:DealDamage( damage, source )
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Stuffy Doll deals 1 damage to itself.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T} : La Poupée de son s’inflige 1 blessure.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: La Muñeca de trapo se hace 1 punto de daño a sí misma.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Die Ausgestopfte Puppe fügt sich selber 1 Schadenspunkt zu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: La Bambola di Pezza infligge 1 danno a sé stessa.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:ぬいぐるみ人形は自身に1点のダメージを与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: Stuffy Doll deals 1 damage to itself.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: Мягкая Кукла наносит 1 повреждение сама себе.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Boneco Empalhado causa 1 ponto de dano a si mesmo.]]></LOCALISED_TEXT>
<COST type="TapSelf" />
<RESOLUTION_TIME_ACTION>
local source = EffectSource()
if source == nil then
source = Object()
end
source:DealDamage(1, source)
</RESOLUTION_TIME_ACTION>
<AI_AVAILABILITY type="in_response" />
<AI_AVAILABILITY step="begin_combat" turn="their_turn" />
<AI_AVAILABILITY step="main_1" turn="my_turn" />
<AI_AVAILABILITY step="declare_attackers" turn="their_turn" />
<AI_AVAILABILITY step="declare_blockers" />
<AI_AVAILABILITY step="end_of_turn" />
<SFX text="TARGET_LIGHTNING_PLAY" />
</ACTIVATED_ABILITY>
<TRIGGERED_ABILITY internal="1" resource_id="1" active_zone="ZONE_IN_PLAY">
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
<CLEANUP fire_once="1" />
<RESOLUTION_TIME_ACTION>
ObjectDC():Set_PlayerPtr(0, EffectDC():Get_PlayerPtr(0))
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>

Last edited by BloodReyvyn on 26 May 2013, 19:24, edited 1 time in total.
"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
-
BloodReyvyn - Posts: 421
- Joined: 19 May 2013, 13:29
- Has thanked: 53 times
- Been thanked: 40 times
Re: Talk about new cards here
by thefiremind » 26 May 2013, 19:24
Not to be untrustful, but I thought it would be good to speed up the process...
viewtopic.php?f=64&t=4557&p=119423#p119423
Your damage replication part was a bit intricated, it's much easier than you imagined.
viewtopic.php?f=64&t=4557&p=119423#p119423
Your damage replication part was a bit intricated, it's much easier than you imagined.

< 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
Who is online
Users browsing this forum: No registered users and 10 guests