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)



Card Creation Request Thread
User-made mods in DLC (Downloadable Content) form.
Get MTG cards here for your DotP that aren't available anywhere else!
Get MTG cards here for your DotP that aren't available anywhere else!
Moderator: CCGHQ Admins
Re: Card Creation Request Thread
by NEMESiS » 26 Feb 2013, 02:16
Thanks for the explanation, it was interesting indeed. With the information you gave me I was able to create Molten Primordial. However, I seem to be unable to make the targetted creatures untap. I will post the whole code just incase:
- Code: Select all
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:SetPlayer( MTG():GetNthStartingPlayer(0) )
filter:AddCardType( CARD_TYPE_CREATURE )
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ENEMY, EffectController() )
</TARGET_DEFINITION>
<TARGET_DEFINITION id="1">
local filter = Object():GetFilter()
filter:Clear()
filter:SetPlayer( MTG():GetNthStartingPlayer(1) )
filter:AddCardType( CARD_TYPE_CREATURE )
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ENEMY, EffectController() )
</TARGET_DEFINITION>
<TARGET_DEFINITION id="2">
local filter = Object():GetFilter()
filter:Clear()
filter:SetPlayer( MTG():GetNthStartingPlayer(2) )
filter:AddCardType( CARD_TYPE_CREATURE )
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ENEMY, EffectController() )
</TARGET_DEFINITION>
<TARGET_DEFINITION id="3">
local filter = Object():GetFilter()
filter:Clear()
filter:SetPlayer( MTG():GetNthStartingPlayer(3) )
filter:AddCardType( CARD_TYPE_CREATURE )
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ENEMY, EffectController() )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
local filter = Object():GetFilter()
filter:Clear()
filter:AddCardType( CARD_TYPE_CREATURE )
filter:SetZone( ZONE_IN_PLAY )
filter:SetControllersTeam( EffectController():GetTeam() )
filter:AddExtra( FILTER_EXTRA_FLIP_TEAM )
return filter:CountStopAt(1)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION repeating="1" target_choosing="1">
local n = MTG():GetActionRepCount()
local num_starting_players = MTG():GetNumberOfStartingPlayers()
local player = MTG():GetNthStartingPlayer(n)
if player ~= nil and n < num_starting_players then
if player:GetTeam() ~= EffectController():GetTeam() and player:OutOfTheGame() == 0 then
-- ask the query (target definition is tied directly to the player index)
EffectController():ChooseTarget( n, "CARD_QUERY_CHOOSE_CREATURE_TO_GAIN_CONTROL", EffectDC():Make_Targets(n) )
end
return true
else
return false
end
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
for n=0,MTG():GetNumberOfStartingPlayers()-1 do
local targer = EffectDC():Get_Targets(n) and EffectDC():Get_Targets(n):Get_CardPtr(0)
if target ~= nil then
target:Untap()
end
end
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="2">
for n=0,MTG():GetNumberOfStartingPlayers()-1 do
local target = EffectDC():Get_Targets(n) and EffectDC():Get_Targets(n):Get_CardPtr(0)
if target ~= nil then
target:SetController( EffectController() )
end
end
</CONTINUOUS_ACTION>
<CONTINUOUS_ACTION layer="6">
for n=0,MTG():GetNumberOfStartingPlayers()-1 do
local target = EffectDC():Get_Targets(n) and EffectDC():Get_Targets(n):Get_CardPtr(0)
if target ~= nil then
local characteristics = target:GetCurrentCharacteristics()
characteristics:Characteristic_Set( CHARACTERISTIC_WORTHLESS, 1 )
end
end
</CONTINUOUS_ACTION>
<CONTINUOUS_ACTION layer="6">
for n=0,MTG():GetNumberOfStartingPlayers()-1 do
local target = EffectDC():Get_Targets(n) and EffectDC():Get_Targets(n):Get_CardPtr(0)
if target ~= nil then
local characteristics = target:GetCurrentCharacteristics()
characteristics:Characteristic_Set( CHARACTERISTIC_HASTE, 1 )
end
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
</TRIGGERED_ABILITY>
-
NEMESiS - Posts: 460
- Joined: 03 Jan 2013, 04:02
- Location: Pools of Becoming
- Has thanked: 70 times
- Been thanked: 21 times
Re: Card Creation Request Thread
by thefiremind » 26 Feb 2013, 09:38
The only wrong thing is that you wrote targer instead of target in the untapping part. 

< 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: Card Creation Request Thread
by NEMESiS » 26 Feb 2013, 11:45
Ah yes...... grammar continues to be my nemesis. Next time I should just run it past the spell checker instead. Lol!thefiremind wrote:The only wrong thing is that you wrote targer instead of target in the untapping part.
-
NEMESiS - Posts: 460
- Joined: 03 Jan 2013, 04:02
- Location: Pools of Becoming
- Has thanked: 70 times
- Been thanked: 21 times
Re: Card Creation Request Thread
by thefiremind » 26 Feb 2013, 11:59
You are allowed to name your variable "targer" or even "mickey_mouse", but you must call it with the right name once you decided it.NEMESiS wrote:Ah yes...... grammar continues to be my nemesis. Next time I should just run it past the spell checker instead. Lol!

< 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: Card Creation Request Thread
by NEMESiS » 26 Feb 2013, 14:14
Next card I make I will use Mickey Mouse for a variable just for giggles.
-
NEMESiS - Posts: 460
- Joined: 03 Jan 2013, 04:02
- Location: Pools of Becoming
- Has thanked: 70 times
- Been thanked: 21 times
Re: Card Creation Request Thread
by nekrose » 27 Feb 2013, 05:08
Hey there folks ! I would like to humbly request the creation of the card Ghoulflesh if possible, as well as Sepulchral Primordial if you have the time . it would go great with my zombie deck. Alternatively, if you know of any other card that can add the creature type "zombie" to a card in play on the battlefield [as opposed to the graveyard] that would work too.
I would be very much obliged <3
Thank you for your time !
I would be very much obliged <3
Thank you for your time !
Re: Card Creation Request Thread
by NEMESiS » 27 Feb 2013, 06:04
I made sepulchral primordial:nekrose wrote:Hey there folks ! I would like to humbly request the creation of the card Ghoulflesh if possible, as well as Sepulchral Primordial if you have the time . it would go great with my zombie deck. Alternatively, if you know of any other card that can add the creature type "zombie" to a card in play on the battlefield [as opposed to the graveyard] that would work too.
I would be very much obliged <3
Thank you for your time !
http://www.mediafire.com/download.php?b2qguab77g8dnzl
-
NEMESiS - Posts: 460
- Joined: 03 Jan 2013, 04:02
- Location: Pools of Becoming
- Has thanked: 70 times
- Been thanked: 21 times
Re: Card Creation Request Thread
by nekrose » 27 Feb 2013, 08:55
ah, thank you kind sir or madame ! much appreciated. now if anyone would be interested in making Ghoulflesh, I would be quite grateful <3 thank you again , everyoneNEMESiS wrote:I made sepulchral primordial:nekrose wrote:Hey there folks ! I would like to humbly request the creation of the card Ghoulflesh if possible, as well as Sepulchral Primordial if you have the time . it would go great with my zombie deck. Alternatively, if you know of any other card that can add the creature type "zombie" to a card in play on the battlefield [as opposed to the graveyard] that would work too.
I would be very much obliged <3
Thank you for your time !
Re: Card Creation Request Thread
by thefiremind » 27 Feb 2013, 10:58
The complete list of cards that turn into Zombie should be:
EDIT: Here are the 2 cards. Ghoulflesh is easy, Nim Deathmantle is a bit more complicated (especially on the resurrection part) so test it before calling it done.
About Ghoulflesh, I coded it with neutral targetting (= the AI will decide to attach it to both allied and enemy creatures) because I guessed that your plan would be to attach it to your creatures as well, despite the -1/-1 malus. If I guessed wrong, change HINT_NEUTRAL with HINT_ENEMY.
- Dralnu's Crusade (only for Goblins - you can find it in my mod)
- Dread Slaver (upon resurrection - you already requested it
)
- Ghoulflesh
- Grave Betrayal (upon resurrection - you can find it in my mod)
- Grimoire of the Dead (upon resurrection - you can find it in my mod)
- Lim-Dûl the Necromancer (upon resurrection)
- Nim Deathmantle
- Rise from the Grave (upon resurrection - official card)
EDIT: Here are the 2 cards. Ghoulflesh is easy, Nim Deathmantle is a bit more complicated (especially on the resurrection part) so test it before calling it done.

- Attachments
-
GHOULFLESH_239970.zip
- (94.74 KiB) Downloaded 320 times
-
NIM_DEATHMANTLE_209289.zip
- (103.38 KiB) Downloaded 377 times
< 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: Card Creation Request Thread
by RiiakShiNal » 27 Feb 2013, 14:37
Well, that's not exactly true as there are other cards, they just allow for any creature type not just Zombie.thefiremind wrote:The complete list of cards that turn into Zombie should be:I suppose you would be really interested only in Ghoulflesh and Nim Deathmantle, right?
- Dralnu's Crusade (only for Goblins - you can find it in my mod)
- Dread Slaver (upon resurrection - you already requested it
)
- Ghoulflesh
- Grave Betrayal (upon resurrection - you can find it in my mod)
- Grimoire of the Dead (upon resurrection - you can find it in my mod)
- Lim-Dûl the Necromancer (upon resurrection)
- Nim Deathmantle
- Rise from the Grave (upon resurrection - official card)
For example:
- Conspiracy
- Mirror Entity - All creature types includes Zombie
- Mistform Mask
- Mistform Mutant
- Mistform Wakecaster
- Runed Stalactite - Every creature type includes Zombie
- Shields of Velis Vel - All creature types includes Zombie
- Standardize
- Trickery Charm
- Unnatural Selection
- Wings of Velis Vel - All creature types includes Zombie
- Xenograft
There may even be other cards that could turn creatures into zombies in some way or another so this list may not be complete.
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: Card Creation Request Thread
by nekrose » 28 Feb 2013, 01:22
Oh...oh my .thefiremind wrote:The complete list of cards that turn into Zombie should be:I suppose you would be really interested only in Ghoulflesh and Nim Deathmantle, right?
- Dralnu's Crusade (only for Goblins - you can find it in my mod)
- Dread Slaver (upon resurrection - you already requested it
)
- Ghoulflesh
- Grave Betrayal (upon resurrection - you can find it in my mod)
- Grimoire of the Dead (upon resurrection - you can find it in my mod)
- Lim-Dûl the Necromancer (upon resurrection)
- Nim Deathmantle
- Rise from the Grave (upon resurrection - official card)
EDIT: Here are the 2 cards. Ghoulflesh is easy, Nim Deathmantle is a bit more complicated (especially on the resurrection part) so test it before calling it done.About Ghoulflesh, I coded it with neutral targetting (= the AI will decide to attach it to both allied and enemy creatures) because I guessed that your plan would be to attach it to your creatures as well, despite the -1/-1 malus. If I guessed wrong, change HINT_NEUTRAL with HINT_ENEMY.
Thank you so very much !

Re: Card Creation Request Thread
by NEMESiS » 28 Feb 2013, 04:22
- Code: Select all
<RESOLUTION_TIME_ACTION>
local filter = Object():GetFilter()
local player = EffectController()
filter:Clear()
filter:NotTargetted()
filter:SetPlayer( player )
filter:SetZone( ZONE_LIBRARY )
filter:SetPortion( 5 )
player:SetTargetCount( 4 )
player:SetTargetPrompt( 0, "CARD_QUERY_CHOOSE_CARD_TO_PUT_INTO_HAND" )
player:SetTargetPrompt( 1, "CARD_QUERY_CHOOSE_FIRST_CARD_TO_PUT_ON_TOP" )
player:SetTargetPrompt( 2, "CARD_QUERY_CHOOSE_SECOND_CARD_TO_PUT_ON_TOP" )
player:SetTargetPrompt( 3, "CARD_QUERY_CHOOSE_THIRD_CARD_TO_PUT_ON_TOP" )
player:SetTargetPrompt( 4, "CARD_QUERY_CHOOSE_FORTH_CARD_TO_PUT_ON_TOP" )
player:ChooseTargetsWithFlags( NO_VALIDATION, EffectDC():Make_Targets(0), 0 )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target_array = {}
for i=0,4 do
target_array[i] = EffectDC():Get_Targets(0):Get_NthCardPtr(i)
end
for i=0,4 do
if target_array[i] ~= nil then
if card == target_card then
card:PutInHand()
else
target_array[i]:PutInLibrary(0)
end
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
-
NEMESiS - Posts: 460
- Joined: 03 Jan 2013, 04:02
- Location: Pools of Becoming
- Has thanked: 70 times
- Been thanked: 21 times
Re: Card Creation Request Thread
by thefiremind » 28 Feb 2013, 09:42
First, SetTargetCount must have 5 as argument: you are defining 5 targets even if you are counting from 0.
Then, on resolution, you are using the variables card and target_card but you didn't define them anywhere, so how could the game know what they mean?
Finally, I think that you can't use PutInLibrary(0) for all the cards or you'll end up putting them in reverse order. Imagine it done: card #1 goes to the top of your library; card #2 goes to the top of your library which means over card #1; and so on. Either you reverse the "for" loop (which is possible, you would write "for i=4,1,-1" where the third number sets a custom increment), or you increment the PutInLibrary argument each time, so each card goes under the previous one. I suggest the latter approach because I find it more intuitive and bug-proof.
The code I would use is:
Then, on resolution, you are using the variables card and target_card but you didn't define them anywhere, so how could the game know what they mean?
Finally, I think that you can't use PutInLibrary(0) for all the cards or you'll end up putting them in reverse order. Imagine it done: card #1 goes to the top of your library; card #2 goes to the top of your library which means over card #1; and so on. Either you reverse the "for" loop (which is possible, you would write "for i=4,1,-1" where the third number sets a custom increment), or you increment the PutInLibrary argument each time, so each card goes under the previous one. I suggest the latter approach because I find it more intuitive and bug-proof.

The code I would use is:
- Code: Select all
<RESOLUTION_TIME_ACTION>
local filter = Object():GetFilter()
local player = EffectController()
filter:Clear()
filter:NotTargetted()
filter:SetPlayer( player )
filter:SetZone( ZONE_LIBRARY )
filter:SetPortion( 5 )
player:SetTargetCount( 5 )
player:SetTargetPrompt( 0, "CARD_QUERY_CHOOSE_CARD_TO_PUT_INTO_HAND" )
player:SetTargetPrompt( 1, "CARD_QUERY_CHOOSE_FIRST_CARD_TO_PUT_ON_TOP" )
player:SetTargetPrompt( 2, "CARD_QUERY_CHOOSE_SECOND_CARD_TO_PUT_ON_TOP" )
player:SetTargetPrompt( 3, "CARD_QUERY_CHOOSE_THIRD_CARD_TO_PUT_ON_TOP" )
player:SetTargetPrompt( 4, "CARD_QUERY_CHOOSE_FOURTH_CARD_TO_PUT_ON_TOP" )
player:ChooseTargetsWithFlags( NO_VALIDATION, EffectDC():Make_Targets(0), 0 )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target_array = {}
for i=0,4 do
target_array[i] = EffectDC():Get_Targets(0):Get_NthCardPtr(i)
end
if target_array[0] ~= nil then
target_array[0]:PutInHand()
end
for i=1,4 do
if target_array[i] ~= nil then
target_array[i]:PutInLibrary(i-1)
end
end
</RESOLUTION_TIME_ACTION>
< 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: Card Creation Request Thread
by Thran75 » 28 Feb 2013, 21:47
Someone may tell me how I could implement the blocking special skill of the Defiant Vanguard?
Re: Card Creation Request Thread
by thefiremind » 28 Feb 2013, 23:39
When Defiant Vanguard blocks, you need to save 2 pointers: one for himself and one for the creature it blocks (it will always be one because you can't block multiple creatures with one creature in DotP). Then you pass them to a delayed trigger that starts at end of combat and destroys both.Thran75 wrote:Someone may tell me how I could implement the blocking special skill of the Defiant Vanguard?
I would make something like this:
- Code: Select all
<TRIGGERED_ABILITY internal="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Defiant Vanguard blocks, at end of combat, destroy it and all creatures it blocked this turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quando l’Avanguardia Audace blocca, alla fine del combattimento, distruggi l’Avanguardia Audace e tutte le creature che ha bloccato in questo turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wenn die Trotzende Vorhut blockt, zerstöre sie und alle Kreaturen, die von ihr geblockt wurden, am Ende des Kampfes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quand l’Avant-garde provocante bloque, détruisez-la à la fin du combat ainsi que toutes les créatures qu’elle a bloquées ce tour-ci.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cuando la Vanguardia desafiante bloquee, al final del combate, destrúyela y destruye todas las criaturas que bloqueó este turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[果敢な先兵がブロックしたとき、戦闘終了時に、それとこのターンにそれがブロックしたすべてのクリーチャーを破壊する。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When Defiant Vanguard blocks, at end of combat, destroy it and all creatures it blocked this turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда Дерзкий Авангард блокирует, уничтожьте его и все существа, которых он блокировал на этом ходу.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Quando Vanguarda Desafiadora bloquear, no final do combate, destrua-a e todas as criaturas que ela bloqueou neste turno.]]></LOCALISED_TEXT>
<TRIGGER value="BLOCKING" simple_qualifier="self" />
<RESOLUTION_TIME_ACTION>
local delayDC = EffectDC():Make_Chest(1)
delayDC:Set_CardPtr( 0, EffectSource() )
delayDC:Set_CardPtr( 1, SecondaryObject() )
MTG():CreateDelayedTrigger(1, delayDC)
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id="1" dangerous="1">
<CLEANUP fire_once="1" />
<TRIGGER value="BEGINNING_OF_STEP">
return ( MTG():GetStep() == STEP_END_OF_COMBAT and TriggerPlayer() == EffectController() )
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local source = EffectDC():Get_CardPtr(0)
local attacker = EffectDC():Get_CardPtr(1)
if source ~= nil then
source:Destroy()
end
if attacker ~= nil then
attacker:Destroy()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

EDIT: Code should be fixed now.
Last edited by thefiremind on 02 Mar 2013, 17:43, edited 2 times 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
Return to New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
Who is online
Users browsing this forum: No registered users and 1 guest