It is currently 11 Nov 2025, 16:15
   
Text Size

Formal Request Thread

Moderator: CCGHQ Admins

Re: Formal Request Thread

Postby thefiremind » 19 Jul 2013, 21:43

gorem2k wrote:I haven't tried any unleash cards yet but... what if I decide to not unleash the creature then give a +1/+1 counter later with Fangren Firstborn, Test of Faith or whatever. I'm afraid it will become unable to block after that!! right?
Right: unleash creatures cannot block with +1/+1 counters on them, no matter how or when they got them.
< 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 RiiakShiNal » 19 Jul 2013, 21:45

gorem2k wrote:I haven't tried any unleash cards yet but... what if I decide to not unleash the creature then give a +1/+1 counter later with Fangren Firstborn, Test of Faith or whatever. I'm afraid it will become unable to block after that!! right?
From the rules:
702.97. Unleash
702.97a Unleash is a keyword that represents two static abilities. "Unleash" means “You may have this permanent enter the battlefield with an additional +1/+1 counter on it" and "This permanent can’t block as long as it has a +1/+1 counter on it."
This means that regardless of how the +1/+1 counter(s) got there it can't block for as long as it has at least one.

MtG Salvation has a good page on it: Unleash
RiiakShiNal
Programmer
 
Posts: 2189
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby gorem2k » 19 Jul 2013, 21:53

Ok. I didn't know that.
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: Formal Request Thread

Postby drleg3nd » 19 Jul 2013, 22:49

ok I applied the changes but im a getting "runtime error: program:..s(x86)\steam\steampapps\common\magic2014\.\dotp_d14.exe
this application has requested the runtime to terminate it ina unusual way.please conctact the application's support team for more information"
drleg3nd
 
Posts: 528
Joined: 14 May 2012, 20:05
Has thanked: 5 times
Been thanked: 30 times

Re: Formal Request Thread

Postby thefiremind » 19 Jul 2013, 22:58

drleg3nd wrote:ok I applied the changes but im a getting "runtime error: program:..s(x86)\steam\steampapps\common\magic2014\.\dotp_d14.exe
this application has requested the runtime to terminate it ina unusual way.please conctact the application's support team for more information"
Each time you make a change you might accidentally insert new errors that weren't there before, so it's hard to guess what went wrong unless you re-post your code after each change.
And when you get a crash instead of a card simply not working, 99% of the times is due to an error in the XML structure, which everyone should be able to troubleshoot without anybody else's help (Firefox can point those errors, and Riiak's Deck Builder can too).
< 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 Master Necro » 20 Jul 2013, 05:07

NWM :D
Last edited by Master Necro on 20 Jul 2013, 06:16, edited 1 time in total.
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Formal Request Thread

Postby Ratava » 20 Jul 2013, 06:04

hi Master Necro
theres a working "Brightflame" in the "Data_DLC_Dotp2013" from sumomole
viewtopic.php?f=109&t=11066
User avatar
Ratava
 
Posts: 79
Joined: 11 Jul 2013, 12:07
Location: Germany
Has thanked: 17 times
Been thanked: 7 times

Re: Formal Request Thread

Postby Master Necro » 20 Jul 2013, 06:22

Also could anyone check my Rix Maadi code, since I didn't find similar cards I am unsure.

Code: Select all
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
   <COST mana_cost="{1}{B}{R}" type="Mana" />
   <COST type="TapSelf" />
    <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:SetFilterType( FILTER_TYPE_PLAYERS )
    </FILTER>
    <RESOLUTION_TIME_ACTION>
    if filter ~= nil then
       filter:SetZone( ZONE_HAND, target)
       target:SetItemCount( 1 )
          target:SetItemPrompt ("CARD_QUERY_CHOOSE_CARD_TO_DISCARD" )
       end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
       local target_card = EffectDC():Get_Targets(1):Get_CardPtr(i)
        if target_card ~= nil  then
          target_card:Discard()
    end
    </RESOLUTION_TIME_ACTION>
   <AVAILABILITY sorcery_time="1" />
  </ACTIVATED_ABILITY>
And as long as I'm here how do I code: "each player discards his or her hand."?
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Formal Request Thread

Postby BloodReyvyn » 20 Jul 2013, 06:53

Master Necro wrote:Also could anyone check my Rix Maadi code, since I didn't find similar cards I am unsure.

Code: Select all
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
   <COST mana_cost="{1}{B}{R}" type="Mana" />
   <COST type="TapSelf" />
    <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:SetFilterType( FILTER_TYPE_PLAYERS )
    </FILTER>
    <RESOLUTION_TIME_ACTION>
    if filter ~= nil then
       filter:SetZone( ZONE_HAND, target)
       target:SetItemCount( 1 )
          target:SetItemPrompt ("CARD_QUERY_CHOOSE_CARD_TO_DISCARD" )
       end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
       local target_card = EffectDC():Get_Targets(1):Get_CardPtr(i)
        if target_card ~= nil  then
          target_card:Discard()
    end
    </RESOLUTION_TIME_ACTION>
   <AVAILABILITY sorcery_time="1" />
  </ACTIVATED_ABILITY>
And as long as I'm here how do I code: "each player discards his or her hand."?
As far as the first ability, I just started coding a similar ability, but haven't tested it yet:

Code: Select all
    <RESOLUTION_TIME_ACTION>
      local number = MTG():GetNumberOfPlayers()
      if number ~= nil then
       for i=0,(number-1) do
         local player = MTG():GetNthPlayer(i)
         if player ~= nil then
            local filter = ClearFilter()
            filter:SetZone( ZONE_HAND, player)
           player:SetItemCount( 1 )
           for o = 0,(1-1) do
             player:SetItemPrompt (o, "CARD_QUERY_CHOOSE_CARD_TO_DISCARD" )
            end
            player:ChooseItems( EffectDC():Make_Targets(1) )
          end
        end
      end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
      local number = MTG():GetNumberOfPlayers()
      if number ~= nil then
       for i=0,(number-1) do
         local player = MTG():GetNthPlayer(i)
         if player ~= nil then
           for o = 0,(1-1) do
             local target_card = EffectDC():Get_Targets(1):Get_CardPtr(o)
             if target_card ~= nil  then
               target_card:Discard()
             end
           end
         end
       end
      end
    </RESOLUTION_TIME_ACTION>
"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
User avatar
BloodReyvyn
 
Posts: 421
Joined: 19 May 2013, 13:29
Has thanked: 53 times
Been thanked: 40 times

Re: Formal Request Thread

Postby Xander9009 » 20 Jul 2013, 06:57

Master Necro wrote:Also could anyone check my Rix Maadi code, since I didn't find similar cards I am unsure.

Code: Select all
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
   <COST mana_cost="{1}{B}{R}" type="Mana" />
   <COST type="TapSelf" />
    <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:SetFilterType( FILTER_TYPE_PLAYERS )
    </FILTER>
    <RESOLUTION_TIME_ACTION>
    if filter ~= nil then
       filter:SetZone( ZONE_HAND, target)
       target:SetItemCount( 1 )
          target:SetItemPrompt ("CARD_QUERY_CHOOSE_CARD_TO_DISCARD" )
       end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
       local target_card = EffectDC():Get_Targets(1):Get_CardPtr(i)
        if target_card ~= nil  then
          target_card:Discard()
    end
    </RESOLUTION_TIME_ACTION>
   <AVAILABILITY sorcery_time="1" />
  </ACTIVATED_ABILITY>
And as long as I'm here how do I code: "each player discards his or her hand."?
Where you use "filter" after making it, it should instead be "FilteredPlayer()". Also, the resolution block following the filter needs to be <RESOLUTION_TIME_ACTION filter_id="0"> so it knows what filter to look at. Next, when you SetZone( ZONE_HAND, target) and the other places you use "target", "target" doesn't mean anything and you don't actually have a filter. You asked about "filter", but "filter" doesn't exist (you have to make a new one each in each block). Those too should be FilteredPlayer(). Finally, you use "EffecDC():Get_Targets(1)", but you never set any targets. After you make the player choose a card, you have to set that card as a the target. I can't guarantee this will work, but it should be much closer.

Code: Select all
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
   <COST mana_cost="{1}{B}{R}" type="Mana" />
   <COST type="TapSelf" />
    <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:SetFilterType( FILTER_TYPE_PLAYERS )
    </FILTER>
    <RESOLUTION_TIME_ACTION filter_id="0">
    if FilteredPlayer() ~= nil then
       local filter = ClearFilter()
       filter:SetZone( ZONE_HAND, FilteredPlayer() )
       FilteredPlayer():SetItemCount( 1 )
          FilteredPlayer():SetItemPrompt ( "CARD_QUERY_CHOOSE_CARD_TO_DISCARD" )
       end
       FilteredPlayer():ChooseItems( EffectDC():Make_Targets(1) )
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
       local target_card = EffectDC():Get_Targets(1):Get_CardPtr(0)
        if target_card ~= nil  then
          target_card:Discard()
    end
    </RESOLUTION_TIME_ACTION>
   <AVAILABILITY sorcery_time="1" />
  </ACTIVATED_ABILITY>
I noticed a couple problems with the code I posted earlier. Unfortunately, my internet cut out before I could fix them. Hopefully this helps.
Last edited by Xander9009 on 20 Jul 2013, 08:26, edited 1 time in total.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Formal Request Thread

Postby BloodReyvyn » 20 Jul 2013, 07:35

I was thinking of trying to make Razia's Purification, but I am unsure of how to approach sacrificing unselected items. Any ideas?
"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
User avatar
BloodReyvyn
 
Posts: 421
Joined: 19 May 2013, 13:29
Has thanked: 53 times
Been thanked: 40 times

Re: Formal Request Thread

Postby Aiodren » 20 Jul 2013, 07:53

I have problems with two cards i coded and i would really appreciate some help with them.
Gyre Sage works fine from what i could see, but script_log says the following at the end:
[lua] [string "Content\Functions\RSN_MANA.LOL"]:201: attempt to perform arithmetic on a nil value
Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="GYRE_SAGE_366289" />
  <CARDNAME text="GYRE_SAGE" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="366289" />
  <ARTID value="GYRE SAGE" />
  <ARTIST name="Tyler Jacobson" />
  <CASTING_COST cost="{1}{G}" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Elf" />
  <SUB_TYPE metaname="Druid" />
  <EXPANSION value="GTC" />
  <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="de-DE"><![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="es-ES"><![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[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="it-IT"><![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="jp-JA"><![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="ko-KR"><![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="ru-RU"><![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="pt-BR"><![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>
   <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_IN_PLAY" simple_qualifier="objectyoucontrol">
    if TriggerObject():GetCurrentPower() &gt; Object():GetCurrentPower() or TriggerObject():GetCurrentToughness() &gt; Object():GetCurrentToughness() then
      return TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0
    end
    return false
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil and TriggerObject() ~= nil then
      if TriggerObject():GetCurrentPower() &gt; EffectSource():GetCurrentPower() or TriggerObject():GetCurrentToughness() &gt; EffectSource():GetCurrentToughness() then
         EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
      end
    end
    </RESOLUTION_TIME_ACTION>
  </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="de-DE"><![CDATA[{T}: Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![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}: Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.]]></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}: Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.]]></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>
   <COST type="TapSelf" />
   <PLAY_TIME_ACTION>
         RSN_MarkManaAbilityStart()
      </PLAY_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
        local counters = Object():CountCounters( MTG():PlusOnePlusOneCounters() )
      if counters ~= nil then
         RSN_Produce( "{G}", counters )
      end
      </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>
   <STATIC_ABILITY>
      <CONTINUOUS_ACTION layer="0">
         RSN_ClearCanProduceMana()
         RSN_MarkCanProduceMana( "{G}" )
      </CONTINUOUS_ACTION>
      <CONTINUOUS_ACTION layer="8">
         local oCard = EffectSource()
         if (oCard ~= nil) then
            local oCharacteristics = oCard:GetCurrentCharacteristics()
            if (((oCharacteristics ~= nil) and (oCharacteristics:Bool_Get( CHARACTERISTIC_CANT_USE_ACTIVATED_ABILITIES ))) or
               (EffectController():GetCurrentCharacteristics():Bool_Get( PLAYER_CHARACTERISTIC_CANT_ACTIVATE_NONMANA_ABILITIES ))) then
               local ncounters = Object():CountCounters( MTG():PlusOnePlusOneCounters() )
               if (ncounters &gt; 10) then
                  ncounters = 10
               end
               oCharacteristics:GrantAbility( ncounters )
            end
         end
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
   <TRIGGERED_ABILITY forced_skip="1" replacement_effect="1">
      <TRIGGER value="BEGINNING_OF_STEP" pre_trigger="1" />
      <RESOLUTION_TIME_ACTION>
         RSN_ClearProducedMana()
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
   <MANA_ABILITY resource_id="1">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="2">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="3">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="4">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}{G}{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="5">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}{G}{G}{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="6">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}{G}{G}{G}{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="7">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="8">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="9">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="10">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
   </MANA_ABILITY>
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_G" />
</CARD_V2>
Master Biomancer on the other hand does absolutely nothing but the code looks fine to me... maybe i'm not familiar enough with the coding changes from 2013 to 2014 to see the mistake here...
Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="MASTER_BIOMANCER_366352" />
  <CARDNAME text="MASTER_BIOMANCER" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Master Biomancer]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gran Biomante]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Meister-Biomagier]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Maître biomancien]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Maestro biomante]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Master Biomancer]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[숙달된 생명술사]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Искусный Биомант]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Biomante Mestre]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="366352" />
  <ARTID value="A366352" />
  <ARTIST name="Willian Murai" />
  <CASTING_COST cost="{2}{G}{U}" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“Nature is a wonderful engineer but works far too slowly for my tastes.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“La natura è un ingegnere meraviglioso, ma lavora troppo lentamente per i miei gusti.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Die Natur ist ein wunderbarer Ingenieur, aber für meinen Geschmack arbeitet sie viel zu langsam.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« La nature est une merveilleuse créatrice, mais elle travaille bien trop lentement à mon goût. »]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“La naturaleza es una ingeniera magnífica, pero trabaja muy despacio para mi gusto.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[“Nature is a wonderful engineer but works far too slowly for my tastes.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“자연은 분명 위대한 설계자지만 일하는 속도가 좀 느린 게 흠이지.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[«Конечно, лучший создатель — это сама природа, вот только больно уж медленно она работает».]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“A natureza é uma engenheira maravilhosa, mas trabalha devagar demais para o meu gosto.”]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Elf" />
  <SUB_TYPE metaname="Wizard" />
  <EXPANSION value="GTC" />
  <RARITY metaname="M" />
  <POWER value="2" />
  <TOUGHNESS value="4" />
  <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Each other creature you control enters the battlefield with a number of additional +1/+1 counters on it equal to Master Biomancer’s power and as a Mutant in addition to its other types.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogni altra creatura che controlli entra nel campo di battaglia con un numero di segnalini +1/+1 addizionali pari alla forza del Gran Biomante e come Mutante in aggiunta ai suoi altri tipi.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Jede andere Kreatur, die du kontrollierst, kommt mit so vielen zusätzlichen +1/+1-Marken ins Spiel, wie die Stärke des Meister-Biomagiers beträgt, und zusätzlich zu ihren anderen Typen als Mutant.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Chaque autre créature que vous contrôlez arrive sur le champ de bataille avec, sur elle, un nombre de marqueurs +1/+1 supplémentaires égal à la force du Maître biomancien et comme un mutant en plus de ses autres types.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cada otra criatura que controlas entra al campo de batalla con una cantidad de contadores +1/+1 adicionales iguales a la fuerza del Maestro biomante y como un Mutante además de sus otros tipos.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Each other creature you control enters the battlefield with a number of additional +1/+1 counters on it equal to Master Biomancer’s power and as a Mutant in addition to its other types.]]></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[Cada outra criatura que você controla entra no campo de batalha com uma quantidade de marcadores +1/+1 adicionais equivalente ao poder de Biomante Mestre e como Mutante além de seus outros tipos.]]></LOCALISED_TEXT>
   <TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="objectyoucontrol" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY">
    if TriggerObject() ~= Object() and TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0 then
       EffectDC():Set_CardPtr( 1, TriggerObject() )
       EffectDC():Protect_CardPtr(1)
       return true
    end
    return false
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    local source = EffectSource()
    if source == nil then
       source = Object()
    end
    TriggerObject():AddCounters( MTG():PlusOnePlusOneCounters(), source:GetCurrentPower() )
    </RESOLUTION_TIME_ACTION>
    <CONTINUOUS_ACTION layer="4">
    local creature = EffectDC():Get_CardPtr(1)
    if creature ~= nil then
       creature:GetCurrentCharacteristics():SubType_GetWritable(creature):Add( CREATURE_TYPE_MUTANT, creature )
    end
    </CONTINUOUS_ACTION>
    <DURATION>
    local creature = EffectDC():Get_CardPtr(1)
    if creature ~= nil then
       return false
    else
       return true
    end
    </DURATION>
  </TRIGGERED_ABILITY>
  <SFX text="COMBAT_PLASMA_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_PLASMA_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
  <AI_BASE_SCORE score="900" zone="ZONE_IN_PLAY" />
</CARD_V2>
I hope some of the more enlightened modders can help me here :wink:
Aiodren
 
Posts: 45
Joined: 27 Jun 2012, 07:02
Has thanked: 5 times
Been thanked: 4 times

Re: Formal Request Thread

Postby Xander9009 » 20 Jul 2013, 08:41

Aiodren wrote:I have problems with two cards i coded and i would really appreciate some help with them.
Gyre Sage works fine from what i could see, but script_log says the following at the end:
[lua] [string "Content\Functions\RSN_MANA.LOL"]:201: attempt to perform arithmetic on a nil value
Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="GYRE_SAGE_366289" />
  <CARDNAME text="GYRE_SAGE" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Gyre Sage]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="366289" />
  <ARTID value="GYRE SAGE" />
  <ARTIST name="Tyler Jacobson" />
  <CASTING_COST cost="{1}{G}" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Elf" />
  <SUB_TYPE metaname="Druid" />
  <EXPANSION value="GTC" />
  <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="de-DE"><![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="es-ES"><![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[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="it-IT"><![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="jp-JA"><![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="ko-KR"><![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="ru-RU"><![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="pt-BR"><![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>
   <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_IN_PLAY" simple_qualifier="objectyoucontrol">
    if TriggerObject():GetCurrentPower() &gt; Object():GetCurrentPower() or TriggerObject():GetCurrentToughness() &gt; Object():GetCurrentToughness() then
      return TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0
    end
    return false
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil and TriggerObject() ~= nil then
      if TriggerObject():GetCurrentPower() &gt; EffectSource():GetCurrentPower() or TriggerObject():GetCurrentToughness() &gt; EffectSource():GetCurrentToughness() then
         EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
      end
    end
    </RESOLUTION_TIME_ACTION>
  </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="de-DE"><![CDATA[{T}: Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![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}: Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.]]></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}: Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.]]></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>
   <COST type="TapSelf" />
   <PLAY_TIME_ACTION>
         RSN_MarkManaAbilityStart()
      </PLAY_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
        local counters = Object():CountCounters( MTG():PlusOnePlusOneCounters() )
      if counters ~= nil then
         RSN_Produce( "{G}", counters )
      end
      </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>
   <STATIC_ABILITY>
      <CONTINUOUS_ACTION layer="0">
         RSN_ClearCanProduceMana()
         RSN_MarkCanProduceMana( "{G}" )
      </CONTINUOUS_ACTION>
      <CONTINUOUS_ACTION layer="8">
         local oCard = EffectSource()
         if (oCard ~= nil) then
            local oCharacteristics = oCard:GetCurrentCharacteristics()
            if (((oCharacteristics ~= nil) and (oCharacteristics:Bool_Get( CHARACTERISTIC_CANT_USE_ACTIVATED_ABILITIES ))) or
               (EffectController():GetCurrentCharacteristics():Bool_Get( PLAYER_CHARACTERISTIC_CANT_ACTIVATE_NONMANA_ABILITIES ))) then
               local ncounters = Object():CountCounters( MTG():PlusOnePlusOneCounters() )
               if (ncounters &gt; 10) then
                  ncounters = 10
               end
               oCharacteristics:GrantAbility( ncounters )
            end
         end
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
   <TRIGGERED_ABILITY forced_skip="1" replacement_effect="1">
      <TRIGGER value="BEGINNING_OF_STEP" pre_trigger="1" />
      <RESOLUTION_TIME_ACTION>
         RSN_ClearProducedMana()
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
   <MANA_ABILITY resource_id="1">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="2">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="3">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="4">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}{G}{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="5">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}{G}{G}{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="6">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}{G}{G}{G}{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="7">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="8">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="9">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
   </MANA_ABILITY>
   <MANA_ABILITY resource_id="10">
      <COST type="TapSelf" />
      <PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
   </MANA_ABILITY>
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_G" />
</CARD_V2>
Master Biomancer on the other hand does absolutely nothing but the code looks fine to me... maybe i'm not familiar enough with the coding changes from 2013 to 2014 to see the mistake here...
Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="MASTER_BIOMANCER_366352" />
  <CARDNAME text="MASTER_BIOMANCER" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Master Biomancer]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gran Biomante]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Meister-Biomagier]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Maître biomancien]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Maestro biomante]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Master Biomancer]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[숙달된 생명술사]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Искусный Биомант]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Biomante Mestre]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="366352" />
  <ARTID value="A366352" />
  <ARTIST name="Willian Murai" />
  <CASTING_COST cost="{2}{G}{U}" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“Nature is a wonderful engineer but works far too slowly for my tastes.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“La natura è un ingegnere meraviglioso, ma lavora troppo lentamente per i miei gusti.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Die Natur ist ein wunderbarer Ingenieur, aber für meinen Geschmack arbeitet sie viel zu langsam.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« La nature est une merveilleuse créatrice, mais elle travaille bien trop lentement à mon goût. »]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“La naturaleza es una ingeniera magnífica, pero trabaja muy despacio para mi gusto.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[“Nature is a wonderful engineer but works far too slowly for my tastes.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“자연은 분명 위대한 설계자지만 일하는 속도가 좀 느린 게 흠이지.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[«Конечно, лучший создатель — это сама природа, вот только больно уж медленно она работает».]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“A natureza é uma engenheira maravilhosa, mas trabalha devagar demais para o meu gosto.”]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Elf" />
  <SUB_TYPE metaname="Wizard" />
  <EXPANSION value="GTC" />
  <RARITY metaname="M" />
  <POWER value="2" />
  <TOUGHNESS value="4" />
  <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Each other creature you control enters the battlefield with a number of additional +1/+1 counters on it equal to Master Biomancer’s power and as a Mutant in addition to its other types.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogni altra creatura che controlli entra nel campo di battaglia con un numero di segnalini +1/+1 addizionali pari alla forza del Gran Biomante e come Mutante in aggiunta ai suoi altri tipi.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Jede andere Kreatur, die du kontrollierst, kommt mit so vielen zusätzlichen +1/+1-Marken ins Spiel, wie die Stärke des Meister-Biomagiers beträgt, und zusätzlich zu ihren anderen Typen als Mutant.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Chaque autre créature que vous contrôlez arrive sur le champ de bataille avec, sur elle, un nombre de marqueurs +1/+1 supplémentaires égal à la force du Maître biomancien et comme un mutant en plus de ses autres types.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cada otra criatura que controlas entra al campo de batalla con una cantidad de contadores +1/+1 adicionales iguales a la fuerza del Maestro biomante y como un Mutante además de sus otros tipos.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Each other creature you control enters the battlefield with a number of additional +1/+1 counters on it equal to Master Biomancer’s power and as a Mutant in addition to its other types.]]></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[Cada outra criatura que você controla entra no campo de batalha com uma quantidade de marcadores +1/+1 adicionais equivalente ao poder de Biomante Mestre e como Mutante além de seus outros tipos.]]></LOCALISED_TEXT>
   <TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="objectyoucontrol" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY">
    if TriggerObject() ~= Object() and TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0 then
       EffectDC():Set_CardPtr( 1, TriggerObject() )
       EffectDC():Protect_CardPtr(1)
       return true
    end
    return false
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    local source = EffectSource()
    if source == nil then
       source = Object()
    end
    TriggerObject():AddCounters( MTG():PlusOnePlusOneCounters(), source:GetCurrentPower() )
    </RESOLUTION_TIME_ACTION>
    <CONTINUOUS_ACTION layer="4">
    local creature = EffectDC():Get_CardPtr(1)
    if creature ~= nil then
       creature:GetCurrentCharacteristics():SubType_GetWritable(creature):Add( CREATURE_TYPE_MUTANT, creature )
    end
    </CONTINUOUS_ACTION>
    <DURATION>
    local creature = EffectDC():Get_CardPtr(1)
    if creature ~= nil then
       return false
    else
       return true
    end
    </DURATION>
  </TRIGGERED_ABILITY>
  <SFX text="COMBAT_PLASMA_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_PLASMA_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
  <AI_BASE_SCORE score="900" zone="ZONE_IN_PLAY" />
</CARD_V2>
I hope some of the more enlightened modders can help me here :wink:
I have no idea about the RSN function issue, sorry. But for the other card, it could be a few things that I see. The first is that you keep calling Object(). That might work, I have no idea, but I know that every time I've seen a card refer to itself, it uses EffectSource().

Next, when a card becomes a creature, it usually uses the following:

Code: Select all
local characteristics = EffectSource():GetCurrentCharacteristics()
if characteristics ~= nil then
     characteristics:CardType_GetWritable():Add( CARD_TYPE_CREATURE )
     characteristics:SubType_GetWritable():Add( CREATURE_TYPE_MUTANT )
Nest, getting a creature's power is done with source:GetCurrentCharacteristics():Power_Get().

Finally, the main one, I think this
Code: Select all
<TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
will make the ability only be available if Master Biomancer is currently changing zones. Remove the active zone restriction. It should be available while Master Biomancer is on the battlefield (I think that's the default, so it shouldn't need declared), and triggered by OTHER things changing zones.

Any of those things might not be 100% accurate. I'm still fairly new and learning as I go, but I hope they're helpful.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Formal Request Thread

Postby Aiodren » 20 Jul 2013, 09:16

Thanks for the quick help Xander :D
the function GetCurrentPower() was a shortcut function for GetCurrentCharacteristics():Power_Get() in dotp 2013 and, judging from the wiki, is supported in 2014, whereas Object() may really be outdated now^^
Next, when a card becomes a creature, it usually uses the following:

Code: Select all
local characteristics = EffectSource():GetCurrentCharacteristics()
if characteristics ~= nil then
characteristics:CardType_GetWritable():Add( CARD_TYPE_CREATURE )
characteristics:SubType_GetWritable():Add( CREATURE_TYPE_MUTANT )
The cards that get the counters and become mutants already are creatures, so i don't think there is a need for characteristics:CardType_GetWritable():Add( CARD_TYPE_CREATURE )
But your last tip most likely solves the problem. I don't have time right now to test it, but i will do later today and post the results :)
Aiodren
 
Posts: 45
Joined: 27 Jun 2012, 07:02
Has thanked: 5 times
Been thanked: 4 times

Re: Formal Request Thread

Postby thefiremind » 20 Jul 2013, 09:43

BloodReyvyn wrote:I was thinking of trying to make Razia's Purification, but I am unsure of how to approach sacrificing unselected items. Any ideas?
Try this:
Razia's Purification ability (untested) | Open
Code: Select all
  <SPELL_ABILITY>
    -- Localised text omitted
    <RESOLUTION_TIME_ACTION repeating="1">
    local n = MTG():GetActionRepCount()
    local nPlayers = MTG():GetNumberOfPlayers()
    if n &lt; nPlayers then
       local player = MTG():GetNthPlayer(n)
       local filter = ClearFilter()
       filter:Add( FE_CONTROLLER, OP_IS, player )
       -- filter permanent types here, if you want compatibility with invisible mana tokens!
       local max_count = filter:CountStopAt(3)
       player:SetItemCount(max_count)
       if max_count &gt; 0 then
          for i=0,max_count-1 do
             player:SetItemPrompt( i, "CARD_QUERY_CHOOSE_PERMANENT_TO_KEEP" )
          end
          player:ChooseItems( EffectDC():Make_Targets(n) )
       end
       return true
    end
    return false
    </RESOLUTION_TIME_ACTION>
    <FILTER filter_id="0">
    local filter = ClearFilter()
    -- filter permanent types here, if you want compatibility with invisible mana tokens!
    for pIndex=0,MTG():GetNumberOfPlayers()-1 do
       local targetDC = EffectDC():Get_Targets(pIndex)
       if targetDC ~= nil then
          for tIndex=0,2 do
             local target = targetDC:Get_CardPtr(tIndex)
             if target ~= nil then
                filter:Add( FE_CARD_INSTANCE, OP_NOT, target )
             end
          end
       end
    end
    </FILTER>
    <RESOLUTION_TIME_ACTION filter_id="0">
    if FilteredCard() ~= nil then
       FilteredCard():GetPlayer():Sacrifice( FilteredCard() )
    end
    </RESOLUTION_TIME_ACTION>
  </SPELL_ABILITY>
---------------------

About Master Biomancer, if Clone effects didn't change from DotP2013, that code will have a problem even if it usually works. When you make a Clone enter the battlefield, the ZONECHANGE_TRANSITION triggers are re-fired after you choose the creature to clone, this makes the Clone get his +1/+1 counters twice. The workaround I used in DotP2013 was to make a trigger that triggers on ZONECHANGE_BEGIN from ZONE_ANY to ZONE_BATTLEFIELD, which starts a delayed trigger that is specific for the creature that is changing zone, and actually adds the counters on ZONECHANGE_TRANSITION as you usually do. This will add the counters only once per creature, no matter what. I'll produce some code later.

EDIT: The Clone effects still give the same problem, so here's my updated Master Biomancer.
Attachments
MASTER_BIOMANCER_366352.zip
Unprefixed, tested with Clone, illustration included
(118.96 KiB) Downloaded 422 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

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 9 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 9 users online :: 0 registered, 0 hidden and 9 guests (based on users active over the past 10 minutes)
Most users ever online was 9824 on 10 Nov 2025, 04:33

Users browsing this forum: No registered users and 9 guests

Login Form