It is currently 03 Aug 2025, 22:05
   
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 thefiremind » 10 May 2013, 10:04

It seems that I can't code the haunt ability on a spell: my calls to EffectDC():Protect_CardPtr(2) don't work. I give up and leave my code to anyone who understands how to fix it.
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2>
  <FILENAME text="BENEDICTION_OF_MOONS_96951" />
  <CARDNAME text="BENEDICTION_OF_MOONS" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Benediction of Moons]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Oraison des lunes]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Bendición de las lunas]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Segen der Monde]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Benedizione delle Lune]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[月の祈祷]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Benediction of Moons]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Благословение лун]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Bênção das Luas]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="96951" />
  <ARTID value="A96951" />
  <ARTIST name="Matt Cavotta" />
  <CASTING_COST cost="{W}" />
  <TYPE metaname="Sorcery" />
  <EXPANSION value="GPT" />
  <RARITY metaname="C" />
  <SPELL_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[You gain 1 life for each player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vous gagnez 1 point de vie pour chaque joueur.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Ganas 1 vida por cada jugador.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Du erhältst für jeden Spieler 1 Lebenspunkt dazu.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Guadagni 1 punto vita per ogni giocatore.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたはプレイヤー1人につき1点のライフを得る。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[You gain 1 life for each player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Вы получаете 1 жизнь за каждого игрока.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Você ganha 1 ponto de vida para cada jogador.]]></LOCALISED_TEXT>
    <RESOLUTION_TIME_ACTION>
    local player = EffectController()
    if player ~= nil then
       player:GainLife( MTG():GetNumberOfPlayers() )
    end
    </RESOLUTION_TIME_ACTION>
  </SPELL_ABILITY>
  <SPELL_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Haunt]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Hantise]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Acechar]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Spuk]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Tormentare]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[憑依]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Haunt]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Преследование]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Assombrar]]></LOCALISED_TEXT>
    <RESOLUTION_TIME_ACTION>
    local delayDC = EffectDC():Make_Chest(1)
    delayDC:Set_CardPtr( 2, EffectSource() )
    MTG():CreateDelayedTrigger(1, delayDC)
    </RESOLUTION_TIME_ACTION>
  </SPELL_ABILITY>
  <TRIGGERED_ABILITY resource_id="1" auto_skip="1">
    <CLEANUP fire_once="1" />
    <TRIGGER value="ZONECHANGE_BEGIN" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_STACK">
    if TriggerObject() ~= nil and TriggerObject() == EffectDC():Get_CardPtr(2) then
       EffectDC():Protect_CardPtr(2)
       return true
    end
    return false
    </TRIGGER>
    <TARGET_DEFINITION id="0">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddCardType( CARD_TYPE_CREATURE )
    filter:SetZone( ZONE_IN_PLAY )
    filter:SetHint( HINT_NEUTRAL, EffectController() )
    </TARGET_DEFINITION>
    <TARGET_DETERMINATION>
    return AtLeastOneTargetFromDefinition(0)
    </TARGET_DETERMINATION>
    <PLAY_TIME_ACTION target_choosing="1">
    EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE_TO_HAUNT", EffectDC():Make_Targets(0) )
    </PLAY_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    local source = EffectDC():Get_CardPtr(2)
    if source ~= nil and target ~= nil then
       EffectDC():Protect_CardPtr(2)
       source:RemoveFromGame()
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    local source = EffectDC():Get_CardPtr(2)
    if target ~= nil and source ~= nil then
       source:NailOnto(target)
       local delayDC = EffectDC():Make_Chest(1)
       delayDC:Set_CardPtr(1, target)
       delayDC:Set_CardPtr(2, source)
       MTG():CreateDelayedTrigger(2, delayDC)
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <SPELL_ABILITY internal="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When the creature Benediction of Moons haunts dies, you gain 1 life for each player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quand la créature hantée par l’Oraison des lunes est mise dans un cimetière, vous gagnez 1 point de vie pour chaque joueur.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cuando la criatura a la que acecha Bendición de las lunas vaya a un cementerio, ganas 1 vida por cada jugador.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wenn die Kreatur, bei der der Segen der Monde spukt, auf einen Friedhof gelegt wird, erhältst du für jeden Spieler 1 Lebenspunkt dazu.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quando la creatura tormentata dalla Benedizione delle Lune viene messa in un cimitero, tu guadagni 1 punto vita per ogni giocatore.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[月の祈祷が憑依しているクリーチャーがいずれかの墓地に置かれたとき、あなたはプレイヤー1人につき1点のライフを得る。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When the creature Benediction of Moons haunts dies, you gain 1 life for each player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда существо, преследуемое Благословением лун, попадает на кладбище, вы получаете 1 жизнь за каждого игрока.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Quando a criatura que Bênção das Luas assombra é colocada num cemitério, você ganha 1 ponto de vida para cada jogador.]]></LOCALISED_TEXT>
  </SPELL_ABILITY>
  <TRIGGERED_ABILITY resource_id="2" auto_skip="1">
    <CLEANUP fire_once="1" />
    <TRIGGER value="ZONECHANGE_BEGIN" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_IN_PLAY">
    local target = EffectDC():Get_CardPtr(1)
    local source = EffectDC():Get_CardPtr(2)
    if target ~= nil and source ~= nil and TriggerObject() == target then
       return true
    end
    return false
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    local player = EffectController()
    if player ~= nil then
       player:GainLife( MTG():GetNumberOfPlayers() )
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
</CARD_V2>
And don't use Object() instead of a pointer to the card itself: I'm sure that it would work that way, but it would work also when it shouldn't (i.e. if someone removes the card from the graveyard in response to the haunt ability trigger).
< 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 Scion of Darkness » 10 May 2013, 11:40

Fire can you help me with that skip the draw card (*fake skip draw step) for the necropotence?

I've been searching it takes someting like this i think
Code: Select all
<TRIGGERED_ABILITY tag="NECROPOTENCE_RULE_1" forced_skip="1" layer="0" pre_trigger="1" zone="in_play">
      <TRIGGER value="DREW_CARD">
        override = true
        return ( TriggerPlayer() == Object():GetController() and MTG():GetStep() == STEP_DRAW and
             Object():GetController():MyTurn() ~= 0 and Player() == Object():GetController() )
      </TRIGGER>
      <EFFECT>
      </EFFECT>
    </TRIGGERED_ABILITY>
User avatar
Scion of Darkness
 
Posts: 235
Joined: 27 Aug 2012, 13:14
Has thanked: 17 times
Been thanked: 23 times

Re: Card Creation Request Thread

Postby thefiremind » 10 May 2013, 11:55

Scion of Darkness wrote:Fire can you help me with that skip the draw card (*fake skip draw step) for the necropotence?
You left a bit too many DotP2010 elements... :wink:
This should do:
Code: Select all
  <TRIGGERED_ABILITY internal="1" pre_trigger="1" priority="-10">
    <TRIGGER value="DREW_CARD" simple_qualifier="controller">
    if MTG():GetStep() == STEP_DRAW and EffectController():MyTurn() ~= 0 then
       override = 1
       return true
    end
    return false
    </TRIGGER>
  </TRIGGERED_ABILITY>
Not sure whether the priority tag helps or not, but it should grant the skip no matter what (low priority = last to resolve).
< 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 sumomole » 10 May 2013, 12:01

thefiremind wrote:It seems that I can't code the haunt ability on a spell: my calls to EffectDC():Protect_CardPtr(2) don't work. I give up and leave my code to anyone who understands how to fix it.
And don't use Object() instead of a pointer to the card itself: I'm sure that it would work that way, but it would work also when it shouldn't (i.e. if someone removes the card from the graveyard in response to the haunt ability trigger).
I do not quite understand what you mean, but i f a card with haunt is removed from the graveyard in response to its haunt ability triggering, the haunt ability will resolve.

Scion of Darkness wrote:Fire can you help me with that skip the draw card (*fake skip draw step) for the necropotence?
Skip draw card is useless, because Maralen of the Mornsong.
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Card Creation Request Thread

Postby Scion of Darkness » 10 May 2013, 13:05

Sumomole i know it's not a perfect aproach, as its impossible to achieve in dotp2013 but at least against 95% of the decks it would work but of course it has flaws
User avatar
Scion of Darkness
 
Posts: 235
Joined: 27 Aug 2012, 13:14
Has thanked: 17 times
Been thanked: 23 times

Re: Card Creation Request Thread

Postby thefiremind » 10 May 2013, 13:26

sumomole wrote:I do not quite understand what you mean
Try my code and you'll see that protecting the card pointer doesn't have any effect. In fact, if you substitute the ZONECHANGE_BEGIN trigger with a ZONECHANGE_END trigger and protect the card pointer before setting the delayed trigger, you'll be able to do one more action (exiling the spell), but it won't be attached to the creature.

sumomole wrote:if a card with haunt is removed from the graveyard in response to its haunt ability triggering, the haunt ability will resolve.
MTG Salvation wrote:If a card with haunt is removed from the graveyard in response to its haunt ability triggering, the haunt ability will resolve. But since the card can't be removed from the game, it won't haunt the target creature.
If you address the card with Object(), the pointer will never be lost and in this case the haunt ability will resolve AND haunt the target creature.
< 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 sumomole » 10 May 2013, 13:32

thefiremind wrote:
sumomole wrote:I do not quite understand what you mean
Try my code and you'll see that protecting the card pointer doesn't have any effect. In fact, if you substitute the ZONECHANGE_BEGIN trigger with a ZONECHANGE_END trigger and protect the card pointer before setting the delayed trigger, you'll be able to do one more action (exiling the spell), but it won't be attached to the creature.

sumomole wrote:if a card with haunt is removed from the graveyard in response to its haunt ability triggering, the haunt ability will resolve.
MTG Salvation wrote:If a card with haunt is removed from the graveyard in response to its haunt ability triggering, the haunt ability will resolve. But since the card can't be removed from the game, it won't haunt the target creature.
If you address the card with Object(), the pointer will never be lost and in this case the haunt ability will resolve AND haunt the target creature.
I know what you said now :mrgreen:

EDIT: Test this?

Benediction of Moons | Open
Code: Select all
  <TRIGGERED_ABILITY resource_id="1">
    <CLEANUP fire_once="1" />
    <CLEANUP simple_cleanup="EndOfTurn" />
    <TRIGGER value="ZONECHANGE_BEGIN" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_STACK">
    EffectDC():Protect_CardPtr(COMPARTMENT_ID_EFFECT_SOURCE)
    return TriggerObject() ~= nil and TriggerObject() == EffectDC():Get_CardPtr(1)
    </TRIGGER>
    <TARGET_DEFINITION id="0">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddCardType( CARD_TYPE_CREATURE )
    filter:SetZone( ZONE_IN_PLAY )
    filter:SetHint( HINT_NEUTRAL, EffectController() )
    </TARGET_DEFINITION>
    <TARGET_DETERMINATION>
    return AtLeastOneTargetFromDefinition(0)
    </TARGET_DETERMINATION>
    <PLAY_TIME_ACTION target_choosing="1">
    EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE_TO_HAUNT", EffectDC():Make_Targets(0) )
    </PLAY_TIME_ACTION>
    <PLAY_TIME_ACTION>
    if EffectSource() ~= nil and EffectSource():GetZone() == ZONE_GRAVEYARD then
      EffectDC():Protect_CardPtr(COMPARTMENT_ID_EFFECT_SOURCE)
    end
    </PLAY_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    ObjectDC():Free_Compartment(0)
    if target ~= nil and EffectSource() ~= nil then
      if EffectSource():GetZone() == ZONE_GRAVEYARD then
        EffectSource():RemoveFromGame()
      end
      if EffectSource():GetZone() == ZONE_REMOVED_FROM_GAME then
         EffectSource():NailOnto( target )
        ObjectDC():Set_CardPtr(0, target)
      end
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Card Creation Request Thread

Postby KnowledgeJunkie7 » 10 May 2013, 21:11

Hey guys, was wondering if anyone could tackle Divine Reckoning? I was looking into making a White / Black Lone attacker deck, inspired by thefiremind's "Maximum Risk" and some interesting cards I've seen on Gatherer. Appreciate it!
KnowledgeJunkie7
 
Posts: 11
Joined: 26 Apr 2013, 21:08
Has thanked: 0 time
Been thanked: 0 time

Re: Card Creation Request Thread

Postby thefiremind » 10 May 2013, 21:39

KnowledgeJunkie7 wrote:Hey guys, was wondering if anyone could tackle Divine Reckoning? I was looking into making a White / Black Lone attacker deck, inspired by thefiremind's "Maximum Risk" and some interesting cards I've seen on Gatherer. Appreciate it!
Someone liked that deck, what a surprise! :lol: :lol: :lol:

Here's Divine Reckoning. The query string probably needs to be localised.
Attachments
DIVINE_RECKONING_245196.zip
(113.61 KiB) Downloaded 330 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 Scion of Darkness » 10 May 2013, 23:12

I guess ill need more help here can someone take a look please the last ability isnt working i i think the target definition ive made sucks hehehe
Code: Select all
   <COST type="Life" points="1" />
   <TARGET_DEFINITION id="0">
    local filter = Object():GetFilter()
    local player = EffectController()
    filter:Clear()
    filter:May()
    filter:NotTargetted()
    filter:SetZone( ZONE_LIBRARY )
    filter:SetPlayer( player )   
    filter:SetPortion( 1 )     
    player:SetTargetCount( 1 )
   player:SetTargetPrompt( 0, "CARD_QUERY_CHOOSE_CARD" )
    player:ChooseTargetsWithFlags( NO_VALIDATION, EffectDC():Make_Targets(0), QUERY_FLAG_CAN_BE_FINISHED_EARLY + QUERY_FLAG_CAN_BE_FINISHED_EARLY_FOR_AI_AS_WELL )
    </TARGET_DEFINITION>
    <TARGET_DETERMINATION>
    return AtLeastOneTargetFromDefinition(0)
    </TARGET_DETERMINATION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
        EffectDC():Get_Targets(0):Protect_CardPtr(0)
       target:RemoveFromGame()
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
      local delayDC = EffectDC():Make_Chest(1)
      delayDC:Set_CardPtr(0, target)
      MTG():CreateDelayedTrigger(2, delayDC)
    end
    </RESOLUTION_TIME_ACTION>
   </ACTIVATED_ABILITY>
  <TRIGGERED_ABILITY auto_skip="1" resource_id="2">
    <TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
    return ( MTG():GetStep() == STEP_END_OF_TURN )
    </TRIGGER>
    <CLEANUP fire_once="1" />
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_CardPtr(0)
    if target ~= nill then
      target:PutIntoHand( target:GetOwner() )
    end
    </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
</CARD_V2>
User avatar
Scion of Darkness
 
Posts: 235
Joined: 27 Aug 2012, 13:14
Has thanked: 17 times
Been thanked: 23 times

Re: Card Creation Request Thread

Postby thefiremind » 10 May 2013, 23:32

You don't need any target selection... when you pay 1 life you already decided to do that, so you don't need (and you shouldn't be able) to step back. And be careful, your delayed trigger contains a "~= nill" which has 1 "L" too much. :wink:
Code: Select all
    <COST type="Life" points="1" />
    <RESOLUTION_TIME_ACTION>
    local target = EffectController():Library_GetNth(0)
    if target ~= nil then
       local delayDC = EffectDC():Make_Chest(1)
       delayDC:Set_CardPtr(0, target)
       delayDC:Protect_CardPtr(0)
       target:RemoveFromGame()
       MTG():CreateDelayedTrigger(2, delayDC)
    end
    </RESOLUTION_TIME_ACTION>
  </ACTIVATED_ABILITY>
  <TRIGGERED_ABILITY auto_skip="1" resource_id="2">
    <TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
    return ( MTG():GetStep() == STEP_END_OF_TURN )
    </TRIGGER>
    <CLEANUP fire_once="1" />
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_CardPtr(0)
    if target ~= nil then
       target:PutInHand( target:GetOwner() )
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
EDIT: Version 2.
Last edited by thefiremind on 11 May 2013, 16:20, 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

Re: Card Creation Request Thread

Postby thefiremind » 11 May 2013, 10:00

Sorry for double posting, but I wanted to bump the topic since I made a requested card I'm very proud of: Phyrexian Unlife.
I'm pasting here the important part of the code for reference:
Code: Select all
  <TRIGGERED_ABILITY internal="1" pre_trigger="1" priority="-20">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As long as you have 0 or less life, all damage is dealt to you as though its source had infect.]]></LOCALISED_TEXT>
    <!-- other localised strings omitted -->
    <TRIGGER value="PLAYER_TOOK_DAMAGE" simple_qualifier="controller">
    local source = Damage():GetSource()
    return EffectController():GetLifeTotal() &lt; 1 and
    source ~= nil and source:GetCurrentCharacteristics():Characteristic_Get( CHARACTERISTIC_INFECT ) == 0
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    local source = Damage():GetSource()
    local amount = Damage():GetAmount()
    if source ~= nil and amount &gt; 0 then
       local is_combat = Damage():IsCombat()
       local is_unpreventable = Damage():IsUnpreventable()
       Damage():SetAmount(0)
       source:GetCurrentCharacteristics():Characteristic_Set( CHARACTERISTIC_INFECT, 1 )
       EffectController():DealDamageFullParams(amount, source, is_combat, is_unpreventable)
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
The idea is simple but clever: when the player receives non-infect damage while having less than 1 life, I set that damage to zero, then I give the damage source infect for a brief moment and repeat the damage with the same parameters. The difference is that this time the source has infect. :D

It seems to work OK, but let me know if you find some particular card that interferes.
Attachments
PHYREXIAN_UNLIFE_218058.zip
(91.99 KiB) Downloaded 290 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 Necropotence » 11 May 2013, 13:33

sorry if this request is not here! I want to make cards, but do not know - sorry if it's annoying, but I like to learn and contribute to the forum shortly. from now on, thanks
Necropotence
 
Posts: 24
Joined: 05 May 2013, 05:30
Has thanked: 10 times
Been thanked: 0 time

Re: Card Creation Request Thread

Postby Kieran » 11 May 2013, 14:13

Okay, here are the final cards I need to complete my Simic deck: Gyre Sage, Cavern of Souls, Infinite Reflection, and Primal Surge (I think I saw this one somewhere).

Edit: I found Primal Surge in Deck_0009. Omit that one.
Kieran
 
Posts: 232
Joined: 03 Nov 2012, 01:09
Has thanked: 21 times
Been thanked: 16 times

Re: Card Creation Request Thread

Postby thefiremind » 11 May 2013, 14:37

There's no trick in the world that would allow you to have a working Cavern of Souls: you can't put limitations on how you can spend mana and you can't grant properties to something according to a special mana you spent for it.

Infinite Reflection will probably be a huge pain to code. Cross your fingers and hope that the problems (I'm sure there will be some) will be all solvable.
< 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 1 guest

Main Menu

User Menu

Our Partners


Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (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 1 guest

Login Form