It is currently 15 Aug 2018, 15:00
   
Text Size

Final Card In Set - Dire Undercurrents

User-made mods in DLC (Downloadable Content) form.
Get MTG cards here for your DotP that aren't available anywhere else!

Moderators: Xander9009, CCGHQ Admins

Final Card In Set - Dire Undercurrents

Postby diabolicseraph » 03 Apr 2013, 17:52

My Dear Code Masters [-o< - Once again seeking your assistance.

This is the last card I need to finally be able to convert my old deck to digital and play it on DOTP. However, I must be missing something as it won't seem to trigger when the proper creatures come into play. Hope you could run some fresh eyes over the code and let me know what I'm doing wrong.

May Serra's Blessing Be Upon You!

Code: Select all
?xml version='1.0' encoding='UTF-8'?>
<CARD_V2>
  <FILENAME text="DIRE_UNDERCURRENTS_153311" />
  <CARDNAME text="DIRE_UNDERCURRENTS" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Dire Undercurrents]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Courants sous-marins funestes]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Corrientes subterráneas]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Dunkle Unterströmungen]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Correnti Selvagge]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[恐るべき下層流]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Dire Undercurrents]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Жестокие Течения]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Subcorrentes Medonhas]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="153311" />
  <ARTID value="A153311" />
  <ARTIST name="Franz Vohwinkel" />
  <CASTING_COST cost="{3}{U/B}{U/B}" />
  <TYPE metaname="Enchantment" />
  <EXPANSION value="SHM" />
  <RARITY metaname="R" />
  <TRIGGERED_ABILITY dangerous="1" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever a blue creature enters the battlefield under your control, you may have target player draw a card.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu’une créature bleue arrive en jeu sous votre contrôle, vous pouvez faire que le joueur ciblé pioche une carte.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que una criatura azul entre en juego bajo tu control, puedes hacer que el jugador objetivo robe una carta.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn eine blaue Kreatur unter deiner Kontrolle ins Spiel kommt, kannst du einen Spieler deiner Wahl eine Karte ziehen lassen.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta una creatura blu entra nel campo di battaglia sotto il tuo controllo, puoi far pescare una carta a un giocatore bersaglio.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[青のクリーチャーがあなたのコントロール下で場に出るたび、プレイヤー1人を対象とする。あなたは「そのプレイヤーはカードを1枚引く。」を選んでもよい。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever a blue creature enters the battlefield under your control, you may have target player draw a card.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда синее существо входит в игру под вашим контролем, вы можете заставить целевого игрока взять карту.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que uma criatura azul entra em jogo sob seu controle, você pode fazer com que o jogador alvo compre um card.]]></LOCALISED_TEXT>
      <TRIGGER value="ZONECHANGE_END" simple_qualifier="CreatureYouControl" to_zone="ZONE_IN_PLAY" from_zone="ZONE_ANY">
      return ((TriggerObject() ~= Object() and TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0) and (TriggerObject():GetPlayer() == EffectController()) and (TriggerObject():GetColour():Test( COLOUR_BLUE ) ~= 3))
      EffectDC():Set_CardPtr( 1, TriggerObject() )
       EffectDC():LKIShield_CardPtr(1)
      end
      return false
      </TRIGGER>
      <TARGET_DEFINITION id="0">
      local filter = Object():GetFilter()
      filter:Clear()
      filter:SetFilterType( Filter_Type_Cards + Filter_Type_Players )
      filter:Setzone( ZONE_IN_PLAY )
      filter:SetHint( HINT_NEUTRAL, EffectController() )
      filter:AddCardType( CARD_TYPE_CREATURE )
      filter:AddCoulour( BLUE )
      </TARGET_DEFINITION>
      <TARGET_DETERMINATION>
      return AtLeastOneTargetFromDefinition(0)
      </TARGET_DETERMINATION>
      <PLAY_TIME_ACTION target_choosing="1">
   EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_TARGET_PLAYER", EffectDC():Make_Targets(0)       
      </PLAY_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
      local TargetPlayer = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
      local TriggerPlayer = TriggerObject():GetCardType()
      filter:Clear()
      filter:May
      if TargetPlayer ~= nil then   
      TargetPlayer():DRAWCARD() 
      end
      </RESOLUTION_TIME_ACTION>
      </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever a black creature enters the battlefield under your control, you may have target player discard a card.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu’une créature noire arrive en jeu sous votre contrôle, vous pouvez faire que le joueur ciblé se défausse d’une carte.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que una criatura negra entre en juego bajo tu control, puedes hacer que el jugador objetivo descarte una carta.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn eine schwarze Kreatur unter deiner Kontrolle ins Spiel kommt, kannst du einen Spieler deiner Wahl eine Karte abwerfen lassen.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta una creatura nera entra nel campo di battaglia sotto il tuo controllo, puoi far scartare una carta a un giocatore bersaglio.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[黒のクリーチャーがあなたのコントロール下で場に出るたび、プレイヤー1人を対象とする。あなたは「そのプレイヤーはカードを1枚捨てる。」を選んでもよい。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever a black creature enters the battlefield under your control, you may have target player discard a card.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда черное существо входит в игру под вашим контролем, вы можете заставить целевого игрока сбросить карту.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que uma criatura preta entra em jogo sob seu controle, você pode fazer com que o jogador alvo descarte um card.]]></LOCALISED_TEXT>
   <TRIGGER value="ZONECHANGE_END" simple_qualifier="CreatureYouControl" to_zone="ZONE_IN_PLAY" from_zone="ZONE_ANY">
      return ((TriggerObject() ~= Object() and TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0) and (TriggerObject():GetPlayer() == EffectController()) and (TriggerObject():GetColour():Test( COLOUR_BLACK ) ~= 3))
      EffectDC():Set_CardPtr( 1, TriggerObject() )
       EffectDC():LKIShield_CardPtr(1)
      end
      return false
      </TRIGGER>
      <TARGET_DEFINITION id="0">
      local filter = Object():GetFilter()
      filter:Clear()
      filter:SetFilterType( Filter_Type_Cards + Filter_Type_Players )
      filter:Setzone( ZONE_IN_PLAY )
      filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
      filter:AddCardType( CARD_TYPE_CREATURE )
      filter:AddCoulour( BLACK )
      </TARGET_DEFINITION>
      <TARGET_DETERMINATION>
      return AtLeastOneTargetFromDefinition(0)
      </TARGET_DETERMINATION>
      <PLAY_TIME_ACTION target_choosing="1">
   EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_TARGET_PLAYER", EffectDC():Make_Targets(1)       
      </PLAY_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
      local TargetPlayer = EffectDC():Get_Targets(1):Get_PlayerPtr(0)
      local TriggerPlayer = TriggerObject():GetCardType()
      filter:Clear()
      filter:May
      if TargetPlayer ~= nil then   
      TargetPlayer():DISCARD() 
      end
      </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
</CARD_V2>
diabolicseraph
 
Posts: 10
Joined: 18 Mar 2013, 04:12
Has thanked: 7 times
Been thanked: 0 time

Re: Final Card In Set - Dire Undercurrents

Postby NEMESiS » 03 Apr 2013, 17:58

Dire Undercurrents is already in Rogues Gallery. Do you have that deck pack with Mana Mastery? Just copy it from there, no need to remake it. If you don't have it I will upload it for you later when I have access to it.
User avatar
NEMESiS
 
Posts: 455
Joined: 03 Jan 2013, 04:02
Location: Pools of Becoming
Has thanked: 68 times
Been thanked: 21 times

Re: Final Card In Set - Dire Undercurrents

Postby thefiremind » 03 Apr 2013, 18:24

You can't decide to write something in capitals just because you feel like it, unless it's a variable that you are declaring yourself... most programming languages are case-sensitive and Lua is no exception. Filter_Type_Cards and FILTER_TYPE_CARDS are different constants. DRAWCARD() and DrawCard() are different functions. If you call something with the wrong name, you can't expect it to work.

There are other parts of your code where you used... uhm... a bit too much creativity. :mrgreen: But at least you tried, which is a necessary step to improve. :wink:

Anyway, NEMESiS is right: download the official deck packs from here if you missed them, you'll find Dire Undercurrents in deck #82 (Rogues Gallery).
< Former DotP 2012/2013/2014 modder >
Currently busy with life. Don't expect answers to PMs.
User avatar
thefiremind
Programmer
 
Posts: 3513
Joined: 07 Nov 2011, 10:55
Has thanked: 117 times
Been thanked: 715 times


Return to New MTG Cards and Decks

Who is online

Users browsing this forum: No registered users and 1 guest


Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 1 guest

Login Form