It is currently 04 Aug 2025, 20:50
   
Text Size

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!

Moderator: CCGHQ Admins

Re: Card Creation Request Thread

Postby 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 &lt; 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>
After going through all the trouble to make this I then realized that I already had Mass Mutiny available in another mod so I could just copy and paste but I feel like I am missing the opportunity to learn here by not asking. Is there something wrong with the way I define the targets for them to untap?? Everything else works fine.
User avatar
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

Postby thefiremind » 26 Feb 2013, 09:38

The only wrong thing is that you wrote targer instead of target in the untapping part. :lol:
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Card Creation Request Thread

Postby NEMESiS » 26 Feb 2013, 11:45

thefiremind wrote:The only wrong thing is that you wrote targer instead of target in the untapping part. :lol:
Ah yes...... grammar continues to be my nemesis. Next time I should just run it past the spell checker instead. Lol!
User avatar
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

Postby thefiremind » 26 Feb 2013, 11:59

NEMESiS wrote:Ah yes...... grammar continues to be my nemesis. Next time I should just run it past the spell checker instead. Lol!
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. :wink:
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Card Creation Request Thread

Postby NEMESiS » 26 Feb 2013, 14:14

Next card I make I will use Mickey Mouse for a variable just for giggles.
User avatar
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

Postby 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 !
User avatar
nekrose
 
Posts: 23
Joined: 27 Nov 2012, 09:20
Has thanked: 10 times
Been thanked: 0 time

Re: Card Creation Request Thread

Postby NEMESiS » 27 Feb 2013, 06:04

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 !
I made sepulchral primordial:

http://www.mediafire.com/download.php?b2qguab77g8dnzl
User avatar
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

Postby nekrose » 27 Feb 2013, 08:55

NEMESiS wrote:
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 !
I made sepulchral primordial:

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 , everyone
User avatar
nekrose
 
Posts: 23
Joined: 27 Nov 2012, 09:20
Has thanked: 10 times
Been thanked: 0 time

Re: Card Creation Request Thread

Postby thefiremind » 27 Feb 2013, 10:58

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?

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. :wink: 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.
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...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Card Creation Request Thread

Postby RiiakShiNal » 27 Feb 2013, 14:37

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?
Well, that's not exactly true as there are other cards, they just allow for any creature type not just Zombie.

For example:

There may even be other cards that could turn creatures into zombies in some way or another so this list may not be complete.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Card Creation Request Thread

Postby nekrose » 28 Feb 2013, 01:22

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?

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. :wink: 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.
Oh...oh my .

Thank you so very much ! :D Yes, that was exactly my plan . You see, I am trying to run a black/red [but mostly black] zombie/vamp deck and trying to find ways to make them synch better , so I figured if I found a way to add the zombie creature type to my vamps, and vampire creature type to my zombies, they would get the benefits of both with all the supporting cards I have for each one [ cemetery reaper, Lord of the Undead, death baron , etc . ] Thanks to the recent DLC I have Mephidross Vampire , so I just needed something to change my vamps into zombies i.e. Ghoulflesh and the like. Anyways, thanks again everyone ! <3
User avatar
nekrose
 
Posts: 23
Joined: 27 Nov 2012, 09:20
Has thanked: 10 times
Been thanked: 0 time

Re: Card Creation Request Thread

Postby 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>
So needless to say this is broken. I am not sure how to set the resolution time action. I have tried about 12 different ways and i am lost. Help please? Card is Diabolic Vision.
User avatar
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

Postby 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. :D
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>
As you can see, you don't need to compare variables in order to know which card must be put in hand: you already know that it's the first target (0) because that's what you ask to the player with your query.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Card Creation Request Thread

Postby Thran75 » 28 Feb 2013, 21:47

Someone may tell me how I could implement the blocking special skill of the Defiant Vanguard?
Thran75
 
Posts: 22
Joined: 24 Feb 2013, 11:38
Has thanked: 7 times
Been thanked: 0 time

Re: Card Creation Request Thread

Postby thefiremind » 28 Feb 2013, 23:39

Thran75 wrote:Someone may tell me how I could implement the blocking special skill of the Defiant Vanguard?
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.
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>
This implementation doesn't cover the scenario where Defiant Vanguard becomes indestructible somehow and blocks an indestructible creature, then there's another combat phase the same turn and Defiant Vanguard blocks another creature: in this case, since the card says "all creatures it blocked this turn" and not "the last combat", it should try to destroy the indestructible attacker again. I think you'll agree with me that this scenario is quite rare, so we can just ignore it and avoid making the card more complex. :wink:

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...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

PreviousNext

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 0 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 0 users online :: 0 registered, 0 hidden and 0 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 0 guests

Login Form