It is currently 19 Jul 2025, 10:36
   
Text Size

Formal Request Thread

Moderator: CCGHQ Admins

Re: Formal Request Thread

Postby NeoAnderson » 25 Dec 2013, 12:43

Deadpoolmtg wrote:Thanks again NeoAnderson! :D
I have a question:
CARD_UI_TEXT4 goes on "DATA_DLC_DECK_BUILDER_CUSTOM\DATA_ALL_PLATFORMS\CARDS"?
You're welcome
The path for that file is \DATA_DLC_DECK_BUILDER_CUSTOM\DATA_ALL_PLATFORMS\TEXT_PERMANENT
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby NeoAnderson » 25 Dec 2013, 16:56

About Pyromancer Ascension and Hive Mind you cand find it inside sumomole mod: http://www.slightlymagic.net/forum/viewtopic.php?f=109&t=10914
About Pyromancer's Swath i have encountered some problems because into 2014 there isn't Set_Amount for damage and with multiply is not possible to add just 2 point of damage, probably other skilled users can put some light on this issue.
Last edited by NeoAnderson on 25 Dec 2013, 17:29, 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

Postby thefiremind » 25 Dec 2013, 17:08

NeoAnderson wrote:About Pyromancer's Swath i have encountered some problems because into 2014 there isn't Set_Amount for damage and with multiply is not possible to add just 2 point of damage, probably other skilled users can put some light on this issue.
We discussed about this before and there's no way to add damage properly in DotP2014. More about it on this post (and following).
< 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: Formal Request Thread

Postby NeoAnderson » 25 Dec 2013, 17:15

thefiremind wrote:
NeoAnderson wrote:About Pyromancer's Swath i have encountered some problems because into 2014 there isn't Set_Amount for damage and with multiply is not possible to add just 2 point of damage, probably other skilled users can put some light on this issue.
We discussed about this before and there's no way to add damage properly in DotP2014. More about it on this post (and following).
Yeah i think i have already read that post my friend :-)
For example this card require to add 2 damage point we could replace it so :

1. Damage multiply (2)
2. Damage Prevent ( (Damage():GetAmount / 2) - 2 )

Numerical example : Damage 3 points
1. Multiply(2) = 3*2 = 6
2. Prevent Amount ( (6 / 2) - 2) = (3 - 2) = 1
Total damage 6 - 1 = 5

But for some reason i received unexpected results
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby NeoAnderson » 25 Dec 2013, 17:25

Deadpoolmtg wrote:Hi guys, need the following cards to enhance the Pyromancer Ascencion(Spellweaver Helix) deck and other to make a Hive Mind deck.

Pact of the Titan (Hive Mind)

Pyromancer's Swath (Pyromancer Ascension)

Ideas Unbound (Pyromancer Ascension)
Another card requested

Ideas Unbound | Open
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="IDEAS_UNBOUND_88789" />
  <CARDNAME text="IDEAS_UNBOUND" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Ideas Unbound]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Idées délivrées]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Ideas liberadas]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Losgelöste Ideen]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Idee in Libertà]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[留まらぬ発想]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Ideas Unbound]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Ideas Unbound]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Idéias Soltas]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="88789" />
  <ARTID value="88789" />
  <ARTIST name="Mark Tedin" />
  <CASTING_COST cost="{U}{U}" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[The apprentice stared in puzzlement. “But Master, you finished writing those spells just yesterday. Don’t you remember?” The jushi’s heart froze.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[L’apprenti le regarda, étonné. « Maître, mais vous avez fini d’écrire ces sorts hier. Vous ne vous rappelez pas ? » Le sang du jushi se glaça dans ses veines.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El aprendiz lo miró atónito. “Pero maestro, terminó de escribir esos hechizos tan solo ayer. ¿No lo recuerda?” El corazón del jushi se congeló.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Der Lehrling schaute ungläubig. „Aber Meister, Ihr hattet diese Spruchrollen gerade gestern fertiggestellt. Erinnert Ihr Euch nicht?” Der Jushi erschauderte.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[L’apprendista lo fissò incredulo. “Maestro, avete finito di scrivere quelle magie soltanto ieri. Non vi ricordate?” Il cuore dello jushi si raggelò.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[弟子は困惑してそれを見つめていた。 「しかし師よ、あなたはその呪文を昨日書き終えたはずです。 憶えておられぬのですか?」 呪師の心臓は凍りついた。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[The apprentice stared in puzzlement. “But Master, you finished writing those spells just yesterday. Don’t you remember?” The jushi’s heart froze.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[The apprentice stared in puzzlement. “But Master, you finished writing those spells just yesterday. Don’t you remember?” The jushi’s heart froze.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[O aprendiz olhou confuso. “Mas Mestre, você terminou de escrever essas mágicas ainda ontem. Não se lembra?” O coração do jushi congelou.]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Sorcery" />
  <SUB_TYPE metaname="Arcane" />
  <EXPANSION value="SOK" />
  <RARITY metaname="C" />
  <SPELL_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Draw three cards. Discard three cards at the beginning of the next end step.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Piochez trois cartes. Défaussez-vous de trois cartes à la fin du tour.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Roba tres cartas. Descarta tres cartas al final del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Ziehe drei Karten. Wirf am Ende des Zuges drei Karten ab.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Pesca tre carte. Scarta tre carte all’inizio della prossima sottofase finale.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[カードを3枚引く。 ターン終了時に、カードを3枚捨てる。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Draw three cards. Discard three cards at the beginning of the next end step.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Draw three cards. Discard three cards at the beginning of the next end step.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Compre três cards. Descarte três cards no final do turno.]]></LOCALISED_TEXT>
   <RESOLUTION_TIME_ACTION>
    EffectController():DrawCards(3)
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local delayDC = EffectDC():Make_Chest(1)
    MTG():CreateDelayedTrigger(1, delayDC)
    </RESOLUTION_TIME_ACTION>
  </SPELL_ABILITY>

  <TRIGGERED_ABILITY resource_id="1">
    <TRIGGER value="BEGINNING_OF_PLAYERS_STEP" >
        return MTG():GetStep() == STEP_END_OF_TURN
    </TRIGGER>
<CLEANUP fire_once="1" />
<RESOLUTION_TIME_ACTION>
    local filter = ClearFilter()
    local target_player = EffectController()
    if target_player ~= nil then
       filter:SetZone( ZONE_HAND, target_player)
        local count = filter:Count()
        if count &gt; 2 then
           count = 3
        end
           target_player:SetItemCount( count )
       for i = 0,(count-1) do
          target_player:SetItemPrompt (i, "CARD_QUERY_CHOOSE_CARD_TO_DISCARD" )
       end
       target_player:ChooseItems( EffectDC():Make_Targets(2) )
    end
    </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
    local target_player = EffectController()
    local numTargets = EffectDC():Get_Targets(2):Count()
    if target_player ~= nil then
       for i = 0,(numTargets-1) do
          local target_card = EffectDC():Get_Targets(2):Get_CardPtr(i)
          if target_card ~= nil  then
             target_card:Discard()
          end
       end
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
</CARD_V2>
Here you can download it :
IDEAS_UNBOUND_88789.zip
Card XML + TDX
(586 KiB) Downloaded 221 times
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby NeoAnderson » 25 Dec 2013, 17:50

silver1114 wrote:I need a gyre sage that can handel any amount of counters on it and it should proly use manual mana so the mana has a mana pool
the gyre sage i have only can saport 19 +1/+1 counter then when you tap it no mater the number of countere you only get 19 green mana.
Gyre_Sage | Open
<?xml version="1.0"?>
<CARD_V2 ExportVersion="3">
<FILENAME text="GYRE_SAGE_627063" />
<CARDNAME text="GYRE_SAGE" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Sage de la spirale]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Sabia del espiral]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Weise des Wirbels]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Saggia del Cerchio]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[円環の賢者]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[나선의 현자]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Мудрец Круговорота]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Sábio da Espiral]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[回旋智者]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[迴旋智者]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="627063" />
<ARTID value="627063" />
<ARTIST name="Tyler Jacobson" />
<CASTING_COST cost="{1}{G}" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Elf" />
<SUB_TYPE metaname="Druid" />
<EXPANSION value="DPI" />
<RARITY metaname="R" />
<POWER value="1" />
<TOUGHNESS value="2" />
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Evolve |(Whenever a creature enters the battlefield under your control, if that creature has greater power or toughness than this creature, put a +1/+1 counter on this creature.)|]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Évolution |(À chaque fois qu’une créature arrive sur le champ de bataille sous votre contrôle, si sa force ou son endurance est supérieure à celle de cette créature, mettez un marqueur +1/+1 sur cette créature.)|]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Evolucionar. |(Siempre que una criatura entre al campo de batalla bajo tu control, si la fuerza o la resistencia de esa criatura es mayor que la de esta criatura, pon un contador +1/+1 sobre esta criatura.)|]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Weiterentwicklung |(Lege eine +1/+1-Marke auf diese Kreatur, immer wenn eine andere Kreatur unter deiner Kontrolle ins Spiel kommt, falls Stärke oder Widerstandskraft der anderen Kreatur höher ist.)|]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Evoluzione |(Ogniqualvolta una creatura entra nel campo di battaglia sotto il tuo controllo, se quella creatura ha forza o costituzione maggiore di questa creatura, metti un segnalino +1/+1 su questa creatura.)|]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[進化(クリーチャーが1体あなたのコントロール下で戦場に出るたび、そのクリーチャーのパワーかタフネスがこのクリーチャーよりも大きい場合、このクリーチャーの上に+1/+1カウンターを1個置く。)]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[진화 (당신이 조종하는 생물이 전장에 들어올 때마다, 그 생물의 공격력이 이 생물의 공격력보다 높거나 방어력이 이 생물의 방어력보다 높다면, 이 생물에 +1/+1 카운터 한 개를 올려놓는다.)]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Эволюция |(Каждый раз, когда существо выходит на поле битвы под вашим контролем, если сила или выносливость того существа больше, чем у этого существа, положите один жетон +1/+1 на это существо.)|]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Evoluir |(Toda vez que uma criatura entrar no campo de batalha sob o seu controle, se ela tiver poder ou resistência maior que a desta criatura, coloque um marcador +1/+1 nesta criatura.)|]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[进化(每当一个生物在你的操控下进战场时,若该生物的力量或防御力大于此生物,则在后者上放置一个+1/+1指示物。) ]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[進化(每當一個生物在你的操控下進戰場時,若該生物的力量或防禦力大於此生物,則在後者上放置一個+1/+1指示物。) ]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="objectyoucontrol" to_zone="ZONE_BATTLEFIELD">
return TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE )
</TRIGGER>
<INTERVENING_IF>
if EffectSource() ~= nil and TriggerObjectLKI() ~= nil then
local characteristics_s = EffectSource():GetCurrentCharacteristics()
local characteristics_t = TriggerObjectLKI():GetCurrentCharacteristics()
if characteristics_t:Power_Get() &gt; characteristics_s:Power_Get() or characteristics_t:Toughness_Get() &gt; characteristics_s:Toughness_Get() then
return true
end
end
return false
</INTERVENING_IF>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1)
end
</RESOLUTION_TIME_ACTION>
<AUTO_SKIP>
if EffectSource() ~= nil and TriggerObjectLKI() ~= nil then
local characteristics_s = EffectSource():GetCurrentCharacteristics()
local characteristics_t = TriggerObjectLKI():GetCurrentCharacteristics()
if characteristics_t:Power_Get() &gt; characteristics_s:Power_Get() or characteristics_t:Toughness_Get() &gt; characteristics_s:Toughness_Get() then
return false
end
end
return true
</AUTO_SKIP>
</TRIGGERED_ABILITY>
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T} : Ajoutez {G} à votre réserve pour chaque marqueur +1/+1 sur la Sage de la spirale.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: Agrega {G} a tu reserva de maná por cada contador +1/+1 sobre la Sabia del espiral.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Erhöhe deinen Manavorrat für jede +1/+1-Marke auf der Weisen des Wirbels um {G}.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Aggiungi {G} alla tua riserva di mana per ogni segnalino +1/+1 sulla Saggia del Cerchio.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}: Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: 나선의 현자가 가진 +1/+1 카운터 한 개당 {G}를 당신의 마나풀에 담는다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: добавьте {G} в ваше хранилище маны за каждый жетон +1/+1 на Мудреце Круговорота.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[{T}:回旋智者上每有一个+1/+1指示物,便加{G}到你的法术力池中。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[{T}:迴旋智者上每有一個+1/+1指示物,便加{G}到你的魔法力池中。]]></LOCALISED_TEXT>
<CONTINUOUS_ACTION layer="6">
if EffectSource() ~= nil then
local characteristics = EffectSource():GetCurrentCharacteristics()
local numCounters = EffectSourceLKI():CountCounters(MTG():PlusOnePlusOneCounters())
if numCounters &gt; 19 then
numCounters = 19
end
characteristics:GrantAbility(numCounters)
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<MANA_ABILITY resource_id="0">
<PRODUCES amount="{0}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="1">
<PRODUCES amount="{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="2">
<PRODUCES amount="{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="3">
<PRODUCES amount="{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="4">
<PRODUCES amount="{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="5">
<PRODUCES amount="{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="6">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="7">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="8">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="9">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="10">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="11">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="12">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="13">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="14">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="15">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="16">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="17">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="18">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="19">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<HELP title="MORE_INFO_TITLE_EVOLVE" body="MORE_INFO_BODY_EVOLVE" zone="ZONE_ANY" />
<SFX text="COMBAT_GREEN_MAGIC_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_GREEN_MAGIC_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
<AI_BASE_SCORE score="300" zone="ZONE_BATTLEFIELD" />
</CARD_V2>
I made a revised version of this card using Riiak Mana Function.
Gyre Sage | Open
Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="3">
   <FILENAME text="GYRE_SAGE_627063" />
   <CARDNAME text="GYRE_SAGE" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Sage de la spirale]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Sabia del espiral]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Weise des Wirbels]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Saggia del Cerchio]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[円環の賢者]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[나선의 현자]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Мудрец Круговорота]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Sábio da Espiral]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[回旋智者]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[迴旋智者]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="627063" />
   <ARTID value="627063" />
   <ARTIST name="Tyler Jacobson" />
   <CASTING_COST cost="{1}{G}" />
   <TYPE metaname="Creature" />
   <SUB_TYPE metaname="Elf" />
   <SUB_TYPE metaname="Druid" />
   <EXPANSION value="DPI" />
   <RARITY metaname="R" />
   <POWER value="1" />
   <TOUGHNESS value="2" />
   <TRIGGERED_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Evolve |(Whenever a creature enters the battlefield under your control, if that creature has greater power or toughness than this creature, put a +1/+1 counter on this creature.)|]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Évolution |(À chaque fois qu’une créature arrive sur le champ de bataille sous votre contrôle, si sa force ou son endurance est supérieure à celle de cette créature, mettez un marqueur +1/+1 sur cette créature.)|]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Evolucionar. |(Siempre que una criatura entre al campo de batalla bajo tu control, si la fuerza o la resistencia de esa criatura es mayor que la de esta criatura, pon un contador +1/+1 sobre esta criatura.)|]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Weiterentwicklung |(Lege eine +1/+1-Marke auf diese Kreatur, immer wenn eine andere Kreatur unter deiner Kontrolle ins Spiel kommt, falls Stärke oder Widerstandskraft der anderen Kreatur höher ist.)|]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Evoluzione |(Ogniqualvolta una creatura entra nel campo di battaglia sotto il tuo controllo, se quella creatura ha forza o costituzione maggiore di questa creatura, metti un segnalino +1/+1 su questa creatura.)|]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[進化(クリーチャーが1体あなたのコントロール下で戦場に出るたび、そのクリーチャーのパワーかタフネスがこのクリーチャーよりも大きい場合、このクリーチャーの上に+1/+1カウンターを1個置く。)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[진화 (당신이 조종하는 생물이 전장에 들어올 때마다, 그 생물의 공격력이 이 생물의 공격력보다 높거나 방어력이 이 생물의 방어력보다 높다면, 이 생물에 +1/+1 카운터 한 개를 올려놓는다.)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Эволюция |(Каждый раз, когда существо выходит на поле битвы под вашим контролем, если сила или выносливость того существа больше, чем у этого существа, положите один жетон +1/+1 на это существо.)|]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Evoluir |(Toda vez que uma criatura entrar no campo de batalha sob o seu controle, se ela tiver poder ou resistência maior que a desta criatura, coloque um marcador +1/+1 nesta criatura.)|]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[进化(每当一个生物在你的操控下进战场时,若该生物的力量或防御力大于此生物,则在后者上放置一个+1/+1指示物。) ]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[進化(每當一個生物在你的操控下進戰場時,若該生物的力量或防禦力大於此生物,則在後者上放置一個+1/+1指示物。) ]]></LOCALISED_TEXT>
      <TRIGGER value="ZONECHANGE_END" simple_qualifier="objectyoucontrol" to_zone="ZONE_BATTLEFIELD">
    return TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE )
    </TRIGGER>
      <INTERVENING_IF>
    if EffectSource() ~= nil and TriggerObjectLKI() ~= nil then
      local characteristics_s = EffectSource():GetCurrentCharacteristics()
      local characteristics_t = TriggerObjectLKI():GetCurrentCharacteristics()
      if characteristics_t:Power_Get() &gt; characteristics_s:Power_Get() or characteristics_t:Toughness_Get() &gt; characteristics_s:Toughness_Get() then
         return true
      end
    end
    return false
    </INTERVENING_IF>
      <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1)
    end
    </RESOLUTION_TIME_ACTION>
      <AUTO_SKIP>
    if EffectSource() ~= nil and TriggerObjectLKI() ~= nil then
      local characteristics_s = EffectSource():GetCurrentCharacteristics()
      local characteristics_t = TriggerObjectLKI():GetCurrentCharacteristics()
      if characteristics_t:Power_Get() &gt; characteristics_s:Power_Get() or characteristics_t:Toughness_Get() &gt; characteristics_s:Toughness_Get() then
         return false
      end
    end
    return true
    </AUTO_SKIP>
   </TRIGGERED_ABILITY>
<ACTIVATED_ABILITY  forced_skip="1">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T} : Ajoutez {G} à votre réserve pour chaque marqueur +1/+1 sur la Sage de la spirale.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: Agrega {G} a tu reserva de maná por cada contador +1/+1 sobre la Sabia del espiral.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Erhöhe deinen Manavorrat für jede +1/+1-Marke auf der Weisen des Wirbels um {G}.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Aggiungi {G} alla tua riserva di mana per ogni segnalino +1/+1 sulla Saggia del Cerchio.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}: Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: 나선의 현자가 가진 +1/+1 카운터 한 개당 {G}를 당신의 마나풀에 담는다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: добавьте {G} в ваше хранилище маны за каждый жетон +1/+1 на Мудреце Круговорота.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[{T}:回旋智者上每有一个+1/+1指示物,便加{G}到你的法术力池中。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[{T}:迴旋智者上每有一個+1/+1指示物,便加{G}到你的魔法力池中。]]></LOCALISED_TEXT>
      <COST type="TapSelf" />
      <PLAY_TIME_ACTION>
         RSN_MarkManaAbilityStart()
      </PLAY_TIME_ACTION>

      <RESOLUTION_TIME_ACTION>
      local  GreenString =""
      local GreenTotal = EffectSourceLKI():CountCounters(MTG():PlusOnePlusOneCounters())
      for i = 1,(GreenTotal) do
      GreenString = GreenString.."{G}"
           end
      RSN_Produce( GreenString, 1 )
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
      S_DisplayManaPool(EffectController())
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         RSN_EliminateExtraManaTokens()
         RSN_MarkManaAbilityEnd()
      </RESOLUTION_TIME_ACTION>
      <AI_AVAILABILITY window_step="upkeep" type="window" />
      <AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
      <AI_AVAILABILITY window_step="begin_combat" window_turn="their_turn" type="window" />
      <AI_AVAILABILITY window_step="declare_attackers" window_turn="their_turn" type="window" />
      <AI_AVAILABILITY window_step="declare_blockers" type="window" />
      <AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
      <AI_AVAILABILITY window_step="end_of_turn" type="window" />
      <AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
      <AI_AVAILABILITY type="in_response" response_source="1" response_target="1" />
      <AI_AVAILABILITY type="in_response" response_source="1" />
      <AI_AVAILABILITY type="in_response" response_target="1" />
   </ACTIVATED_ABILITY>
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_G" />
</CARD_V2>
Now it should add any numbers of mana to your mana pool.
GYRE_SAGE_627063.zip
Card XML + TDX
(111.71 KiB) Downloaded 246 times
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby RiiakShiNal » 25 Dec 2013, 19:41

NeoAnderson wrote:Yeah i think i have already read that post my friend :-)
For example this card require to add 2 damage point we could replace it so :

1. Damage multiply (2)
2. Damage Prevent ( (Damage():GetAmount / 2) - 2 )

Numerical example : Damage 3 points
1. Multiply(2) = 3*2 = 6
2. Prevent Amount ( (6 / 2) - 2) = (3 - 2) = 1
Total damage 6 - 1 = 5

But for some reason i received unexpected results
Well, if Damage():Multiply() will accept a floating point number then you could just multiply by (1 + (2.0 / Damage():GetAmount())), but that is only if Multiply() will work properly with floating point multipliers (and round the result).

Mathematically it works:
Code: Select all
Damage + 2 = Damage * Multiplier
(Damage + 2) / Damage = (Damage * Multiplier) / Damage
(Damage / Damage) + (2 / Damage) = Multiplier
1 + (2 / Damage) = Multiplier
Given the above for an initial damage of 4 you would get a multiplier of 1.5 with 1.5 * 4 = 6. For an initial damage of 5 you would get a multiplier of 1.4 with 1.4 * 5 = 7. For an initial damage of 9 you would get a multiplier of 1 2/9 (approximately 1.222222, actually 1.2 with a repeating decimal of 2) with 1 2/9 * 9 = 11 (1.222222 * 9 = 10.999998). For an initial damage of 3 you would get a multiplier of 1 2/3 (approximately 1.666667, actually 1.6 with a repeating decimal of 6) with 1 2/3 * 3 = 5 (1.666667 * 3 = 5.000001). Due to the approximations either the Multiply() function would have to round the result or you would have to add a very small amount to the multiplier (like 0.000001) so it will truncate to the proper value (this is assuming the Multiply function accepts floating point numbers).

Also for Gyre Sage a better way to code the mana production step would be like this:
Code: Select all
      <RESOLUTION_TIME_ACTION>
        local GreenTotal = EffectSourceLKI():CountCounters(MTG():PlusOnePlusOneCounters())
        RSN_Produce( "{G}", GreenTotal )
      </RESOLUTION_TIME_ACTION>
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby NeoAnderson » 26 Dec 2013, 00:02

RiiakShiNal wrote:Well, if Damage():Multiply() will accept a floating point number then you could just multiply by (1 + (2.0 / Damage():GetAmount())), but that is only if Multiply() will work properly with floating point multipliers (and round the result).
Mathematically it works:
Code: Select all
Damage + 2 = Damage * Multiplier
(Damage + 2) / Damage = (Damage * Multiplier) / Damage
(Damage / Damage) + (2 / Damage) = Multiplier
1 + (2 / Damage) = Multiplier
Given the above for an initial damage of 4 you would get a multiplier of 1.5 with 1.5 * 4 = 6. For an initial damage of 5 you would get a multiplier of 1.4 with 1.4 * 5 = 7. For an initial damage of 9 you would get a multiplier of 1 2/9 (approximately 1.222222, actually 1.2 with a repeating decimal of 2) with 1 2/9 * 9 = 11 (1.222222 * 9 = 10.999998). For an initial damage of 3 you would get a multiplier of 1 2/3 (approximately 1.666667, actually 1.6 with a repeating decimal of 6) with 1 2/3 * 3 = 5 (1.666667 * 3 = 5.000001). Due to the approximations either the Multiply() function would have to round the result or you would have to add a very small amount to the multiplier (like 0.000001) so it will truncate to the proper value (this is assuming the Multiply function accepts floating point numbers).
Hi my friend, the solution above, is the same TheFireMind used into the other topic, and i also tried but it doesn't work.
Probably Multiply asks for an integer parameter, or rounds it or trunc it before computing the operation.
Anyway i found another solution, it is not perfect, because Unpreventable Damage lose this characteristic, but it is the only one i found to have an approximation to these kind of card who increments the damage.

Code: Select all
  <TRIGGERED_ABILITY   replacement_effect="1">
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" simple_qualifier="objectyoucontrol" pre_trigger="1" damage_type="all">
 if (TriggerObject():GetCardType():Test(CARD_TYPE_INSTANT) or TriggerObject():GetCardType():Test(CARD_TYPE_SORCERY) ) then
    local delayDC = EffectDC():Make_Chest(0)
    delayDC:Set_CardPtr(0, TriggerObject())
    delayDC:Protect_CardPtr(0)
    delayDC:Set_PlayerPtr(1, SecondaryPlayer())
    MTG():CreateDelayedTrigger(1, delayDC)
    return true
 else
    return false
 end
</TRIGGER>
    <RESOLUTION_TIME_ACTION>
    if Damage():GetAmount() == 1 then
       Damage():Multiply(3)
    else
       Damage():Multiply(2)
    end
    </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
<TRIGGERED_ABILITY   replacement_effect="1">
 <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_OBJECT" simple_qualifier="objectyoucontrol" pre_trigger="1" damage_type="all">
 if (TriggerObject():GetCardType():Test(CARD_TYPE_INSTANT) or TriggerObject():GetCardType():Test(CARD_TYPE_SORCERY) ) then
    local delayDC = EffectDC():Make_Chest(0)
    delayDC:Set_CardPtr(0, TriggerObject())
    delayDC:Protect_CardPtr(0)
    delayDC:Set_CardPtr(1, SecondaryObject())
    delayDC:Protect_CardPtr(1)
    MTG():CreateDelayedTrigger(2, delayDC)
    return true
 else
    return false
 end
</TRIGGER>
    <RESOLUTION_TIME_ACTION>
    if Damage():GetAmount() == 1 then
       Damage():Multiply(3)
    else
       Damage():Multiply(2)
    end
    </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id ="1" replacement_effect="1">
<TRIGGER value="PLAYER_TAKES_DAMAGE" >
 local PlayerReceiving = EffectDC():Get_PlayerPtr(1)
 if TriggerPlayer() == PlayerReceiving  then
    return true
 else
    return false
 end
</TRIGGER>
<CLEANUP fire_once="1" />
    <RESOLUTION_TIME_ACTION>
    if Damage():GetAmount() &gt; 3 then
    local amount = Damage():GetAmount()
    local amountfinal = ((amount/2) - 2 )
    Damage():PreventAmount( amountfinal )
    end
    </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id ="2" replacement_effect="1">
<TRIGGER value="OBJECT_TAKES_DAMAGE" >
 local CardReceiving = EffectDC():Get_CardPtr(1)
 if TriggerObject() == CardReceiving  then
    return true
 else
    return false
 end
</TRIGGER>
<CLEANUP fire_once="1" />
    <RESOLUTION_TIME_ACTION>
    if Damage():GetAmount() &gt; 3 then
    local amount = Damage():GetAmount()
    local amountfinal = ((amount/2) - 2 )
    Damage():PreventAmount( amountfinal )
    end
    </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
As it is wrote works for damage + 2 for other increments need some modifies.
I made some tests and it seems to work properly please it you can take a look and let me know if could be ok.
RiiakShiNal wrote:Also for Gyre Sage a better way to code the mana production step would be like this:
Code: Select all
      <RESOLUTION_TIME_ACTION>
        local GreenTotal = EffectSourceLKI():CountCounters(MTG():PlusOnePlusOneCounters())
        RSN_Produce( "{G}", GreenTotal )
      </RESOLUTION_TIME_ACTION>
You're right i just take the code from a card i made sometime ago, :-)

So here you can find my version of Pyromancer's Swath (Still to be better tested)
Pyromancer's Swath | Open
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="PYROMANCERS_SWATH_370397" />
  <CARDNAME text="PYROMANCERS_SWATH" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Pyromancer’s Swath]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Percée du pyromancien]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Pasar del piromante]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Schneise des Feuerkundlers]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Falciata del Piromante]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[紅蓮術士の刈り痕]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Pyromancer’s Swath]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Покос Пироманта]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Zona de Piromântico]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="370397" />
  <ARTID value="370397" />
  <ARTIST name="Hideaki Takamura" />
  <CASTING_COST cost="{2}{R}" />
  <TYPE metaname="Enchantment" />
  <EXPANSION value="MMA" />
  <RARITY metaname="R" />
  <TRIGGERED_ABILITY   replacement_effect="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If an instant or sorcery source you control would deal damage to a creature or player, it deals that much damage plus 2 to that creature or player instead.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si une source éphémère ou rituel que vous contrôlez devait infliger des blessures à une créature ou à un joueur, elle inflige cette quantité de blessures plus 2 à cette créature ou à ce joueur à la place.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si una fuente de instantáneo o conjuro que controlas fuera a hacer daño a una criatura o jugador, en vez de eso, hace esa misma cantidad de daño más 2 a esa criatura o jugador.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls ein Quelle, die ein Spontanzauber oder eine Hexerei ist und die du kontrollierst, einer Kreatur oder einem Spieler Schadenspunkte zufügen würde, fügt sie dieser Kreatur oder diesem Spieler stattdessen so viele Schadenspunkte plus 2 zu.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se una fonte istantaneo o stregoneria che controlli sta per infliggere danno a una creatura o a un giocatore, infligge invece quell’ammontare di danni più 2 a quella creatura o a quel giocatore.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたがコントロールするインスタントかソーサリーの発生源がいずれかのクリーチャーかプレイヤーにダメージを与える場合、代わりにそれはそのクリーチャーやプレイヤーに、その点数に2を加えた点数のダメージを与える。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[If an instant or sorcery source you control would deal damage to a creature or player, it deals that much damage plus 2 to that creature or player instead.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если контролируемый вами источник мгновенного заклинания или волшебства должен нанести повреждения существу или игроку, он наносит тому существу или игроку на 2 повреждения больше вместо этого.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se uma fonte de mágica instantânea ou feitiço que você controla pode causar dano a uma criatura ou jogador, ela causará, em vez disso, aquela quantidade de dano mais 2 àquela criatura ou jogador.]]></LOCALISED_TEXT>
      <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" simple_qualifier="objectyoucontrol" pre_trigger="1" damage_type="all">
 if (TriggerObject():GetCardType():Test(CARD_TYPE_INSTANT) or TriggerObject():GetCardType():Test(CARD_TYPE_SORCERY) ) then
    local delayDC = EffectDC():Make_Chest(0)
    delayDC:Set_CardPtr(0, TriggerObject())
    delayDC:Protect_CardPtr(0)
    delayDC:Set_PlayerPtr(1, SecondaryPlayer())
    MTG():CreateDelayedTrigger(1, delayDC)
    return true
 else
    return false
 end
</TRIGGER>
    <RESOLUTION_TIME_ACTION>
    if Damage():GetAmount() == 1 then
       Damage():Multiply(3)
    else
       Damage():Multiply(2)
    end
    </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>

  <TRIGGERED_ABILITY   replacement_effect="1">
 <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_OBJECT" simple_qualifier="objectyoucontrol" pre_trigger="1" damage_type="all">
 if (TriggerObject():GetCardType():Test(CARD_TYPE_INSTANT) or TriggerObject():GetCardType():Test(CARD_TYPE_SORCERY) ) then
    local delayDC = EffectDC():Make_Chest(0)
    delayDC:Set_CardPtr(0, TriggerObject())
    delayDC:Protect_CardPtr(0)
    delayDC:Set_CardPtr(1, SecondaryObject())
    delayDC:Protect_CardPtr(1)
    MTG():CreateDelayedTrigger(2, delayDC)
    return true
 else
    return false
 end
</TRIGGER>
    <RESOLUTION_TIME_ACTION>
    if Damage():GetAmount() == 1 then
       Damage():Multiply(3)
    else
       Damage():Multiply(2)
    end
    </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>


<TRIGGERED_ABILITY resource_id ="1" replacement_effect="1">
<TRIGGER value="PLAYER_TAKES_DAMAGE" >
 local PlayerReceiving = EffectDC():Get_PlayerPtr(1)
 if TriggerPlayer() == PlayerReceiving  then
    return true
 else
    return false
 end
</TRIGGER>
<CLEANUP fire_once="1" />
    <RESOLUTION_TIME_ACTION>
    if Damage():GetAmount() &gt; 3 then
    local amount = Damage():GetAmount()
    local amountfinal = ((amount/2) - 2 )
    Damage():PreventAmount( amountfinal )
    end
    </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY resource_id ="2" replacement_effect="1">
<TRIGGER value="OBJECT_TAKES_DAMAGE" >
 local CardReceiving = EffectDC():Get_CardPtr(1)
 if TriggerObject() == CardReceiving  then
    return true
 else
    return false
 end
</TRIGGER>
<CLEANUP fire_once="1" />
    <RESOLUTION_TIME_ACTION>
    if Damage():GetAmount() &gt; 3 then
    local amount = Damage():GetAmount()
    local amountfinal = ((amount/2) - 2 )
    Damage():PreventAmount( amountfinal )
    end
    </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of each end step, discard your hand.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À la fin du tour, défaussez-vous de votre main.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Al final del turno, descarta tu mano.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wirf am Ende des Zuges alle Karten aus deiner Hand ab.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[All’inizio della sottofase finale, scarta la tua mano.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ターン終了時に、あなたは手札を捨てる。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of each end step, discard your hand.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[В конце хода, сбросьте вашу руку.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[No final do turno, descarte sua mão.]]></LOCALISED_TEXT>
      <TRIGGER value="BEGINNING_OF_STEP">
    return MTG():GetStep() == STEP_END_OF_TURN
    </TRIGGER>
     <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
      EffectController():DiscardHand()
    end
    </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
</CARD_V2>
PYROMANCERS_SWATH_370397.zip
Card XML + TDX
(521.6 KiB) Downloaded 226 times
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby Deadpoolmtg » 26 Dec 2013, 00:58

NeoAnderson wrote:
RiiakShiNal wrote:Well, if Damage():Multiply() will accept a floating point number then you could just multiply by (1 + (2.0 / Damage():GetAmount())), but that is only if Multiply() will work properly with floating point multipliers (and round the result).
Mathematically it works:
Code: Select all
Damage + 2 = Damage * Multiplier
(Damage + 2) / Damage = (Damage * Multiplier) / Damage
(Damage / Damage) + (2 / Damage) = Multiplier
1 + (2 / Damage) = Multiplier
Given the above for an initial damage of 4 you would get a multiplier of 1.5 with 1.5 * 4 = 6. For an initial damage of 5 you would get a multiplier of 1.4 with 1.4 * 5 = 7. For an initial damage of 9 you would get a multiplier of 1 2/9 (approximately 1.222222, actually 1.2 with a repeating decimal of 2) with 1 2/9 * 9 = 11 (1.222222 * 9 = 10.999998). For an initial damage of 3 you would get a multiplier of 1 2/3 (approximately 1.666667, actually 1.6 with a repeating decimal of 6) with 1 2/3 * 3 = 5 (1.666667 * 3 = 5.000001). Due to the approximations either the Multiply() function would have to round the result or you would have to add a very small amount to the multiplier (like 0.000001) so it will truncate to the proper value (this is assuming the Multiply function accepts floating point numbers).
Hi my friend, the solution above, is the same TheFireMind used into the other topic, and i also tried but it doesn't work.
Probably Multiply asks for an integer parameter, or rounds it or trunc it before computing the operation.
Anyway i found another solution, it is not perfect, because Unpreventable Damage lose this characteristic, but it is the only one i found to have an approximation to these kind of card who increments the damage.

Code: Select all
  <TRIGGERED_ABILITY   replacement_effect="1">
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" simple_qualifier="objectyoucontrol" pre_trigger="1" damage_type="all">
 if (TriggerObject():GetCardType():Test(CARD_TYPE_INSTANT) or TriggerObject():GetCardType():Test(CARD_TYPE_SORCERY) ) then
    local delayDC = EffectDC():Make_Chest(0)
    delayDC:Set_CardPtr(0, TriggerObject())
    delayDC:Protect_CardPtr(0)
    delayDC:Set_PlayerPtr(1, SecondaryPlayer())
    MTG():CreateDelayedTrigger(1, delayDC)
    return true
 else
    return false
 end
</TRIGGER>
    <RESOLUTION_TIME_ACTION>
    if Damage():GetAmount() == 1 then
       Damage():Multiply(3)
    else
       Damage():Multiply(2)
    end
    </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
<TRIGGERED_ABILITY   replacement_effect="1">
 <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_OBJECT" simple_qualifier="objectyoucontrol" pre_trigger="1" damage_type="all">
 if (TriggerObject():GetCardType():Test(CARD_TYPE_INSTANT) or TriggerObject():GetCardType():Test(CARD_TYPE_SORCERY) ) then
    local delayDC = EffectDC():Make_Chest(0)
    delayDC:Set_CardPtr(0, TriggerObject())
    delayDC:Protect_CardPtr(0)
    delayDC:Set_CardPtr(1, SecondaryObject())
    delayDC:Protect_CardPtr(1)
    MTG():CreateDelayedTrigger(2, delayDC)
    return true
 else
    return false
 end
</TRIGGER>
    <RESOLUTION_TIME_ACTION>
    if Damage():GetAmount() == 1 then
       Damage():Multiply(3)
    else
       Damage():Multiply(2)
    end
    </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id ="1" replacement_effect="1">
<TRIGGER value="PLAYER_TAKES_DAMAGE" >
 local PlayerReceiving = EffectDC():Get_PlayerPtr(1)
 if TriggerPlayer() == PlayerReceiving  then
    return true
 else
    return false
 end
</TRIGGER>
<CLEANUP fire_once="1" />
    <RESOLUTION_TIME_ACTION>
    if Damage():GetAmount() &gt; 3 then
    local amount = Damage():GetAmount()
    local amountfinal = ((amount/2) - 2 )
    Damage():PreventAmount( amountfinal )
    end
    </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id ="2" replacement_effect="1">
<TRIGGER value="OBJECT_TAKES_DAMAGE" >
 local CardReceiving = EffectDC():Get_CardPtr(1)
 if TriggerObject() == CardReceiving  then
    return true
 else
    return false
 end
</TRIGGER>
<CLEANUP fire_once="1" />
    <RESOLUTION_TIME_ACTION>
    if Damage():GetAmount() &gt; 3 then
    local amount = Damage():GetAmount()
    local amountfinal = ((amount/2) - 2 )
    Damage():PreventAmount( amountfinal )
    end
    </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
As it is wrote works for damage + 2 for other increments need some modifies.
I made some tests and it seems to work properly please it you can take a look and let me know if could be ok.
RiiakShiNal wrote:Also for Gyre Sage a better way to code the mana production step would be like this:
Code: Select all
      <RESOLUTION_TIME_ACTION>
        local GreenTotal = EffectSourceLKI():CountCounters(MTG():PlusOnePlusOneCounters())
        RSN_Produce( "{G}", GreenTotal )
      </RESOLUTION_TIME_ACTION>
You're right i just take the code from a card i made sometime ago, :-)

So here you can find my version of Pyromancer's Swath (Still to be better tested)
Pyromancer's Swath | Open
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="PYROMANCERS_SWATH_370397" />
  <CARDNAME text="PYROMANCERS_SWATH" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Pyromancer’s Swath]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Percée du pyromancien]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Pasar del piromante]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Schneise des Feuerkundlers]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Falciata del Piromante]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[紅蓮術士の刈り痕]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Pyromancer’s Swath]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Покос Пироманта]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Zona de Piromântico]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="370397" />
  <ARTID value="370397" />
  <ARTIST name="Hideaki Takamura" />
  <CASTING_COST cost="{2}{R}" />
  <TYPE metaname="Enchantment" />
  <EXPANSION value="MMA" />
  <RARITY metaname="R" />
  <TRIGGERED_ABILITY   replacement_effect="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If an instant or sorcery source you control would deal damage to a creature or player, it deals that much damage plus 2 to that creature or player instead.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si une source éphémère ou rituel que vous contrôlez devait infliger des blessures à une créature ou à un joueur, elle inflige cette quantité de blessures plus 2 à cette créature ou à ce joueur à la place.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si una fuente de instantáneo o conjuro que controlas fuera a hacer daño a una criatura o jugador, en vez de eso, hace esa misma cantidad de daño más 2 a esa criatura o jugador.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls ein Quelle, die ein Spontanzauber oder eine Hexerei ist und die du kontrollierst, einer Kreatur oder einem Spieler Schadenspunkte zufügen würde, fügt sie dieser Kreatur oder diesem Spieler stattdessen so viele Schadenspunkte plus 2 zu.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se una fonte istantaneo o stregoneria che controlli sta per infliggere danno a una creatura o a un giocatore, infligge invece quell’ammontare di danni più 2 a quella creatura o a quel giocatore.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたがコントロールするインスタントかソーサリーの発生源がいずれかのクリーチャーかプレイヤーにダメージを与える場合、代わりにそれはそのクリーチャーやプレイヤーに、その点数に2を加えた点数のダメージを与える。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[If an instant or sorcery source you control would deal damage to a creature or player, it deals that much damage plus 2 to that creature or player instead.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если контролируемый вами источник мгновенного заклинания или волшебства должен нанести повреждения существу или игроку, он наносит тому существу или игроку на 2 повреждения больше вместо этого.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se uma fonte de mágica instantânea ou feitiço que você controla pode causar dano a uma criatura ou jogador, ela causará, em vez disso, aquela quantidade de dano mais 2 àquela criatura ou jogador.]]></LOCALISED_TEXT>
      <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" simple_qualifier="objectyoucontrol" pre_trigger="1" damage_type="all">
 if (TriggerObject():GetCardType():Test(CARD_TYPE_INSTANT) or TriggerObject():GetCardType():Test(CARD_TYPE_SORCERY) ) then
    local delayDC = EffectDC():Make_Chest(0)
    delayDC:Set_CardPtr(0, TriggerObject())
    delayDC:Protect_CardPtr(0)
    delayDC:Set_PlayerPtr(1, SecondaryPlayer())
    MTG():CreateDelayedTrigger(1, delayDC)
    return true
 else
    return false
 end
</TRIGGER>
    <RESOLUTION_TIME_ACTION>
    if Damage():GetAmount() == 1 then
       Damage():Multiply(3)
    else
       Damage():Multiply(2)
    end
    </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>

  <TRIGGERED_ABILITY   replacement_effect="1">
 <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_OBJECT" simple_qualifier="objectyoucontrol" pre_trigger="1" damage_type="all">
 if (TriggerObject():GetCardType():Test(CARD_TYPE_INSTANT) or TriggerObject():GetCardType():Test(CARD_TYPE_SORCERY) ) then
    local delayDC = EffectDC():Make_Chest(0)
    delayDC:Set_CardPtr(0, TriggerObject())
    delayDC:Protect_CardPtr(0)
    delayDC:Set_CardPtr(1, SecondaryObject())
    delayDC:Protect_CardPtr(1)
    MTG():CreateDelayedTrigger(2, delayDC)
    return true
 else
    return false
 end
</TRIGGER>
    <RESOLUTION_TIME_ACTION>
    if Damage():GetAmount() == 1 then
       Damage():Multiply(3)
    else
       Damage():Multiply(2)
    end
    </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>


<TRIGGERED_ABILITY resource_id ="1" replacement_effect="1">
<TRIGGER value="PLAYER_TAKES_DAMAGE" >
 local PlayerReceiving = EffectDC():Get_PlayerPtr(1)
 if TriggerPlayer() == PlayerReceiving  then
    return true
 else
    return false
 end
</TRIGGER>
<CLEANUP fire_once="1" />
    <RESOLUTION_TIME_ACTION>
    if Damage():GetAmount() &gt; 3 then
    local amount = Damage():GetAmount()
    local amountfinal = ((amount/2) - 2 )
    Damage():PreventAmount( amountfinal )
    end
    </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY resource_id ="2" replacement_effect="1">
<TRIGGER value="OBJECT_TAKES_DAMAGE" >
 local CardReceiving = EffectDC():Get_CardPtr(1)
 if TriggerObject() == CardReceiving  then
    return true
 else
    return false
 end
</TRIGGER>
<CLEANUP fire_once="1" />
    <RESOLUTION_TIME_ACTION>
    if Damage():GetAmount() &gt; 3 then
    local amount = Damage():GetAmount()
    local amountfinal = ((amount/2) - 2 )
    Damage():PreventAmount( amountfinal )
    end
    </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of each end step, discard your hand.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À la fin du tour, défaussez-vous de votre main.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Al final del turno, descarta tu mano.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wirf am Ende des Zuges alle Karten aus deiner Hand ab.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[All’inizio della sottofase finale, scarta la tua mano.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ターン終了時に、あなたは手札を捨てる。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of each end step, discard your hand.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[В конце хода, сбросьте вашу руку.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[No final do turno, descarte sua mão.]]></LOCALISED_TEXT>
      <TRIGGER value="BEGINNING_OF_STEP">
    return MTG():GetStep() == STEP_END_OF_TURN
    </TRIGGER>
     <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
      EffectController():DiscardHand()
    end
    </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
</CARD_V2>
PYROMANCERS_SWATH_370397.zip
The cards seems to work when only one is on battlefield, when i put two more, the damage was 0. Tested with Flame Jab.

I do not know if it is normal, but at the end of opponent's turn there was an activation of an effect that could not see what happened. Similar to the effect of discarding the hand at end of turn, but the opponent do not discarded anything, the ability triggered with no apparent effect.
User avatar
Deadpoolmtg
 
Posts: 12
Joined: 02 Jul 2013, 17:25
Has thanked: 28 times
Been thanked: 0 time

Re: Formal Request Thread

Postby NeoAnderson » 26 Dec 2013, 01:55

Deadpoolmtg wrote:The cards seems to work when only one is on battlefield, when i put two more, the damage was 0. Tested with Flame Jab.
I do not know if it is normal, but at the end of opponent's turn there was an activation of an effect that could not see what happened. Similar to the effect of discarding the hand at end of turn, but the opponent do not discarded anything, the ability triggered with no apparent effect.
As i said the card were not tested well.
Anyway i tried and you're right if there are multiple instances of the card it doesn't work.
At this point i don't know if we can do something to fix it.

About the triggering at the end of turn, is normal because i didn't se any control if the player has no cards in hand, so the trigger fire anyway also if that player has no cards.(This is simple to fix.)
Tomorrow i will try to make some modifies but i really don't know if this card could work as expected.
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby NeoAnderson » 26 Dec 2013, 08:55

Deadpoolmtg wrote:The cards seems to work when only one is on battlefield, when i put two more, the damage was 0. Tested with Flame Jab.
I do not know if it is normal, but at the end of opponent's turn there was an activation of an effect that could not see what happened. Similar to the effect of discarding the hand at end of turn, but the opponent do not discarded anything, the ability triggered with no apparent effect.
Ok my friend i have made a revised version of this card now it should work also for multiple instances, i made some tests without problems, but to better understand if it correctly works please hard test it with different combos and situations and let me know.
Pyromancer's Swath | Open
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="PYROMANCERS_SWATH_370397" />
  <CARDNAME text="PYROMANCERS_SWATH" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Pyromancer’s Swath]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Percée du pyromancien]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Pasar del piromante]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Schneise des Feuerkundlers]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Falciata del Piromante]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[紅蓮術士の刈り痕]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Pyromancer’s Swath]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Покос Пироманта]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Zona de Piromântico]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="370397" />
  <ARTID value="370397" />
  <ARTIST name="Hideaki Takamura" />
  <CASTING_COST cost="{2}{R}" />
  <TYPE metaname="Enchantment" />
  <EXPANSION value="MMA" />
  <RARITY metaname="R" />
  <TRIGGERED_ABILITY   replacement_effect="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If an instant or sorcery source you control would deal damage to a creature or player, it deals that much damage plus 2 to that creature or player instead.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si une source éphémère ou rituel que vous contrôlez devait infliger des blessures à une créature ou à un joueur, elle inflige cette quantité de blessures plus 2 à cette créature ou à ce joueur à la place.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si una fuente de instantáneo o conjuro que controlas fuera a hacer daño a una criatura o jugador, en vez de eso, hace esa misma cantidad de daño más 2 a esa criatura o jugador.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls ein Quelle, die ein Spontanzauber oder eine Hexerei ist und die du kontrollierst, einer Kreatur oder einem Spieler Schadenspunkte zufügen würde, fügt sie dieser Kreatur oder diesem Spieler stattdessen so viele Schadenspunkte plus 2 zu.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se una fonte istantaneo o stregoneria che controlli sta per infliggere danno a una creatura o a un giocatore, infligge invece quell’ammontare di danni più 2 a quella creatura o a quel giocatore.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたがコントロールするインスタントかソーサリーの発生源がいずれかのクリーチャーかプレイヤーにダメージを与える場合、代わりにそれはそのクリーチャーやプレイヤーに、その点数に2を加えた点数のダメージを与える。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[If an instant or sorcery source you control would deal damage to a creature or player, it deals that much damage plus 2 to that creature or player instead.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если контролируемый вами источник мгновенного заклинания или волшебства должен нанести повреждения существу или игроку, он наносит тому существу или игроку на 2 повреждения больше вместо этого.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se uma fonte de mágica instantânea ou feitiço que você controla pode causar dano a uma criatura ou jogador, ela causará, em vez disso, aquela quantidade de dano mais 2 àquela criatura ou jogador.]]></LOCALISED_TEXT>
      <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" simple_qualifier="objectyoucontrol" pre_trigger="1" damage_type="all">
local chest = EffectController():PlayerDataChest():Get_Chest(7000)
if chest == nil then
  chest = EffectController():PlayerDataChest():Make_Chest(7000)
  chest:Set_CardPtr(0,Object())
  chest:Protect_CardPtr(0)
end
local card = chest:Get_CardPtr(0)
if card:GetRef() == Object():GetRef() then
 if (TriggerObject():GetCardType():Test(CARD_TYPE_INSTANT) or TriggerObject():GetCardType():Test(CARD_TYPE_SORCERY) ) then
    local delayDC = EffectDC():Make_Chest(0)
    delayDC:Set_CardPtr(0, TriggerObject())
    delayDC:Protect_CardPtr(0)
    delayDC:Set_PlayerPtr(1, SecondaryPlayer())
    local Cardname = Object():GetCardName()
    local filter = ClearFilter()
    filter:Add(FE_CARD_NAME, OP_IS, Cardname)
    filter:Add( FE_CONTROLLER, OP_IS, EffectController())
    local total = filter:Count()
    total = total * 2
       local dam = Damage():GetAmount()
       local totaldam = dam + total
       local finaldam = dam
       local i = 1
       while finaldam &lt; totaldam do
             finaldam = finaldam + dam
             i = i + 1
       end
    delayDC:Set_Int(3,i)
    Damage():Multiply(i)
    MTG():CreateDelayedTrigger(1, delayDC)
    return true
 else
    return false
 end
end
</TRIGGER>
   </TRIGGERED_ABILITY>

  <TRIGGERED_ABILITY   replacement_effect="1">
 <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_OBJECT" simple_qualifier="objectyoucontrol" pre_trigger="1" damage_type="all">
local chest = EffectController():PlayerDataChest():Get_Chest(7000)
if chest == nil then
  chest = EffectController():PlayerDataChest():Make_Chest(7000)
  chest:Set_CardPtr(0,Object())
  chest:Protect_CardPtr(0)
end
local card = chest:Get_CardPtr(0)
if card:GetRef() == Object():GetRef() then
 if (TriggerObject():GetCardType():Test(CARD_TYPE_INSTANT) or TriggerObject():GetCardType():Test(CARD_TYPE_SORCERY) ) then
    local delayDC = EffectDC():Make_Chest(0)
    delayDC:Set_CardPtr(0, TriggerObject())
    delayDC:Protect_CardPtr(0)
    delayDC:Set_CardPtr(1, SecondaryObject())
    delayDC:Protect_CardPtr(1)
    local Cardname = Object():GetCardName()
    local filter = ClearFilter()
    filter:Add(FE_CARD_NAME, OP_IS, Cardname)
    filter:Add( FE_CONTROLLER, OP_IS, EffectController())
    local total = filter:Count()
    total = total * 2
       local dam = Damage():GetAmount()
       local totaldam = dam + total
       local finaldam = dam
       local i = 1
       while finaldam &lt; totaldam do
             finaldam = finaldam + dam
             i = i + 1
       end
    delayDC:Set_Int(3,i)
    Damage():Multiply(i)
    MTG():CreateDelayedTrigger(2, delayDC)
    return true
 else
    return false
 end
end
</TRIGGER>
   </TRIGGERED_ABILITY>


<TRIGGERED_ABILITY resource_id ="1" replacement_effect="1">
<TRIGGER value="PLAYER_TAKES_DAMAGE" >
 local PlayerReceiving = EffectDC():Get_PlayerPtr(1)
 if TriggerPlayer() == PlayerReceiving  then
    return true
 else
    return false
 end
</TRIGGER>
<CLEANUP fire_once="1" />
    <RESOLUTION_TIME_ACTION>
    local Cardname = Object():GetCardName()
    local filter = ClearFilter()
    filter:Add(FE_CARD_NAME, OP_IS, Cardname)
    filter:Add( FE_CONTROLLER, OP_IS, EffectController())
    local total = filter:Count()
    total = total * 2
       local multiplier = EffectDC():Get_Int(3)
       local dam = Damage():GetAmount()
       dam = dam * multiplier
       local realdam = dam / multiplier
       local totaldam = realdam + total
       local damtoprevent = dam - totaldam
    Damage():PreventAmount( damtoprevent )
    </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY resource_id ="2" replacement_effect="1">
<TRIGGER value="OBJECT_TAKES_DAMAGE" >
 local CardReceiving = EffectDC():Get_CardPtr(1)
 if TriggerObject() == CardReceiving  then
    return true
 else
    return false
 end
</TRIGGER>
<CLEANUP fire_once="1" />
    <RESOLUTION_TIME_ACTION>
    local Cardname = Object():GetCardName()
    local filter = ClearFilter()
    filter:Add(FE_CARD_NAME, OP_IS, Cardname)
    filter:Add( FE_CONTROLLER, OP_IS, EffectController())
    local total = filter:Count()
    total = total * 2
       local multiplier = EffectDC():Get_Int(3)
       local dam = Damage():GetAmount()
       dam = dam * multiplier
       local realdam = dam / multiplier
       local totaldam = realdam + total
       local damtoprevent = dam - totaldam
    Damage():PreventAmount( damtoprevent )
    </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of each end step, discard your hand.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À la fin du tour, défaussez-vous de votre main.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Al final del turno, descarta tu mano.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wirf am Ende des Zuges alle Karten aus deiner Hand ab.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[All’inizio della sottofase finale, scarta la tua mano.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ターン終了時に、あなたは手札を捨てる。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of each end step, discard your hand.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[В конце хода, сбросьте вашу руку.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[No final do turno, descarte sua mão.]]></LOCALISED_TEXT>
      <TRIGGER value="BEGINNING_OF_STEP">
    return MTG():GetStep() == STEP_END_OF_TURN and EffectController():Hand_Count() &gt; 0
    </TRIGGER>
     <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
      EffectController():DiscardHand()
    end
    </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
</CARD_V2>
The concept idea is simple :
1. The card allow to trigger only one instance setting a PlayerDataChest.
2. The Instance who will trigger will consider also all the other instances of the card.
3. It retrieves the most closer index to multiply the damage.
4. It prevents the excess damage.

In the screenshoot below we have the follow play action :
On the battlefield we have 2 instance of Pyromancer's Swath we have played Sulfurous Blast.
Normally it deals 3 damage to each players if played during sorcery time.
Considering the 2 instances of Pyromancer's Swath the damage should be : 3 + 2 + 2 = 7
So the card will multiply the damage of 3 with an index of 3. We will have a damage of 9.
Making the difference between the obtained damage and the damage we should have 9 - 7 = 2 this will be the damage prevented.
Image
With this solution is easier to modify the additional damage for other cards :-)
Here you can download the revised card :

PYROMANCERS_SWATH_370397 rev A.zip
Card revised XML + TDX
(521.87 KiB) Downloaded 223 times
Last edited by NeoAnderson on 27 Dec 2013, 03:51, edited 2 times in total.
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby MC Brodie » 26 Dec 2013, 22:39

I need some help with Seht's Tiger. I couldn't figure out how to give protection to a player the normal way so I tried to code the parts of DEBT using delayed triggers. I have something working for damage and targeting but I don't know how to do the enchantments part. Any suggestions?
-----------------------------------------------------------------------
Song of the Day: 46 and 2 (cover)
MC Brodie
 
Posts: 310
Joined: 01 Jun 2013, 00:10
Has thanked: 44 times
Been thanked: 34 times

Re: Formal Request Thread

Postby thefiremind » 26 Dec 2013, 22:50

MC Brodie wrote:I need some help with Seht's Tiger. I couldn't figure out how to give protection to a player the normal way so I tried to code the parts of DEBT using delayed triggers. I have something working for damage and targeting but I don't know how to do the enchantments part. Any suggestions?
Actually, unless they screwed it up in DotP2014, it should work just like it works for creatures: set the filter, then call EffectController():Protection().
< 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: Formal Request Thread

Postby NeoAnderson » 26 Dec 2013, 23:21

thefiremind wrote:
MC Brodie wrote:I need some help with Seht's Tiger. I couldn't figure out how to give protection to a player the normal way so I tried to code the parts of DEBT using delayed triggers. I have something working for damage and targeting but I don't know how to do the enchantments part. Any suggestions?
Actually, unless they screwed it up in DotP2014, it should work just like it works for creatures: set the filter, then call EffectController():Protection().
I have not tested but try if this works (Updated i made a quick test and i also revise a small part now should work):
Seht’s Tiger UNTESTED | Open
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="SEHTS_TIGER_130347" />
  <CARDNAME text="SEHTS_TIGER" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Seht’s Tiger]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Tigre de Seht]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Tigre de Seht]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sehts Tiger]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Tigre di Seht]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[セトの虎]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Seht’s Tiger]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Тигр Сехта]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Tigre de Seht]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="130347" />
  <ARTID value="130347" />
  <ARTIST name="Thomas Gianni" />
  <CASTING_COST cost="{2}{W}{W}" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Cat" />
  <EXPANSION value="FUT" />
  <RARITY metaname="R" />
  <POWER value="3" />
  <TOUGHNESS value="3" />
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flash]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Flash]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Destello.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Aufblitzen]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Lampo]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[瞬速]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[섬광]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Миг]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Lampejo]]></LOCALISED_TEXT>
    <INTRINSIC characteristic="CHARACTERISTIC_FLASH" />
  </STATIC_ABILITY>
  <TRIGGERED_ABILITY  replacement_query="1" active_zone="ZONE_TRANSITION">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Seht’s Tiger enters the battlefield, you gain protection from the color of your choice until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quand le Tigre de Seht arrive en jeu, vous gagnez la protection contre la couleur de votre choix jusqu’à la fin du tour.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[When Seht’s Tiger enters the battlefield, you gain protection from the color of your choice until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[ Wenn Sehts Tiger ins Spiel kommt, erhältst du bis zum Ende des Zuges Schutz vor einer Farbe, die du bestimmst.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quando la Tigre di Seht entra nel campo di battaglia, hai protezione dal colore a tua scelta fino alla fine del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ セトの虎が場に出たとき、あなたはターン終了時まで、あなたが選んだ色1色に対するプロテクションを得る。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When Seht’s Tiger enters the battlefield, you gain protection from the color of your choice until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда Тигр Сехта входит в игру, вы получаете защиту от выбранного вами цвета до конца хода.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Quando Tigre de Seht entra em jogo, você ganha proteção contra a cor de sua escolha até o final do turno.]]></LOCALISED_TEXT>
   <TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
    <PLAY_TIME_ACTION>
    EffectController():ChooseColour("CARD_QUERY_CHOOSE_COLOUR", true)
    </PLAY_TIME_ACTION>

    <CONTINUOUS_ACTION layer="0">
       local filter = ClearFilter()
       filter:Add( FE_COLOUR, OP_IS, GetChosenColour() )
       EffectController():Protection()
    </CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
  </TRIGGERED_ABILITY>
  <HELP title="MORE_INFO_BADGE_TITLE_12" body="MORE_INFO_BADGE_BODY_12" zone="ZONE_ANY" />
  <SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
Hey Fire, have you seen my version of Pyromancer's Swath what you think about this solution to change the damage amount?
I know it is not exactly what we would do, but until DotP developers, decide to use functions that make sense, i think can be an acceptable approximation.
Please check the version below i have replaced DuelDataChest with PlayerDataChest due to possible conflicts when more players have this card into play.
Pyromancer's Swath | Open
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="PYROMANCERS_SWATH_370397" />
  <CARDNAME text="PYROMANCERS_SWATH" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Pyromancer’s Swath]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Percée du pyromancien]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Pasar del piromante]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Schneise des Feuerkundlers]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Falciata del Piromante]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[紅蓮術士の刈り痕]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Pyromancer’s Swath]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Покос Пироманта]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Zona de Piromântico]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="370397" />
  <ARTID value="370397" />
  <ARTIST name="Hideaki Takamura" />
  <CASTING_COST cost="{2}{R}" />
  <TYPE metaname="Enchantment" />
  <EXPANSION value="MMA" />
  <RARITY metaname="R" />
  <TRIGGERED_ABILITY   replacement_effect="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If an instant or sorcery source you control would deal damage to a creature or player, it deals that much damage plus 2 to that creature or player instead.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si une source éphémère ou rituel que vous contrôlez devait infliger des blessures à une créature ou à un joueur, elle inflige cette quantité de blessures plus 2 à cette créature ou à ce joueur à la place.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si una fuente de instantáneo o conjuro que controlas fuera a hacer daño a una criatura o jugador, en vez de eso, hace esa misma cantidad de daño más 2 a esa criatura o jugador.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls ein Quelle, die ein Spontanzauber oder eine Hexerei ist und die du kontrollierst, einer Kreatur oder einem Spieler Schadenspunkte zufügen würde, fügt sie dieser Kreatur oder diesem Spieler stattdessen so viele Schadenspunkte plus 2 zu.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se una fonte istantaneo o stregoneria che controlli sta per infliggere danno a una creatura o a un giocatore, infligge invece quell’ammontare di danni più 2 a quella creatura o a quel giocatore.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたがコントロールするインスタントかソーサリーの発生源がいずれかのクリーチャーかプレイヤーにダメージを与える場合、代わりにそれはそのクリーチャーやプレイヤーに、その点数に2を加えた点数のダメージを与える。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[If an instant or sorcery source you control would deal damage to a creature or player, it deals that much damage plus 2 to that creature or player instead.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если контролируемый вами источник мгновенного заклинания или волшебства должен нанести повреждения существу или игроку, он наносит тому существу или игроку на 2 повреждения больше вместо этого.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se uma fonte de mágica instantânea ou feitiço que você controla pode causar dano a uma criatura ou jogador, ela causará, em vez disso, aquela quantidade de dano mais 2 àquela criatura ou jogador.]]></LOCALISED_TEXT>
      <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" simple_qualifier="objectyoucontrol" pre_trigger="1" damage_type="all">
local chest = EffectController():PlayerDataChest():Get_Chest(7000)
if chest == nil then
  chest = EffectController():PlayerDataChest():Make_Chest(7000)
  chest:Set_CardPtr(0,Object())
  chest:Protect_CardPtr(0)
end
local card = chest:Get_CardPtr(0)
if card:GetRef() == Object():GetRef() then
 if (TriggerObject():GetCardType():Test(CARD_TYPE_INSTANT) or TriggerObject():GetCardType():Test(CARD_TYPE_SORCERY) ) then
    local delayDC = EffectDC():Make_Chest(0)
    delayDC:Set_CardPtr(0, TriggerObject())
    delayDC:Protect_CardPtr(0)
    delayDC:Set_PlayerPtr(1, SecondaryPlayer())
    local Cardname = Object():GetCardName()
    local filter = ClearFilter()
    filter:Add(FE_CARD_NAME, OP_IS, Cardname)
    filter:Add( FE_CONTROLLER, OP_IS, EffectController())
    local total = filter:Count()
    total = total * 2
       local dam = Damage():GetAmount()
       local totaldam = dam + total
       local finaldam = dam
       local i = 1
       while finaldam &lt; totaldam do
             finaldam = finaldam + dam
             i = i + 1
       end
    delayDC:Set_Int(3,i)
    Damage():Multiply(i)
    MTG():CreateDelayedTrigger(1, delayDC)
    return true
 else
    return false
 end
end
</TRIGGER>
   </TRIGGERED_ABILITY>

  <TRIGGERED_ABILITY   replacement_effect="1">
 <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_OBJECT" simple_qualifier="objectyoucontrol" pre_trigger="1" damage_type="all">
local chest = EffectController():PlayerDataChest():Get_Chest(7000)
if chest == nil then
  chest = EffectController():PlayerDataChest():Make_Chest(7000)
  chest:Set_CardPtr(0,Object())
  chest:Protect_CardPtr(0)
end
local card = chest:Get_CardPtr(0)
if card:GetRef() == Object():GetRef() then
 if (TriggerObject():GetCardType():Test(CARD_TYPE_INSTANT) or TriggerObject():GetCardType():Test(CARD_TYPE_SORCERY) ) then
    local delayDC = EffectDC():Make_Chest(0)
    delayDC:Set_CardPtr(0, TriggerObject())
    delayDC:Protect_CardPtr(0)
    delayDC:Set_CardPtr(1, SecondaryObject())
    delayDC:Protect_CardPtr(1)
    local Cardname = Object():GetCardName()
    local filter = ClearFilter()
    filter:Add(FE_CARD_NAME, OP_IS, Cardname)
    filter:Add( FE_CONTROLLER, OP_IS, EffectController())
    local total = filter:Count()
    total = total * 2
       local dam = Damage():GetAmount()
       local totaldam = dam + total
       local finaldam = dam
       local i = 1
       while finaldam &lt; totaldam do
             finaldam = finaldam + dam
             i = i + 1
       end
    delayDC:Set_Int(3,i)
    Damage():Multiply(i)
    MTG():CreateDelayedTrigger(2, delayDC)
    return true
 else
    return false
 end
end
</TRIGGER>
   </TRIGGERED_ABILITY>


<TRIGGERED_ABILITY resource_id ="1" replacement_effect="1">
<TRIGGER value="PLAYER_TAKES_DAMAGE" >
 local PlayerReceiving = EffectDC():Get_PlayerPtr(1)
 if TriggerPlayer() == PlayerReceiving  then
    return true
 else
    return false
 end
</TRIGGER>
<CLEANUP fire_once="1" />
    <RESOLUTION_TIME_ACTION>
    local Cardname = Object():GetCardName()
    local filter = ClearFilter()
    filter:Add(FE_CARD_NAME, OP_IS, Cardname)
    filter:Add( FE_CONTROLLER, OP_IS, EffectController())
    local total = filter:Count()
    total = total * 2
       local multiplier = EffectDC():Get_Int(3)
       local dam = Damage():GetAmount()
       dam = dam * multiplier
       local realdam = dam / multiplier
       local totaldam = realdam + total
       local damtoprevent = dam - totaldam
    Damage():PreventAmount( damtoprevent )
    </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY resource_id ="2" replacement_effect="1">
<TRIGGER value="OBJECT_TAKES_DAMAGE" >
 local CardReceiving = EffectDC():Get_CardPtr(1)
 if TriggerObject() == CardReceiving  then
    return true
 else
    return false
 end
</TRIGGER>
<CLEANUP fire_once="1" />
    <RESOLUTION_TIME_ACTION>
    local Cardname = Object():GetCardName()
    local filter = ClearFilter()
    filter:Add(FE_CARD_NAME, OP_IS, Cardname)
    filter:Add( FE_CONTROLLER, OP_IS, EffectController())
    local total = filter:Count()
    total = total * 2
       local multiplier = EffectDC():Get_Int(3)
       local dam = Damage():GetAmount()
       dam = dam * multiplier
       local realdam = dam / multiplier
       local totaldam = realdam + total
       local damtoprevent = dam - totaldam
    Damage():PreventAmount( damtoprevent )
    </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of each end step, discard your hand.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À la fin du tour, défaussez-vous de votre main.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Al final del turno, descarta tu mano.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wirf am Ende des Zuges alle Karten aus deiner Hand ab.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[All’inizio della sottofase finale, scarta la tua mano.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ターン終了時に、あなたは手札を捨てる。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of each end step, discard your hand.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[В конце хода, сбросьте вашу руку.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[No final do turno, descarte sua mão.]]></LOCALISED_TEXT>
      <TRIGGER value="BEGINNING_OF_STEP">
    return MTG():GetStep() == STEP_END_OF_TURN and EffectController():Hand_Count() &gt; 0
    </TRIGGER>
     <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
      EffectController():DiscardHand()
    end
    </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
</CARD_V2>
PYROMANCERS_SWATH_370397 rev A.zip
Card Revised ver A. XML + TDX
(521.87 KiB) Downloaded 245 times


2. I also have a question for you, and Riiak, sumomole.
Probably i already know the answer ("NO") but i want to try anyway.
There is any possibility to remove an attacking creture (after attacking declared) without using function to put it into another zone?
I mean i am coding Arabian Night set and i found some cards that works into an hypothetical sub-step after attacking declared and after blocking declared. These cards as like Ydwen Efreet or Mijae Djinn try to interact before combat damage or blocking resolution is computed, and this seems not possible into Dotp. What's your opinion about?
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby MC Brodie » 27 Dec 2013, 03:05

I know I tried that and I don't know how I could have messed that up. Thank you both. As a guy I work with says PEBCAK...
-----------------------------------------------------------------------
Song of the Day: 46 and 2 (cover)
MC Brodie
 
Posts: 310
Joined: 01 Jun 2013, 00:10
Has thanked: 44 times
Been thanked: 34 times

PreviousNext

Return to 2014

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 3 users online :: 1 registered, 0 hidden and 2 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: Bing [Bot] and 2 guests

Login Form