It is currently 30 Apr 2024, 13:25
   
Text Size

Necromaster Dragon (EDIT: Fixed, working code inside)

Moderator: CCGHQ Admins

Necromaster Dragon (EDIT: Fixed, working code inside)

Postby Chakan » 14 Apr 2015, 20:57

Hi everyone, I'm hoping someone can help me get the coding for this card right because I've been trying to get it to work for a long time now, and I've tried everything I could think of to get this card working properly, but I just can't get it going. If anyone has any idea at all, please let me know because I've been going crazy over this thing. Below is my current code that doesn't work.

Code: Select all
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" simple_qualifier="self" damage_type="combat" />
      <RESOLUTION_TIME_ACTION>
    local player = EffectController()
    if player ~= nil then
      if player:CanPayManaCost("{2}") then
          player:BeginNewMultipleChoice()
         player:AddMultipleChoiceAnswer( "UI_CONDITIONAL_QUESTION_NO" )
         player:AddMultipleChoiceAnswer( "UI_CONDITIONAL_QUESTION_YES" )
         player:AskMultipleChoiceQuestion( "OPTIONAL_ABILITY_QUESTION" )
      end
    end
  </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
    local player = EffectController()
    if player ~= nil then
       local result = player:GetMultipleChoiceResult()
       if result == 1 then
          player:PayManaCost("{2}")
     for i = 0, (1-1) do
              MTG():PutTokensOntoBattlefield( "TOKEN_ZOMBIE_2_2_B_33088177", 1, EffectController() )
          end
      if EffectSource() ~= nil then
       for i=0,MTG():GetNumberOfPlayers()-1 do
         local player = MTG():GetNthPlayer(i)
         if player ~= nil then
           if player:GetTeam() ~= EffectController():GetTeam() then
             player:MillCards( 1 )
      end
    end
</RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
Nevermind everyone! I got it working now. Here is the working code for anyone who was wondering.

Code: Select all
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard.]]></LOCALISED_TEXT>
    <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" simple_qualifier="self" damage_type="combat" />
      <RESOLUTION_TIME_ACTION>
         local controller = EffectController()
         if controller ~= nil and controller:CanPayManaCost("{2}") then
            controller:BeginNewMultipleChoice()
               controller:AddMultipleChoiceAnswer( "UI_CONDITIONAL_QUESTION_YES", controller:CanPayManaCost("{2}") )
               controller:AddMultipleChoiceAnswer("UI_CONDITIONAL_QUESTION_NO")
            controller:AskMultipleChoiceQuestion( "OPTIONAL_ABILITY_QUESTION", Object() )
         end
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         local controller = EffectController()
         if controller ~= nil and controller:CanPayManaCost("{2}") and controller:GetMultipleChoiceResult() == 0 then
            controller:PayManaCost("{2}")
            MTG():PutTokensOntoBattlefield( "TOKEN_ZOMBIE_2_2_B_33088177", 1, EffectController() )
    for i=0,MTG():GetNumberOfPlayers()-1 do
       local player = MTG():GetNthPlayer(i)
       if player ~= nil then
          if player:GetTeam() ~= EffectController():GetTeam() then
           player:MillCards( 2 )
          end
       end
    end
         end
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
User avatar
Chakan
 
Posts: 166
Joined: 07 Jun 2014, 23:08
Has thanked: 11 times
Been thanked: 10 times

Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 13 guests


Who is online

In total there are 13 users online :: 0 registered, 0 hidden and 13 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 13 guests

Login Form