Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
2014




Formal Request Thread
Moderator: CCGHQ Admins
Re: Formal Request Thread
by thefiremind » 25 Nov 2013, 20:03
Actually, it's not Lua code syntax, it's just HTML escaping: since <,> are already used for blocks, they need to be "escaped", unless you put the code in a CDATA block that accepts everything. "<" is < ("lower than") and ">" is > ("greater than"). For the "or equal" part, they need an additional "=" ("<=" or ">=").MC Brodie wrote:Also, I'm not very familiar with the operator syntax off hand so if verify that "<" is correct and that it's less than or equal to instead of just less than. I'd check the faithful hour card in the vanilla game.
< 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: Formal Request Thread
by MC Brodie » 25 Nov 2013, 20:25
I see. That's interesting. One day I'll have this modding thing figured out. Thanks for the information.
On a different note, I have the horrible tendency to forget the SFX animation blocks when i make cards for other people (mostly due to the fact i don't pay attention to the animations in game). I'm trying to be better at this though. Are the available animations compiled somewhere or can be easily extracted? Or is my best option to search for then in the deck builder?
On a different note, I have the horrible tendency to forget the SFX animation blocks when i make cards for other people (mostly due to the fact i don't pay attention to the animations in game). I'm trying to be better at this though. Are the available animations compiled somewhere or can be easily extracted? Or is my best option to search for then in the deck builder?
-----------------------------------------------------------------------
Song of the Day: 46 and 2 (cover)
Song of the Day: 46 and 2 (cover)
Re: Formal Request Thread
by NeoAnderson » 25 Nov 2013, 21:09
Thanks i will check later your solution.RiiakShiNal wrote:That can easily be fixed by doing this:This way it no longer complains if there were no creatures in play to become the new target without having to resort to doing a count.
- Code: Select all
local oTarget = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
Thanks you again i will let you know if it works.RiiakShiNal wrote:Well, that can be changed simply by moving the RemoveDelayedTrigger() call to a just before establishing the new triggers. The nils can be fixed by checking to make sure TriggerObject() is not nil or by using TriggerObjectLKI() to ensure you get the last known information.
I think i have to read your documentations about this function to understand how to use it.RiiakShiNal wrote:Well ultimately, whatever works. Though you could get around the issue with LoseAllAbilities() by using a fake characteristic and checking for that in the Delayed Triggers
Nevermind i copied some linkedDC and using a DisplayMessage i have seen that the value is not passed, probably because the spell have is effect into the stack and when change zone to the graveyard the value is already resetted. So It is useless to discuss anymore my idea doesn't work.RiiakShiNal wrote:This one will suffer from problems if someone else casts this spell from your graveyard (there are cards that allow that) as then the information in the LinkedDC() will be overwritten. For example Player A casts the spell on a creature belonging to Player B, Player B then casts the spell from Player A's graveyard on a Creature Player A controls, Player B then attacks, Player B retains control of his creature, but it untaps, Player A taps his creature and Player B gets it.
Last edited by NeoAnderson on 25 Nov 2013, 22:23, edited 1 time in total.
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Formal Request Thread
by daniel473 » 25 Nov 2013, 21:14
Can someone please help me with LICH?
So far i have some work done but the card wont show up for some reason :S
Please help me. Here is what i got so far and i cant test it because it wont show up D:
LICH
So far i have some work done but the card wont show up for some reason :S
Please help me. Here is what i got so far and i cant test it because it wont show up D:
LICH
- Code: Select all
<CARD_V2>
<FILENAME text="LICH_202483" />
<CARDNAME text="LICH" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Lich]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Lich]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Lich]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Lich]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Lich]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Lich]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Lich]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Lich]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Lich]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="202483" />
<ARTID value="202483" />
<ARTIST name="Daniel Gelon" />
<CASTING_COST cost="{0}" />
<TYPE metaname="Enchantment" />
<EXPANSION value="ME4" />
<RARITY metaname="R" />
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[You don’t lose the game for having 0 or less life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[You don’t lose the game for having 0 or less life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[You don’t lose the game for having 0 or less life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[You don’t lose the game for having 0 or less life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[You don’t lose the game for having 0 or less life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[You don’t lose the game for having 0 or less life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[You don’t lose the game for having 0 or less life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[You don’t lose the game for having 0 or less life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[You don’t lose the game for having 0 or less life.]]></LOCALISED_TEXT>
<CONTINUOUS_ACTION layer="8">
local characteristics = EffectController():GetCurrentCharacteristics()
characteristics:Bool_Set( PLAYER_CHARACTERISTIC_DOESNT_DIE_ON_ZERO_LIFE, 1 )
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
<RESOLUTION_TIME_ACTION>
EffectController():SetLifeTotal(0)
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If you would gain life, draw that many cards instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[If you would gain life, draw that many cards instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[If you would gain life, draw that many cards instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[If you would gain life, draw that many cards instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[If you would gain life, draw that many cards instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[If you would gain life, draw that many cards instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[If you would gain life, draw that many cards instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[If you would gain life, draw that many cards instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[If you would gain life, draw that many cards instead.]]></LOCALISED_TEXT>
<TRIGGER value="PLAYER_GAINED_LIFE" simple_qualifier="controller" />
<RESOLUTION_TIME_ACTION>
local amount = GetAmount()
local player = EffectController()
EffectController():DrawCards( GetAmount() )
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever you’re dealt damage, sacrifice that many nontoken permanents. If you can’t, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Whenever you’re dealt damage, sacrifice that many nontoken permanents. If you can’t, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Whenever you’re dealt damage, sacrifice that many nontoken permanents. If you can’t, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Whenever you’re dealt damage, sacrifice that many nontoken permanents. If you can’t, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Whenever you’re dealt damage, sacrifice that many nontoken permanents. If you can’t, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Whenever you’re dealt damage, sacrifice that many nontoken permanents. If you can’t, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever you’re dealt damage, sacrifice that many nontoken permanents. If you can’t, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Whenever you’re dealt damage, sacrifice that many nontoken permanents. If you can’t, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Whenever you’re dealt damage, sacrifice that many nontoken permanents. If you can’t, you lose the game.]]></LOCALISED_TEXT>
<TRIGGER value="PLAYER_LOST_LIFE" simple_qualifier="controller" />
<RESOLUTION_TIME_ACTION>
local amount = GetAmount()
local player = EffectController()
local filter = ClearFilter()
local subfilter = filter:AddSubFilter_Or()
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_PLANESWALKER )
filter:Add( FE_CONTROLLER, OP_IS, player )
player:SetItemCount( amount )
for i = 0,(amount-1) do
player:SetItemPrompt (i, "CARD_QUERY_CHOOSE_PERMANENT_TO_SACRIFICE" )
end
player:ChooseItems( EffectDC():Make_Targets(0) )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local targetDC = EffectDC():Get_Targets(0)
if targetDC ~= nil then
local numTargets = targetDC:Count()
for i = 0,(numTargets-1) do
local target_card = targetDC:Get_CardPtr(i)
if target_card ~= nil then
EffectController():Sacrifice( target_card )
end
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY replacement_effect="1">
<TRIGGER value="ZONECHANGE_END" simple_qualifier="objectyoucontrol" to_zone="ZONE_BATTLEFIELD">
return TriggerObject():GetCardName() == "DARIEN_KING_OF_KJELDOR"
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local delayDC = EffectDC():Make_Chest(1)
local delayDC = EffectDC():Make_Chest(2)
MTG():CreateDelayedTrigger(1, delayDC)
MTG():CreateDelayedTrigger(2, delayDC)
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY replacement_effect="1" resource_id="1" priority="1">
<CLEANUP fire_once="1" />
<TRIGGER value="STATE_BASED_EFFECTS" />
<RESOLUTION_TIME_ACTION>
Object():Exile()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY replacement_effect="1" resource_id="2">
<CLEANUP fire_once="1" />
<TRIGGER value="STATE_BASED_EFFECTS" />
<RESOLUTION_TIME_ACTION>
Object():PutOntoBattlefield( EffectController() )
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Lich is put into a graveyard from the battlefield, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[When Lich is put into a graveyard from the battlefield, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[When Lich is put into a graveyard from the battlefield, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[When Lich is put into a graveyard from the battlefield, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[When Lich is put into a graveyard from the battlefield, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[When Lich is put into a graveyard from the battlefield, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When Lich is put into a graveyard from the battlefield, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[When Lich is put into a graveyard from the battlefield, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[When Lich is put into a graveyard from the battlefield, you lose the game.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="self" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_BATTLEFIELD" />
<RESOLUTION_TIME_ACTION>
player:LoseGame()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
</CARD_V2>
Re: Formal Request Thread
by thefiremind » 25 Nov 2013, 23:33
I'm not sure if I understood what you mean... do you want to look at the animations from outside the game so that you can choose which one is best suitable for a card? There's no way to do that, as far as I know. Most animation names are pretty self-explanatory (blunt, fireball, blade, etc.), about the other ones, you should look at them while playing.MC Brodie wrote:Are the available animations compiled somewhere or can be easily extracted? Or is my best option to search for then in the deck builder?
Try to use this for troubleshooting. I'm guessing that the first point is the one you need. Your XML apparently doesn't have special characters, but the "graceful" quote (’) is probably treated as such.daniel473 wrote:Can someone please help me with LICH?
So far i have some work done but the card wont show up for some reason :S
Please help me. Here is what i got so far and i cant test it because it wont show up D:
< 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: Formal Request Thread
by daniel473 » 26 Nov 2013, 14:09
Ok i got the card. i cast it ok and it goes well. Lose 20 life didnt instantly lose the game while lost the life. Except now i have to sacrifice 20 permanents. When i sacrifice lich i lose the game so thats working aswell. I changed the lost life trigger to damage. But didnt work. ok heres what i have:
As Lich enters the battlefield, you lose life equal to your life total.
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" damage_type="all">
ignore this trigger:
EffectController():SetLifeTotal(0)
can i change the all?
As Lich enters the battlefield, you lose life equal to your life total.
- Code: Select all
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
<RESOLUTION_TIME_ACTION>
EffectController():SetLifeTotal(0)
</RESOLUTION_TIME_ACTION>
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" damage_type="all">
<RESOLUTION_TIME_ACTION>
local amount = GetAmount()
local player = EffectController()
local filter = ClearFilter()
local subfilter = filter:AddSubFilter_Or()
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_PLANESWALKER )
filter:Add( FE_CONTROLLER, OP_IS, player )
player:SetItemCount( amount )
for i = 0,(amount-1) do
player:SetItemPrompt (i, "CARD_QUERY_CHOOSE_PERMANENT_TO_SACRIFICE" )
end
player:ChooseItems( EffectDC():Make_Targets(0) )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local targetDC = EffectDC():Get_Targets(0)
if targetDC ~= nil then
local numTargets = targetDC:Count()
for i = 0,(numTargets-1) do
local target_card = targetDC:Get_CardPtr(i)
if target_card ~= nil then
EffectController():Sacrifice( target_card )
end
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY replacement_effect="1">
<TRIGGER value="ZONECHANGE_END" simple_qualifier="objectyoucontrol" to_zone="ZONE_BATTLEFIELD">
return TriggerObject():GetCardName() == "DARIEN_KING_OF_KJELDOR"
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local delayDC = EffectDC():Make_Chest(1)
local delayDC = EffectDC():Make_Chest(2)
MTG():CreateDelayedTrigger(1, delayDC)
MTG():CreateDelayedTrigger(2, delayDC)
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY replacement_effect="1" resource_id="1" priority="1">
<CLEANUP fire_once="1" />
<TRIGGER value="STATE_BASED_EFFECTS" />
<RESOLUTION_TIME_ACTION>
Object():Exile()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY replacement_effect="1" resource_id="2">
<CLEANUP fire_once="1" />
<TRIGGER value="STATE_BASED_EFFECTS" />
<RESOLUTION_TIME_ACTION>
Object():PutOntoBattlefield( EffectController() )
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" damage_type="all">
ignore this trigger:
EffectController():SetLifeTotal(0)
can i change the all?
Re: Formal Request Thread
by thefiremind » 26 Nov 2013, 14:42
This happens because the first trigger of the card says "As Lich enters the battlefield" and not "When Lich enters the battlefield". The difference is that "As" triggers should happen before the card actually enters the battlefield.daniel473 wrote:Ok i got the card. i cast it ok and it goes well. Lose 20 life didnt instantly lose the game while lost the life. Except now i have to sacrifice 20 permanents.
You need to make the trigger work in ZONE_TRANSITION:
- Code: Select all
<TRIGGERED_ABILITY active_zone="ZONE_TRANSITION" replacement_effect="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
...
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
...
< 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: Formal Request Thread
by NeoAnderson » 26 Nov 2013, 14:58
You could try in this way but i haven't tested so just try,daniel473 wrote: I need to kinda let this trigger:
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" damage_type="all">
ignore this trigger:
EffectController():SetLifeTotal(0)
can i change the all?
Adding a linked_ability group and setting a variable to 1 when it comes onto battelfield, then excluding the effect into the trigger when this variable is 1, just resetting it to 0.
- Code: Select all
<TRIGGERED_ABILITY linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
<RESOLUTION_TIME_ACTION>
LinkedDC():Int_Set( 1, 1 )
EffectController():SetLifeTotal(0)
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
- Code: Select all
<TRIGGERED_ABILITY linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Whenever youre dealt damage, sacrifice that many nontoken permanents. If you cant, you lose the game.]]></LOCALISED_TEXT>
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" damage_type="all" />
<RESOLUTION_TIME_ACTION>
if LinkedDC():Int_Get(1) == 1 then
LinkedDC():Int_Set( 1, 0 )
else
local amount = GetAmount()
local player = EffectController()
local filter = ClearFilter()
local subfilter = filter:AddSubFilter_Or()
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_PLANESWALKER )
filter:Add( FE_CONTROLLER, OP_IS, player )
player:SetItemCount( amount )
for i = 0,(amount-1) do
player:SetItemPrompt (i, "CARD_QUERY_CHOOSE_PERMANENT_TO_SACRIFICE" )
end
player:ChooseItems( EffectDC():Make_Targets(0) )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local targetDC = EffectDC():Get_Targets(0)
if targetDC ~= nil then
local numTargets = targetDC:Count()
for i = 0,(numTargets-1) do
local target_card = targetDC:Get_CardPtr(i)
if target_card ~= nil then
EffectController():Sacrifice( target_card )
end
end
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY replacement_effect="1">
<TRIGGER value="ZONECHANGE_END" simple_qualifier="objectyoucontrol" to_zone="ZONE_BATTLEFIELD">
return TriggerObject():GetCardName() == "DARIEN_KING_OF_KJELDOR"
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local delayDC = EffectDC():Make_Chest(1)
local delayDC = EffectDC():Make_Chest(2)
MTG():CreateDelayedTrigger(1, delayDC)
MTG():CreateDelayedTrigger(2, delayDC)
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY replacement_effect="1" resource_id="1" priority="1">
<CLEANUP fire_once="1" />
<TRIGGER value="STATE_BASED_EFFECTS" />
<RESOLUTION_TIME_ACTION>
Object():Exile()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY replacement_effect="1" resource_id="2">
<CLEANUP fire_once="1" />
<TRIGGER value="STATE_BASED_EFFECTS" />
<RESOLUTION_TIME_ACTION>
Object():PutOntoBattlefield( EffectController() )
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Formal Request Thread
by drleg3nd » 26 Nov 2013, 21:37
hey all can someone chk this out to see if it's good :
- Tymaret, The Murder King | Open
- Code: Select all
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{R}, Sacrifice another creature: Tymaret, the Murder King deals 2 damage to target player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{R}, sacrifiez une autre créature : Tymaret, le Roi assassin inflige 2 blessures au joueur ciblé.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{R}, sacrificar otra criatura: Tymaret, el rey asesino hace 2 puntos de daño al jugador objetivo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{R}, opfere eine andere Kreatur: Tymaret, der mordende König, fügt einem Spieler deiner Wahl 2 Schadenspunkte zu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{R}, Sacrifica un’altra creatura: Tymaret, il Re dell’Omicidio infligge 2 danni a un giocatore bersaglio.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{R}, 他のクリーチャーを1体生け贄に捧げる:プレイヤー1人を対象とする。殺人王、ティマレットはそのプレイヤーに2点のダメージを与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{R}, 다른 생물 한 개를 희생한다: 플레이어 한 명을 목표로 정한다. 살육의 왕 티마렛은 그 플레이어에게 피해 2점을 입힌다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{R}, пожертвуйте другое существо: Тимарет, Король Убийств наносит 2 повреждения целевому игроку.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{R}, Sacrifique outra criatura: Tymaret, Rei do Assassinato, causa 2 pontos de dano ao jogador alvo.]]></LOCALISED_TEXT>
<COST mana_cost="{1}{R}" type="Mana" />
<COST type="generic">
<PREREQUISITE>
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
filter:Add( FE_CARD_INSTANCE, OP_NOT, EffectSource() )
return filter:CountStopAt(1) == 1
</PREREQUISITE>
<RESOLUTION_TIME_ACTION>
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
filter:Add( FE_CARD_INSTANCE, OP_NOT, EffectSource() )
EffectController():ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_TO_SACRIFICE", EffectDC():Make_Targets(6) )
</RESOLUTION_TIME_ACTION>
<SFX text="TARGET_LIGHTNING_PLAY" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:SetFilterType(FILTER_TYPE_PLAYERS )
</TARGET_DEFINITION>
<TARGET tag="CARD_QUERY_CHOOSE_DEAL_2_DAMAGE" definition="0" compartment="0" count="1" />
<RESOLUTION_TIME_ACTION>
local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if ( target_creature ~= nil ) then
EffectSourceLKI():DealDamageTo( 2, target_player )
end
</RESOLUTION_TIME_ACTION>
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
</ACTIVATED_ABILITY>
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{B}, Sacrifice a creature: Return Tymaret from your graveyard to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{B}, sacrifiez une créature : Renvoyez Tyramet depuis votre cimetière dans votre main.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{B}, sacrificar una criatura: Regresa a Tymaret de tu cementerio a tu mano.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{B}, opfere eine Kreatur: Bringe Tymaret aus deinem Friedhof auf deine Hand zurück.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{B}, Sacrifica una creatura: Riprendi in mano Tymaret dal tuo cimitero.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{B}, クリーチャーを1体生け贄に捧げる:あなたの墓地にある殺人王、ティマレットをあなたの手札に戻す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{B}, 생물 한 개를 희생한다: 살육의 왕 티마렛을 당신의 무덤에서 당신의 손으로 되돌린다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{B}, пожертвуйте существо: верните Тимарета из вашего кладбища в вашу руку.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{B}, Sacrifique uma criatura: Devolva Tymaret de seu cemitério para sua mão.]]></LOCALISED_TEXT>
<COST mana_cost="{1}{B}" type="Mana" />
<COST type="Sacrifice" definition="0" compartment="1" query_tag="CARD_QUERY_CHOOSE_CREATURE_TO_SACRIFICE" item_count="1" />
<COST_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
filter:Add(FE_CONTROLLER, OP_IS, EffectController() )
</COST_DEFINITION>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():PutInHand()
end
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
Re: Formal Request Thread
by RiiakShiNal » 26 Nov 2013, 21:59
I see a couple of problems with the first ability:drleg3nd wrote:hey all can someone chk this out to see if it's good :
- Tymaret, The Murder King | Open
- Code: Select all
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{R}, Sacrifice another creature: Tymaret, the Murder King deals 2 damage to target player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{R}, sacrifiez une autre créature : Tymaret, le Roi assassin inflige 2 blessures au joueur ciblé.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{R}, sacrificar otra criatura: Tymaret, el rey asesino hace 2 puntos de daño al jugador objetivo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{R}, opfere eine andere Kreatur: Tymaret, der mordende König, fügt einem Spieler deiner Wahl 2 Schadenspunkte zu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{R}, Sacrifica un’altra creatura: Tymaret, il Re dell’Omicidio infligge 2 danni a un giocatore bersaglio.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{R}, 他のクリーチャーを1体生け贄に捧げる:プレイヤー1人を対象とする。殺人王、ティマレットはそのプレイヤーに2点のダメージを与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{R}, 다른 생물 한 개를 희생한다: 플레이어 한 명을 목표로 정한다. 살육의 왕 티마렛은 그 플레이어에게 피해 2점을 입힌다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{R}, пожертвуйте другое существо: Тимарет, Король Убийств наносит 2 повреждения целевому игроку.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{R}, Sacrifique outra criatura: Tymaret, Rei do Assassinato, causa 2 pontos de dano ao jogador alvo.]]></LOCALISED_TEXT>
<COST mana_cost="{1}{R}" type="Mana" />
<COST type="generic">
<PREREQUISITE>
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
filter:Add( FE_CARD_INSTANCE, OP_NOT, EffectSource() )
return filter:CountStopAt(1) == 1
</PREREQUISITE>
<RESOLUTION_TIME_ACTION>
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
filter:Add( FE_CARD_INSTANCE, OP_NOT, EffectSource() )
EffectController():ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_TO_SACRIFICE", EffectDC():Make_Targets(6) )
</RESOLUTION_TIME_ACTION>
<SFX text="TARGET_LIGHTNING_PLAY" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:SetFilterType(FILTER_TYPE_PLAYERS )
</TARGET_DEFINITION>
<TARGET tag="CARD_QUERY_CHOOSE_DEAL_2_DAMAGE" definition="0" compartment="0" count="1" />
<RESOLUTION_TIME_ACTION>
local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if ( target_creature ~= nil ) then
EffectSourceLKI():DealDamageTo( 2, target_player )
end
</RESOLUTION_TIME_ACTION>
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
</ACTIVATED_ABILITY>
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{B}, Sacrifice a creature: Return Tymaret from your graveyard to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{B}, sacrifiez une créature : Renvoyez Tyramet depuis votre cimetière dans votre main.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{B}, sacrificar una criatura: Regresa a Tymaret de tu cementerio a tu mano.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{B}, opfere eine Kreatur: Bringe Tymaret aus deinem Friedhof auf deine Hand zurück.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{B}, Sacrifica una creatura: Riprendi in mano Tymaret dal tuo cimitero.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{B}, クリーチャーを1体生け贄に捧げる:あなたの墓地にある殺人王、ティマレットをあなたの手札に戻す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{B}, 생물 한 개를 희생한다: 살육의 왕 티마렛을 당신의 무덤에서 당신의 손으로 되돌린다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{B}, пожертвуйте существо: верните Тимарета из вашего кладбища в вашу руку.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{B}, Sacrifique uma criatura: Devolva Tymaret de seu cemitério para sua mão.]]></LOCALISED_TEXT>
<COST mana_cost="{1}{B}" type="Mana" />
<COST type="Sacrifice" definition="0" compartment="1" query_tag="CARD_QUERY_CHOOSE_CREATURE_TO_SACRIFICE" item_count="1" />
<COST_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
filter:Add(FE_CONTROLLER, OP_IS, EffectController() )
</COST_DEFINITION>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():PutInHand()
end
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
- You haven't locked the sacrifice cost to your creatures. I can just see someone sacrificing an opponent's creatures to do damage to that opponent.
- You check for target_creature ~= nil, but you defined target_player.
- Additionally, you have not finished that cost, so your XML is malformed.
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: Formal Request Thread
by drleg3nd » 26 Nov 2013, 22:32
thx for the tips Riiak, how does this code looks now:RiiakShiNal wrote:I see a couple of problems with the first ability:drleg3nd wrote:hey all can someone chk this out to see if it's good :
- Tymaret, The Murder King | Open
- Code: Select all
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{R}, Sacrifice another creature: Tymaret, the Murder King deals 2 damage to target player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{R}, sacrifiez une autre créature : Tymaret, le Roi assassin inflige 2 blessures au joueur ciblé.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{R}, sacrificar otra criatura: Tymaret, el rey asesino hace 2 puntos de daño al jugador objetivo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{R}, opfere eine andere Kreatur: Tymaret, der mordende König, fügt einem Spieler deiner Wahl 2 Schadenspunkte zu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{R}, Sacrifica un’altra creatura: Tymaret, il Re dell’Omicidio infligge 2 danni a un giocatore bersaglio.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{R}, 他のクリーチャーを1体生け贄に捧げる:プレイヤー1人を対象とする。殺人王、ティマレットはそのプレイヤーに2点のダメージを与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{R}, 다른 생물 한 개를 희생한다: 플레이어 한 명을 목표로 정한다. 살육의 왕 티마렛은 그 플레이어에게 피해 2점을 입힌다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{R}, пожертвуйте другое существо: Тимарет, Король Убийств наносит 2 повреждения целевому игроку.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{R}, Sacrifique outra criatura: Tymaret, Rei do Assassinato, causa 2 pontos de dano ao jogador alvo.]]></LOCALISED_TEXT>
<COST mana_cost="{1}{R}" type="Mana" />
<COST type="generic">
<PREREQUISITE>
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
filter:Add( FE_CARD_INSTANCE, OP_NOT, EffectSource() )
return filter:CountStopAt(1) == 1
</PREREQUISITE>
<RESOLUTION_TIME_ACTION>
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
filter:Add( FE_CARD_INSTANCE, OP_NOT, EffectSource() )
EffectController():ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_TO_SACRIFICE", EffectDC():Make_Targets(6) )
</RESOLUTION_TIME_ACTION>
<SFX text="TARGET_LIGHTNING_PLAY" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:SetFilterType(FILTER_TYPE_PLAYERS )
</TARGET_DEFINITION>
<TARGET tag="CARD_QUERY_CHOOSE_DEAL_2_DAMAGE" definition="0" compartment="0" count="1" />
<RESOLUTION_TIME_ACTION>
local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if ( target_creature ~= nil ) then
EffectSourceLKI():DealDamageTo( 2, target_player )
end
</RESOLUTION_TIME_ACTION>
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
</ACTIVATED_ABILITY>
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{B}, Sacrifice a creature: Return Tymaret from your graveyard to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{B}, sacrifiez une créature : Renvoyez Tyramet depuis votre cimetière dans votre main.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{B}, sacrificar una criatura: Regresa a Tymaret de tu cementerio a tu mano.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{B}, opfere eine Kreatur: Bringe Tymaret aus deinem Friedhof auf deine Hand zurück.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{B}, Sacrifica una creatura: Riprendi in mano Tymaret dal tuo cimitero.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{B}, クリーチャーを1体生け贄に捧げる:あなたの墓地にある殺人王、ティマレットをあなたの手札に戻す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{B}, 생물 한 개를 희생한다: 살육의 왕 티마렛을 당신의 무덤에서 당신의 손으로 되돌린다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{B}, пожертвуйте существо: верните Тимарета из вашего кладбища в вашу руку.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{B}, Sacrifique uma criatura: Devolva Tymaret de seu cemitério para sua mão.]]></LOCALISED_TEXT>
<COST mana_cost="{1}{B}" type="Mana" />
<COST type="Sacrifice" definition="0" compartment="1" query_tag="CARD_QUERY_CHOOSE_CREATURE_TO_SACRIFICE" item_count="1" />
<COST_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
filter:Add(FE_CONTROLLER, OP_IS, EffectController() )
</COST_DEFINITION>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():PutInHand()
end
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
- You haven't locked the sacrifice cost to your creatures. I can just see someone sacrificing an opponent's creatures to do damage to that opponent.
- You check for target_creature ~= nil, but you defined target_player.
- Additionally, you have not finished that cost, so your XML is malformed.
- Tymaret, the Murder King(revised) | Open
- Code: Select all
<TARGET tag="CARD_QUERY_CHOOSE_PLAYER_DEAL_2_DAMAGE" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:SetFilterType( FILTER_TYPE_PLAYERS )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if ( target_creature ~= nil ) then
EffectSourceLKI():DealDamageTo( 2, target_creature )
elseif ( target_player ~= nil ) then
EffectSourceLKI():DealDamageTo( 2, target_player )
end
</RESOLUTION_TIME_ACTION>
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
- Mindsparker | Open
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que un oponente lance un hechizo de instantáneo o de conjuro blanco o azul, el Enciendementes hace 2 puntos de daño a ese jugador.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta un avversario lancia una magia istantaneo o stregoneria bianca o blu, il Mentescintilla infligge 2 danni a quel giocatore.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<TRIGGER value="SPELL_PLAYED">
return TriggerPlayer():GetTeam() ~= EffectController():GetTeam() and (TriggerObject():GetColour():Test( COLOUR_WHITE ) or TriggerObject():GetColour():Test( COLOUR_BLUE ) and return TriggerObject():GetCardType():Test( CARD_TYPE_SORCERY ) or return TriggerObject():GetCardType():Test( CARD_TYPE_INSTANT )
</TRIGGER>
<TARGET tag="CARD_QUERY_CHOOSE_PLAYER_DEAL_2_DAMAGE" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:SetFilterType( FILTER_TYPE_PLAYERS )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if ( target_creature ~= nil ) then
EffectSourceLKI():DealDamageTo( 2, target_creature )
elseif ( target_player ~= nil ) then
EffectSourceLKI():DealDamageTo( 2, target_player )
end
</RESOLUTION_TIME_ACTION>
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
</TRIGGERED_ABILITY>
Last edited by drleg3nd on 26 Nov 2013, 22:34, edited 1 time in total.
Re: Formal Request Thread
by NeoAnderson » 26 Nov 2013, 22:33
Firemind just a question i thought the same solution you posted but if he does this change, what happen if an effect counter the creature before the transition will be done? Should it trigger anyway??thefiremind wrote:This happens because the first trigger of the card says "As Lich enters the battlefield" and not "When Lich enters the battlefield". The difference is that "As" triggers should happen before the card actually enters the battlefield.daniel473 wrote:Ok i got the card. i cast it ok and it goes well. Lose 20 life didnt instantly lose the game while lost the life. Except now i have to sacrifice 20 permanents.
You need to make the trigger work in ZONE_TRANSITION:
- Code: Select all
<TRIGGERED_ABILITY active_zone="ZONE_TRANSITION" replacement_effect="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Lich enters the battlefield, you lose life equal to your life total.]]></LOCALISED_TEXT>
...
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
...
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Formal Request Thread
by thefiremind » 26 Nov 2013, 22:39
Hey can you check my mod and realize that Tymaret is there?drleg3nd wrote:hey all can someone chk this out to see if it's good


If the spell gets countered it won't get to the transition to the battlefield.NeoAnderson wrote:Firemind just a question i thought the same solution you posted but if he does this change, what happen if an effect counter the creature before the transition will be done? Should it trigger anyway??
< 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: Formal Request Thread
by MC Brodie » 26 Nov 2013, 22:50
For Mindsparker, you have three returns in the trigger. I don't think that will work. Also, Mindsparker deals damage to the opponent that cast the spell, not a target opponent. Try this:drleg3nd wrote:also
- Mindsparker | Open
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que un oponente lance un hechizo de instantáneo o de conjuro blanco o azul, el Enciendementes hace 2 puntos de daño a ese jugador.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta un avversario lancia una magia istantaneo o stregoneria bianca o blu, il Mentescintilla infligge 2 danni a quel giocatore.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<TRIGGER value="SPELL_PLAYED">
return TriggerPlayer():GetTeam() ~= EffectController():GetTeam() and (TriggerObject():GetColour():Test( COLOUR_WHITE ) or TriggerObject():GetColour():Test( COLOUR_BLUE ) and return TriggerObject():GetCardType():Test( CARD_TYPE_SORCERY ) or return TriggerObject():GetCardType():Test( CARD_TYPE_INSTANT )
</TRIGGER>
<TARGET tag="CARD_QUERY_CHOOSE_PLAYER_DEAL_2_DAMAGE" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:SetFilterType( FILTER_TYPE_PLAYERS )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if ( target_creature ~= nil ) then
EffectSourceLKI():DealDamageTo( 2, target_creature )
elseif ( target_player ~= nil ) then
EffectSourceLKI():DealDamageTo( 2, target_player )
end
</RESOLUTION_TIME_ACTION>
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
</TRIGGERED_ABILITY>
- Mindsparker | Open
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que un oponente lance un hechizo de instantáneo o de conjuro blanco o azul, el Enciendementes hace 2 puntos de daño a ese jugador.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta un avversario lancia una magia istantaneo o stregoneria bianca o blu, il Mentescintilla infligge 2 danni a quel giocatore.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player.]]></LOCALISED_TEXT>
<TRIGGER value="SPELL_PLAYED">
return TriggerPlayer():GetTeam() ~= EffectController():GetTeam() and
( TriggerObject():GetColour():Test( COLOUR_WHITE ) or TriggerObject():GetColour():Test( COLOUR_BLUE ) ) and
( TriggerObject():GetCardType():Test( CARD_TYPE_SORCERY ) or TriggerObject():GetCardType():Test( CARD_TYPE_INSTANT ) )
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if TriggerPlayer() ~= nil then
EffectSourceLKI():DealDamageTo( 2, TriggerPlayer() )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
My bad for being vague. I meant the gameplay animations like:thefiremind wrote:I'm not sure if I understood what you mean... do you want to look at the animations from outside the game so that you can choose which one is best suitable for a card? There's no way to do that, as far as I know. Most animation names are pretty self-explanatory (blunt, fireball, blade, etc.), about the other ones, you should look at them while playing.MC Brodie wrote:Are the available animations compiled somewhere or can be easily extracted? Or is my best option to search for then in the deck builder?
- <SFX text="TARGET_LIGHTNING_PLAY" />,
- <SFX text="TARGET_PESTS_PLAY" />,
- <SFX text="TARGET_GREEN_MAGIC_PLAY" />,
- <SFX text="GLOBAL_DISTORTION_PLAY" />, and etc..
Not necessarily the creature attack ones. I was wondering if there were a list available so I would know what I had to choose from. They are pretty self-explanatory but I don't know what options I have

Last edited by MC Brodie on 26 Nov 2013, 22:58, edited 1 time in total.
-----------------------------------------------------------------------
Song of the Day: 46 and 2 (cover)
Song of the Day: 46 and 2 (cover)
Re: Formal Request Thread
by drleg3nd » 26 Nov 2013, 22:54
hey tfm, then i probably do have it but didnt update my portable hdd where i do all my coding. is it close to what you have ?
also can someone help me with Slaughter Games
also can someone help me with Slaughter Games
- | Open
- Code: Select all
<SPELL_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Name a nonland card. Search target opponent’s graveyard, hand, and library for any number of cards with that name and exile them. Then that player shuffles his or her library.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Nommez une carte non-terrain. Cherchez dans le cimetière, la main et la bibliothèque de l’adversaire ciblé n’importe quel nombre de cartes avec ce nom et exilez-les. Ce joueur mélange ensuite sa bibliothèque.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Nombra una carta que no sea tierra. Busca en el cementerio, mano y biblioteca del oponente objetivo cualquier cantidad de cartas con ese nombre y exílialas. Luego ese jugador baraja su biblioteca.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Benenne eine Karte, die kein Land ist. Durchsuche den Friedhof, die Hand und die Bibliothek eines Gegners deiner Wahl nach einer beliebigen Anzahl an Karten mit diesem Namen und schicke sie ins Exil. Dieser Spieler mischt dann seine Bibliothek.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Nomina una carta non terra. Passa in rassegna il cimitero, la mano e il grimorio di un avversario bersaglio per un qualsiasi numero di carte con quel nome ed esiliale. Poi quel giocatore rimescola il suo grimorio.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[対戦相手1人を対象とし、土地でないカード名を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[Nomeie um card que não seja um terreno. Procure um número qualquer de cards com o mesmo nome daquele card no cemitério, na mão e no grimório do oponente alvo e exile-os. Depois, aquele jogador embaralha seu próprio grimório.]]></LOCALISED_TEXT>
</SPELL_ABILITY>
Who is online
Users browsing this forum: No registered users and 7 guests