It is currently 20 Jul 2025, 12:54
   
Text Size

Formal Request Thread

Moderator: CCGHQ Admins

Re: Formal Request Thread

Postby MC Brodie » 29 Nov 2013, 06:08

wtb300 wrote:Plasm Capture seems similar to Mana Drain from Sumos mod. Maybe a good place to start.
Also I would love a Guilty Conscience if anyone wants to take a crack at it.
You should try them both if you would like the practice :).

For Plasm Capture, the SPELL_ABILITY would be the same as Mana Drain. You could also use the same TRIGGER from the delayed trigger if you delete the STEP_MAIN_2 check. To code the "add X mana in any combination of colors to your mana pool", what I was considering the interesting part, you can look at how Riiak coded the first Planeswalker ability for Xenagos, the Reveler. You'll have to expand it from only {G} / {R} to all colors but it's a great starting point.

For Guilty Conscience, the SPELL_ABILITY is the same as pretty much any creature aura so that should be easy to look up. Then you need to add a TRIGGERED_ABILITY for the second part of the card. For the trigger try this code:

Code: Select all
<TRIGGER value="SOURCE_DEALS_DAMAGE">
return TriggerObject() == EffectSource():GetParent()
</TRIGGER>
Then for the RESOLUTION_TIME_ACTION blocks it would be something like Necropolis Regent (in the vanilla game) to get how much damage was dealt and a card like Jinxed Idol (also in the vanilla game) to deal the damage back to the creature.
-----------------------------------------------------------------------
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 wtb300 » 29 Nov 2013, 09:22

Guilty Conscience is done and working. Very nice combo with Stuffy Doll.
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="GUILTY_CONSCIENCE_300046464" />
  <CARDNAME text="GUILTY_CONSCIENCE" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Guilty Conscience]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Conscience coupable]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Remordimiento de conciencia]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Gewissensschuld]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Coscienza Sporca]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Guilty Conscience]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Guilty Conscience]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Guilty Conscience]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Consciência Pesada]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="300046464" />
  <ARTID value="300046464" />
  <ARTIST name="Christopher Moeller" />
  <CASTING_COST cost="{W}" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Those who most feel guilt don’t need to, while those who most need to feel guilt never do.
—Order proverb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Ceux qui se sentent coupables le sont rarement. Ceux qui ne se sentent pas coupables le sont toujours. »
—Proverbe de l’Ordre]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Los que más sienten culpa, no necesitan sentirla, mientras que aquéllos que más necesitan sentir culpa, nunca la sienten.
Proverbio de la Orden]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Diejenigen, die sich am schuldigsten fühlen, haben den wenigsten Grund dazu, während die, die sich schuldig fühlen müssten, es nie tun.”
—Sprichwort des Ordens]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Coloro che si sentono più colpevoli non ne hanno motivo, mentre quelli che dovrebbero sentirsi colpevoli non provano alcun rimorso.
—proverbio dell’Ordine]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Those who most feel guilt don’t need to, while those who most need to feel guilt never do.
—Order proverb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Those who most feel guilt don’t need to, while those who most need to feel guilt never do.
—Order proverb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Those who most feel guilt don’t need to, while those who most need to feel guilt never do.
—Order proverb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“Os que mais sentem culpa não necessitam senti-la, enquanto os que mais necessitam nunca a sentem.”
—Provérbio da Ordem]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Enchantment" />
  <SUB_TYPE metaname="Aura" />
  <EXPANSION value="SCG" />
  <RARITY metaname="C" />
  <SPELL_ABILITY attach_definition="0">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchant creature]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanter : créature]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Encantar criatura.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Verzaubert eine Kreatur]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Incanta creatura]]></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[Encantar criatura]]></LOCALISED_TEXT>
    <TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_ENCHANT" definition="0" compartment="0" count="1" />
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
    </TARGET_DEFINITION>
    <RESOLUTION_TIME_ACTION>
      local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if (target ~= nil and EffectSource() ~= nil) then
         EffectSource():Attach( target )
       end
    </RESOLUTION_TIME_ACTION>
    <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ALLIED_ONLY" />
  </SPELL_ABILITY>
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever enchanted creature deals damage, Guilty Conscience deals that much damage to that creature.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Whenever enchanted creature deals damage, Guilty Conscience deals that much damage to that creature.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Whenever enchanted creature deals damage, Guilty Conscience deals that much damage to that creature.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Whenever enchanted creature deals damage, Guilty Conscience deals that much damage to that creature.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta la creatura incantata infligge danno, la Coscienza Sporca infligge altrettanto danno alla creatura incantata.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Whenever enchanted creature deals damage, Guilty Conscience deals that much damage to that creature.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever enchanted creature deals damage, Guilty Conscience deals that much damage to that creature.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Whenever enchanted creature deals damage, Guilty Conscience deals that much damage to that creature.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Whenever enchanted creature deals damage, Guilty Conscience deals that much damage to that creature.]]></LOCALISED_TEXT>
    <TRIGGER value="SOURCE_DEALS_DAMAGE">
    return TriggerObject() == EffectSource():GetParent()
    </TRIGGER>   
    <RESOLUTION_TIME_ACTION>
    local triggerObject = TriggerObject()
      if triggerObject ~= nil then
       local damage = Damage():GetAmount()
       if damage ~= nil then
          EffectSourceLKI():DealDamageTo( damage, triggerObject )
        end
      end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
</CARD_V2>
Last edited by wtb300 on 30 Nov 2013, 02:06, edited 1 time in total.
wtb300
 
Posts: 46
Joined: 02 Nov 2013, 21:04
Has thanked: 5 times
Been thanked: 0 time

Re: Formal Request Thread

Postby thefiremind » 29 Nov 2013, 09:36

MC Brodie wrote:But when I switched from EffectSource() to Object() the card worked fine. Why won't EffectSource() work in this instance?
The AVAILABILITY block is a particular one because the game probably runs its code when the pointers that are automatically set for each ability haven't been set yet. Even EffectController() doesn't always work in AVAILABILITY (sometimes it does, but I don't know what it depends on).
< 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 » 29 Nov 2013, 17:14

Hi guys,
I need an help.
I am trying to retrieve the card with greater Mana symbol of a colour, between the cards in my hand, to make the difference between the basic land of a type i have onto battlefield.

I made this code :
Code: Select all
   
-- this block is just to retrieve the number of forest i have on battlefield
    <RESOLUTION_TIME_ACTION>
     local filter = ClearFilter()
      filter:Add( FE_SUPERTYPE, OP_IS, SUPERTYPE_BASIC )
      filter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
      filter:Add( FE_SUBTYPE, OP_IS, LAND_TYPE_FOREST )
      filter:SetZone(ZONE_BATTLEFIELD, EffectController())
      local numlands = filter:Count()
      EffectDC():Set_Int(50, numlands)
      EffectDC():Set_Int(51, 0)
    </RESOLUTION_TIME_ACTION>


-- this block should retrieve the difference between the card with greatest number of green mana symbol   and the number of forests onto battlefield.
<RESOLUTION_TIME_ACTION>
    local filter = ClearFilter()
    filter:Add( FE_COLOUR, OP_IS, COLOUR_GREEN )
    filter:SetZone(ZONE_HAND, EffectController())
    local number = filter:EvaluateObjects()
    local NumOfLands = EffectDC():Get_Int(50)
    local i = 0
    local TempLands = 0
    local LandsToPutOnBattlefield = 0
    local CurrentChromaCount = 0
     for i = 0, (number-1) do
         local card = filter:GetNthEvaluatedObject(i)
         if card ~= nil then
            filter:Add (FE_CARD_INSTANCE, OP_IS, filter:GetNthEvaluatedObject(i) )
            CurrentChromaCount =  filter:ChromaCount(COLOUR_GREEN)
            if CurrentChromaCount &gt; NumOfLands then
               LandsToPutOnBattlefield = CurrentChromaCount - NumOfLands
               if LandsToPutOnBattlefield &gt; TempLands then
                   EffectDC():Set_Int(51, LandsToPutOnBattlefield)                       
                   TempLands = LandsToPutOnBattlefield
               end
            end
        end
    end
</RESOLUTION_TIME_ACTION>
My problem is that it seems not considering all the cards into hand.
I am sure the problem is about the filter action : filter:Add (FE_CARD_INSTANCE, OP_IS, filter:GetNthEvaluatedObject(i) ) .
Without this call i retrieve the total of the green mana symbols in my hand.
If i use filter:Add (FE_CARD_INSTANCE, OP_IS, card ) . doesn't work.

Any idea??
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby thefiremind » 29 Nov 2013, 19:07

As soon as you add 2 FE_CARD_INSTANCE conditions in a filter that is set to "and" (as default), the filter will get no cards because a card can't be an instance of 2 cards at the same time... and if you clear the filter, I'm afraid that GetNthEvaluatedObject won't remember the cards that were in the filter when you evaluated it.

Since you are interested in the cards in your hand, I'd suggest to use the filter only for the chroma count, and loop through the cards with Hand_GetNth:
Code: Select all
   -- this block should retrieve the difference between the card with greatest number of green mana symbol   and the number of forests onto battlefield.
<RESOLUTION_TIME_ACTION>
    local player = EffectController()
    local filter = ClearFilter()
    local number = player:Hand_Count()
    local NumOfLands = EffectDC():Get_Int(50)
    local TempLands = 0
    local LandsToPutOnBattlefield = 0
    local CurrentChromaCount = 0
     for i = 0, (number-1) do
         local card = player:Hand_GetNth(i)
         if card ~= nil then
             filter:Clear()
             filter:SetZone(ZONE_HAND, player)
             filter:Add(FE_CARD_INSTANCE, OP_IS, card)
             CurrentChromaCount =  filter:ChromaCount(COLOUR_GREEN)
            if CurrentChromaCount &gt; NumOfLands then
               LandsToPutOnBattlefield = CurrentChromaCount - NumOfLands
               if LandsToPutOnBattlefield &gt; TempLands then
                   EffectDC():Set_Int(51, LandsToPutOnBattlefield)                       
                   TempLands = LandsToPutOnBattlefield
               end
            end
        end
    end
</RESOLUTION_TIME_ACTION>
< 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 wtb300 » 29 Nov 2013, 21:49

I gave Plasm Capture another try. I at least get the option to chose a color but only once and I don't think it actually gives it to me.
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="PLASM_CAPTURE_300369069" />
  <CARDNAME text="PLASM_CAPTURE" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Plasm Capture]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Capture de plasme]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Captura del plasma]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Plasmafang]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Plasmacattura]]></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[Plasm Capture]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="300369069" />
  <ARTID value="300369069" />
  <ARTIST name="Chase Stone" />
  <CASTING_COST cost="{U}" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“Everything serves a purpose. Even you.”
Vorel of the Hull Clade]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Tout le monde sert une cause. Même toi. »
—Vorel du Cladus Coque]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“Todo tiene un propósito. Incluso tú.”
—Vorel del Clado de la Vaina]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Alles dient einem Zweck. Auch du.”
—Vorel von der Hülsenklade]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Tutto serve per uno scopo. Persino tu.”
—Vorel del Clade del Carapace]]></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[“Everything serves a purpose. Even you.”
Vorel of the Hull Clade]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Instant" />
  <EXPANSION value="DGM" />
  <RARITY metaname="R" />
  <SPELL_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Counter target spell. At the beginning of your next precombat main phase, add X mana in any combination of colors to your mana pool, where X is that spell’s converted mana cost.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Contrecarrez le sort ciblé. Au début de votre prochaine première phase principale, ajoutez X manas de la combinaison de mana coloré de votre choix à votre réserve, X étant le coût converti de mana de ce sort.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Contrarresta el hechizo objetivo. Al comienzo de tu próxima fase principal precombate, agrega X manás de cualquier combinación de colores a tu reserva de maná, donde X es el coste de maná convertido de ese hechizo.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Neutralisiere einen Zauberspruch deiner Wahl. Erhöhe zu Beginn deiner nächsten Hauptphase vor dem Kampf deinen Manavorrat um X Mana in einer beliebigen Kombination von Farben, wobei X gleich den umgewandelten Manakosten dieses Zaubers ist.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Neutralizza una magia bersaglio. All’inizio della tua prossima fase principale pre-combattimento, aggiungi X mana in qualsiasi combinazione di colori alla tua riserva di mana, dove X è il costo di mana convertito di quella magia.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[呪文1つを対象とし、それを打ち消す。あなたの次の戦闘前メイン・フェイズの開始時に、あなたのマナ・プールに、好きな色の組み合わせのマナX点を加える。Xはその打ち消した呪文の点数で見たマナ・コストに等しい。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[주문 한 개를 목표로 정한다. 그 주문을 무효화한다. 당신의 다음 전투전 본단계 시작에, 당신의 마나풀에 원하는 색 조합의 마나를 X개만큼 담는다. X는 무효화된 주문의 전환마나비용이다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Отмените целевое заклинание. В начале вашей следующей предбоевой главной фазы добавьте Х маны в любой комбинации цветов в ваше хранилище маны, где Х — конвертированная мана-стоимость того заклинания.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Counter target spell. At the beginning of your next precombat main phase, add X mana in any combination of colors to your mana pool, where X is that spell’s converted mana cost.]]></LOCALISED_TEXT>
    <TARGET tag="CARD_QUERY_CHOOSE_SPELL_TO_COUNTER" definition="0" compartment="0" count="1" />
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:SetZone( ZONE_STACK )
    </TARGET_DEFINITION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local cmc = target:GetConvertedManaCost()
      if cmc &gt; 0 then
        local delayDC = EffectDC():Make_Chest(1)
        delayDC:Set_Int(0, cmc)
        MTG():CreateDelayedTrigger(2, delayDC)
      end
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       target:CounterSpell()
    end
    </RESOLUTION_TIME_ACTION>
    <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
  </SPELL_ABILITY>
  <TRIGGERED_ABILITY replacement_effect="1" resource_id="2">
    <TRIGGER value="BEGINNING_OF_PLAYERS_STEP">
    return TriggerPlayer() == EffectController() and ( MTG():GetStep() == STEP_MAIN_1 )
    </TRIGGER>
    <CLEANUP fire_once="1" />
    <RESOLUTION_TIME_ACTION repeating="1">
    local nRep = MTG():GetActionRepCount()
    local nParity = nRep % 2
    local cmc = EffectDC():Get_Int(0)
    if nRep &lt; (cmc * 2) then
       if nParity == 0 then
          local oPlayer = EffectController()
                local oCard = EffectSource()
                if oPlayer ~= nil then
             oPlayer:BeginNewMultipleChoice()
             oPlayer:AddMultipleChoiceAnswer("RSN_MODE_PRODUCE_W")
             oPlayer:AddMultipleChoiceAnswer("RSN_MODE_PRODUCE_U")
                        oPlayer:AddMultipleChoiceAnswer("RSN_MODE_PRODUCE_R")
         oPlayer:AddMultipleChoiceAnswer("RSN_MODE_PRODUCE_G")
         oPlayer:AddMultipleChoiceAnswer("RSN_MODE_PRODUCE_B")
             oPlayer:AskMultipleChoiceQuestion("MODE_CHOOSE_ONE", cmc)
          end
       else
          local cmc = EffectDC():GetMultipleChoiceResult() + 1
          if cmc == 5 then
             RSN_Produce("{W}", 1)
          elseif cmc == 4 then
             RSN_Produce("{U}", 1)
                elseif cmc == 3 then
             RSN_Produce("{R}", 1)
                elseif cmc == 2 then
             RSN_Produce("{G}", 1)
                elseif cmc == 1 then
             RSN_Produce("{B}", 1)
          end
       end
       return true
    end
    return false
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    RSN_EliminateExtraManaTokens()
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    PLW_DisplayManaPool( EffectController() )
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_W" />
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_U" />
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_R" />
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_G" />
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_B" />
</CARD_V2>
Last edited by wtb300 on 30 Nov 2013, 00:25, edited 2 times in total.
wtb300
 
Posts: 46
Joined: 02 Nov 2013, 21:04
Has thanked: 5 times
Been thanked: 0 time

Re: Formal Request Thread

Postby NeoAnderson » 29 Nov 2013, 22:58

thefiremind wrote:As soon as you add 2 FE_CARD_INSTANCE conditions in a filter that is set to "and" (as default), the filter will get no cards because a card can't be an instance of 2 cards at the same time... and if you clear the filter, I'm afraid that GetNthEvaluatedObject won't remember the cards that were in the filter when you evaluated it.

Since you are interested in the cards in your hand, I'd suggest to use the filter only for the chroma count, and loop through the cards with Hand_GetNth:
Code: Select all
   -- this block should retrieve the difference between the card with greatest number of green mana symbol   and the number of forests onto battlefield.
<RESOLUTION_TIME_ACTION>
    local player = EffectController()
    local filter = ClearFilter()
    local number = player:Hand_Count()
    local NumOfLands = EffectDC():Get_Int(50)
    local TempLands = 0
    local LandsToPutOnBattlefield = 0
    local CurrentChromaCount = 0
     for i = 0, (number-1) do
         local card = player:Hand_GetNth(i)
         if card ~= nil then
             filter:Clear()
             filter:SetZone(ZONE_HAND, player)
             filter:Add(FE_CARD_INSTANCE, OP_IS, card)
             CurrentChromaCount =  filter:ChromaCount(COLOUR_GREEN)
            if CurrentChromaCount &gt; NumOfLands then
               LandsToPutOnBattlefield = CurrentChromaCount - NumOfLands
               if LandsToPutOnBattlefield &gt; TempLands then
                   EffectDC():Set_Int(51, LandsToPutOnBattlefield)                       
                   TempLands = LandsToPutOnBattlefield
               end
            end
        end
    end
</RESOLUTION_TIME_ACTION>
Thanks, my friend,
I was looking for that function, but i only found Library_GetNth(), so i was not sure if Hand_GetNth() was implemented.
I will try your solution, thanks so much.
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby MC Brodie » 29 Nov 2013, 23:04

I'll have to look in more detail when I get home but here are a few things I noticed. It's a good start though.

-You don't need the first resolution time action block in the delayed trigger. I'm Xenagos this saved the amount of mana to generate in a data chest but you already have that in the spell ability.


-The resolution time action block that has "S_DisplayManaPool" is one of sumomole's functions so it will only work with sumo's mod installed. it's up to you but you may want to use the actual code in the card opposed to the function to remove dependency to other mods. This could be as easy as copying the code for sumo's function and pasting it in place but I'd have to check.
-----------------------------------------------------------------------
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 » 30 Nov 2013, 00:28

MC Brodie wrote:I'm Xenagos
Whoa, this is shocking! :lol:

Back to serious, the problem I see with Plasm Capture is that the delayed trigger has replacement_effect="1" which doesn't work properly when you have to ask for a query. Either you use replacement_query="1", or you use forced_skip="1". Just to be totally sure everything works as intended, I'd suggest the latter.
< 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 wtb300 » 30 Nov 2013, 01:53

Plasm Capture
This one is working perfectly.
Thanks MC Brodie and TFM for all your help and guidance

Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="PLASM_CAPTURE_300369069" />
  <CARDNAME text="PLASM_CAPTURE" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Plasm Capture]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Capture de plasme]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Captura del plasma]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Plasmafang]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Plasmacattura]]></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[Plasm Capture]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="300369069" />
  <ARTID value="300369069" />
  <ARTIST name="Chase Stone" />
  <CASTING_COST cost="{G}{G}{U}{U}" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“Everything serves a purpose. Even you.”
Vorel of the Hull Clade]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Tout le monde sert une cause. Même toi. »
—Vorel du Cladus Coque]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“Todo tiene un propósito. Incluso tú.”
—Vorel del Clado de la Vaina]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Alles dient einem Zweck. Auch du.”
—Vorel von der Hülsenklade]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Tutto serve per uno scopo. Persino tu.”
—Vorel del Clade del Carapace]]></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[“Everything serves a purpose. Even you.”
Vorel of the Hull Clade]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Instant" />
  <EXPANSION value="DGM" />
  <RARITY metaname="R" />
  <SPELL_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Counter target spell. At the beginning of your next precombat main phase, add X mana in any combination of colors to your mana pool, where X is that spell’s converted mana cost.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Contrecarrez le sort ciblé. Au début de votre prochaine première phase principale, ajoutez X manas de la combinaison de mana coloré de votre choix à votre réserve, X étant le coût converti de mana de ce sort.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Contrarresta el hechizo objetivo. Al comienzo de tu próxima fase principal precombate, agrega X manás de cualquier combinación de colores a tu reserva de maná, donde X es el coste de maná convertido de ese hechizo.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Neutralisiere einen Zauberspruch deiner Wahl. Erhöhe zu Beginn deiner nächsten Hauptphase vor dem Kampf deinen Manavorrat um X Mana in einer beliebigen Kombination von Farben, wobei X gleich den umgewandelten Manakosten dieses Zaubers ist.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Neutralizza una magia bersaglio. All’inizio della tua prossima fase principale pre-combattimento, aggiungi X mana in qualsiasi combinazione di colori alla tua riserva di mana, dove X è il costo di mana convertito di quella magia.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[呪文1つを対象とし、それを打ち消す。あなたの次の戦闘前メイン・フェイズの開始時に、あなたのマナ・プールに、好きな色の組み合わせのマナX点を加える。Xはその打ち消した呪文の点数で見たマナ・コストに等しい。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[주문 한 개를 목표로 정한다. 그 주문을 무효화한다. 당신의 다음 전투전 본단계 시작에, 당신의 마나풀에 원하는 색 조합의 마나를 X개만큼 담는다. X는 무효화된 주문의 전환마나비용이다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Отмените целевое заклинание. В начале вашей следующей предбоевой главной фазы добавьте Х маны в любой комбинации цветов в ваше хранилище маны, где Х — конвертированная мана-стоимость того заклинания.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Counter target spell. At the beginning of your next precombat main phase, add X mana in any combination of colors to your mana pool, where X is that spell’s converted mana cost.]]></LOCALISED_TEXT>
    <TARGET tag="CARD_QUERY_CHOOSE_SPELL_TO_COUNTER" definition="0" compartment="0" count="1" />
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:SetZone( ZONE_STACK )
    </TARGET_DEFINITION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local cmc = target:GetConvertedManaCost()
      if cmc &gt; 0 then
        local delayDC = EffectDC():Make_Chest(1)
        delayDC:Set_Int(0, cmc)
        MTG():CreateDelayedTrigger(2, delayDC)
      end
    end
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       target:CounterSpell()
    end
    </RESOLUTION_TIME_ACTION>
    <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
  </SPELL_ABILITY>
  <TRIGGERED_ABILITY  forced_skip="1" resource_id="2">
    <TRIGGER value="BEGINNING_OF_PLAYERS_STEP">
    return TriggerPlayer() == EffectController() and ( MTG():GetStep() == STEP_MAIN_1 )
    </TRIGGER>
    <CLEANUP fire_once="1" />
    <RESOLUTION_TIME_ACTION repeating="1">
    local nRep = MTG():GetActionRepCount()
    local nParity = nRep % 2
    local cmc = EffectDC():Get_Int(0)
    if nRep &lt; (cmc * 2) then
       if nParity == 0 then
          local oPlayer = EffectController()
                local oCard = EffectSource()
                if oPlayer ~= nil then
             oPlayer:BeginNewMultipleChoice()
             oPlayer:AddMultipleChoiceAnswer("RSN_MODE_PRODUCE_W")
             oPlayer:AddMultipleChoiceAnswer("RSN_MODE_PRODUCE_U")
                        oPlayer:AddMultipleChoiceAnswer("RSN_MODE_PRODUCE_B")
         oPlayer:AddMultipleChoiceAnswer("RSN_MODE_PRODUCE_R")
         oPlayer:AddMultipleChoiceAnswer("RSN_MODE_PRODUCE_G")
             oPlayer:AskMultipleChoiceQuestion("MODE_CHOOSE_ONE", oCard)
          end
       else
          local nColour = EffectController():GetMultipleChoiceResult() + 1
          if nColour == 1 then
             RSN_Produce("{W}", 1)
          elseif nColour == 2 then
             RSN_Produce("{U}", 1)
                elseif nColour == 3 then
             RSN_Produce("{B}", 1)
                elseif nColour == 4 then
             RSN_Produce("{R}", 1)
                elseif nColour == 5 then
             RSN_Produce("{G}", 1)
          end
       end
       return true
    end
    return false
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    RSN_EliminateExtraManaTokens()
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    PLW_DisplayManaPool( EffectController() )
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_W" />
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_U" />
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_B" />
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_R" />
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_G" />
</CARD_V2>
wtb300
 
Posts: 46
Joined: 02 Nov 2013, 21:04
Has thanked: 5 times
Been thanked: 0 time

Re: Formal Request Thread

Postby MC Brodie » 30 Nov 2013, 04:30

thefiremind wrote:
MC Brodie wrote:I'm Xenagos
Whoa, this is shocking! :lol:
Haha swype texting defeats me again... Sadly, I am not Xenagos.

thefiremind wrote:Back to serious, the problem I see with Plasm Capture is that the delayed trigger has replacement_effect="1" which doesn't work properly when you have to ask for a query. Either you use replacement_query="1", or you use forced_skip="1". Just to be totally sure everything works as intended, I'd suggest the latter.
Thanks for pointing this out. I probably wouldn't have caught this. I always forget about replacement_query.

Good job wtb!
-----------------------------------------------------------------------
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 NeoAnderson » 30 Nov 2013, 05:46

Hi @TheFiremind, i would say thanks your suggestion did work fine.

Now i would ask to you, Riiak, MC Brodie, and to other friends, an opinion.

I have implemented a card : Moment of Eternity.
It introduces a new ability "Life Splitting"
Life Splitting rules : Whenever a creature with "life splitting" is leaving the battlefield, is exiled, put onto battlefield 2 token copies of that creature, with "life splitting". The power and toughness of these copies are the half of the source values. If the source values are odd, then will be subtracted 1 from these values, before to divide them. The ability is gained also by the tokens copies, and the effect will be repeated until the toughness will not be equal or less than 1.

Moment of Eternity effect : Target nonlegendary creature gains Life Splitting.

Example how is supposed to work : Applying the effect on a creature 6/6. When this creature is leaving the battlefield it is exiled, and on the battlefield come 2 tokens 3/3. When one of these tokens 3/3 is leaving the battlefield it is exiled, on the battlefield come 2 tokens 1/1. The effect will not be propagated anymore.


Here you can find the code of this card, please can you let me know if i haven't considered some circumstances? Is it ok? (Just to let you know the card works)

Moment of Eternity | Open
Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="6">
   <FILENAME text="MOMENT_OF_ETERNITY_G_7272531" />
   <CARDNAME text="MOMENT_OF_ETERNITY_G" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Moment of Eternity]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Moment d'éternité]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Momento de Eternidad]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Moment der Ewigkeit]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Attimo di Eternità]]></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[Momento da eternidade]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[永恆的瞬間]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[永恆的瞬間]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="7272531" />
   <ARTID value="7227531" />
   <ARTIST name="Applibot© Legend of Cryptids" />
   <CASTING_COST cost="{G}{G}{G}" />
   <TYPE metaname="Instant" />
   <EXPANSION value="DPI" />
   <RARITY metaname="R" />


<SPELL_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Target nonlegendary creature gains Life Splitting (| view info |).]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[La créature ciblée ne pas légendaire, gagne DLe fractionnement de la vie (| Voir l'info |).]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Una creatura bersaglio non leggendaria, guadagna divisione della vita ( |vedi info| ).]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Eine Kreatur nicht legendär, verdient Aufspaltung des Lebens  (| Ansicht info |).]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Una creatura bersaglio non leggendaria, guadagna Scissione della vita ( |vedi info| ).]]></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[A criatura alvo não lendário, ganha Divisão de vida (| ver informações |).]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[目標生物並沒有傳說中的,賺取生活事業部(|查看資訊|)。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[目標生物並沒有傳說中的,賺取生活事業部(|查看資訊|)。]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_APPLY_EFFECT" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
      local filter = ClearFilter()
      filter:Add( FE_SUPERTYPE, OP_NOT, SUPERTYPE_LEGENDARY )
      filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
          </TARGET_DEFINITION>

<RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local delayDC = EffectDC():Make_Chest(1)
       delayDC:Set_CardPtr(0, target)
       MTG():CreateDelayedTrigger(1, delayDC)
    end
    </RESOLUTION_TIME_ACTION>

 <CONTINUOUS_ACTION layer="6">
      local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target ~= nil then
        local characteristics = target:GetCurrentCharacteristics()
   characteristics:GrantAbility(2)
       end
    </CONTINUOUS_ACTION>

    <DURATION>
    local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
         return (target == nil)
    </DURATION>

</SPELL_ABILITY>

<TRIGGERED_ABILITY resource_id="1" replacement_effect="1">
 <CLEANUP fire_once="1" />
<TRIGGER value="ZONECHANGE_CONSIDERED" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD" pre_trigger="1">
local target = EffectDC():Get_CardPtr(0)
local secondtarget = EffectDC():Get_CardPtr(1)
    if TriggerObject() == target or TriggerObject() == secondtarget then
       MTG():OverrideEvent()
       local toughness = TriggerObject():GetCurrentToughness()   
       local power = TriggerObject():GetCurrentToughness()   
     local nParity = toughness % 2             
          if nParity == 0 then
              toughness = toughness / 2
          else
        if toughness &gt; 1 then
                toughness = toughness - 1
                toughness = toughness / 2
             else
                toughness = 0
             end
          end
      local PowParity = power % 2   
       if nParity == 0 then
              power = power / 2
          else
        if power &gt; 1 then
                power = power - 1
                power = power / 2
             else
                power = 0
             end
          end
      if toughness &gt; 0 then 
           EffectDC():Set_Int(50, toughness) 
      EffectDC():Set_Int(51, power)
       MTG():PutTokenCopiesOntoBattlefield( TriggerObject(), 2, TriggerObject():GetController(), EffectDC():Make_Targets(0) )
     end
       TriggerObject():Exile()
       return true
    end
    return false
    </TRIGGER>

<RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
    local secondtarget = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(1)
    local delayDC = EffectDC():Make_Chest(1)
    if target ~= nil then
       delayDC:Set_CardPtr(0, target)
   MTG():CreateDelayedTrigger(1, delayDC)
    end   
    if secondtarget ~= nil then
       delayDC:Set_CardPtr(1, secondtarget)
   MTG():CreateDelayedTrigger(1, delayDC)
    end   
    </RESOLUTION_TIME_ACTION>

<CONTINUOUS_ACTION layer="7C">
    local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
    local secondtarget = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(1)
    local oToughness= EffectDC():Get_Int(50)
    local oPower= EffectDC():Get_Int(51)
    if target ~= nil then
      local characteristics = target:GetCurrentCharacteristics()
       characteristics:Power_Set( oPower )
       characteristics:Toughness_Set( oToughness )
    end
     if secondtarget ~= nil then
        local secondcharacteristics = secondtarget:GetCurrentCharacteristics()
       secondcharacteristics:Power_Set( oPower )
       secondcharacteristics:Toughness_Set( oToughness )
    end
    </CONTINUOUS_ACTION>

<CONTINUOUS_ACTION layer="6">
    local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
    local secondtarget = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(1)
    if target ~= nil then
      local characteristics = target:GetCurrentCharacteristics()
    characteristics:GrantAbility(2)
    end
     if secondtarget ~= nil then
        local secondcharacteristics = secondtarget:GetCurrentCharacteristics()
   secondcharacteristics:GrantAbility(2)
    end
</CONTINUOUS_ACTION>

    <DURATION>
    local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
    local secondtarget = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(1)
    return target == nil and secondtarget == nil
    </DURATION>

  </TRIGGERED_ABILITY>

<STATIC_ABILITY resource_id="2">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Life Splitting]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Le fractionnement de la vie]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[La división de la vida]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Aufspaltung des Lebens]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Scissione della vita]]></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[Divisão da vida]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[生活的分裂]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[生活的分裂]]></LOCALISED_TEXT>
</STATIC_ABILITY>

<HELP title="MORE_INFO_LIFESPLITTING_TITLE_1" body="MORE_INFO_LIFESPLITTING_BODY_1" zone="ZONE_ANY" />

</CARD_V2>
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby thefiremind » 30 Nov 2013, 16:18

NeoAnderson wrote:Here you can find the code of this card, please can you let me know if i haven't considered some circumstances? Is it ok? (Just to let you know the card works)
Power/toughness setting (not modifying) should happen on layer 7B, not 7C. Aside from that, if it works, then I think it's OK.
< 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 » 30 Nov 2013, 17:06

thefiremind wrote:
NeoAnderson wrote:Here you can find the code of this card, please can you let me know if i haven't considered some circumstances? Is it ok? (Just to let you know the card works)
Power/toughness setting (not modifying) should happen on layer 7B, not 7C. Aside from that, if it works, then I think it's OK.
Thanks my friend, i am glad to see that my mistakes are reducing. I made this little modify.

I also revised the other card we were talking about.

Now it says :
At the beginning of your upkeep, you may reveal a card from your hand. If the number of Forests you control is less than the number of green mana symbols on the card you revealed, search your library for up to X Forests, where X is the difference between those numbers, put them onto the battlefield tapped, then shuffle your library.

Here you can find the revised code, let me know if is ok.

Dryads recalling | Open
Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="6">
   <FILENAME text="DRYADS_RECALLING_G_7272530" />
   <CARDNAME text="DRYADS_RECALLING_G" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Dryads' recalling]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[La Rappelant des Dryades]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Repromulgación del las dríadas]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Historische Nachstellung der Dryaden]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Rievocazione delle Driadi]]></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[Reenactment das Dríades]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="7272530" />
   <ARTID value="7227530" />
   <ARTIST name="DigitalArt© - Sakim Chan" />
   <CASTING_COST cost="{G}{G}{G}" />
        <SUPERTYPE metaname="Legendary" />
   <TYPE metaname="Enchantment" />
   <EXPANSION value="DPI" />
   <RARITY metaname="R" />

   <STATIC_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Hexproof]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Défense talismanique]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Antimaleficio.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fluchsicher]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Anti-malocchio]]></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[Resistência a magia]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[辟邪]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[辟邪]]></LOCALISED_TEXT>
      <INTRINSIC characteristic="CHARACTERISTIC_HEXPROOF" />
   </STATIC_ABILITY>

   <TRIGGERED_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of your upkeep, you may reveal a card from your hand. If the number of Forests you control is less than the number of green mana symbols on the card you revealed, search your library for up to X Forests, where X is the difference between those numbers, put them onto the battlefield tapped, then shuffle your library.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Au début de votre entretien, si le nombre de forêts que vous contrôlez est moins que le plus grand nombre de symboles de mana vert parmi les cartes dans votre main, mettez sur le champ de bataille X forêts engagées, où X est cette différence, et mélangez ensuite votre bibliothèque.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Al comienzo de tu mantenimiento, si el número de bosques que controlas es menor que el mayor número de símbolos de maná verde entre las cartas en la mano, se puso en los X bosques giradas del campo de batalla, donde X es esta diferencia, luego baraja tu biblioteca.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Zu Beginn deines Versorgungssegments, falls die Anzahl der Wälder Sie steuern weniger als die größte Anzahl von grünen Manasymbole unter den Karten in der Hand, auf dem Schlachtfeld X Gewinde Wälder setzen, wobei X ist dieser Unterschied ist, dann deine Bibliothek mischen.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[All'inizio del tuo mantenimento, puoi rivelare una carta dalla tua mano. Se il numero di Foreste che controlli è inferiore al numero di simboli di mana verdi sulla carta che hai rivelato, cerca nel tuo grimorio per un massimo di X Foreste, dove X è la differenza tra questi numeri, mettile sul campo di battaglia TAPpate, poi rimescola il tuo grimorio.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたがコントロールする森の数は、Xが、この差である戦場でのXタップ森に置くあなたの手札のカードの中の緑マナ·シンボルの最大数、未満の場合は、あなたのアップキープの開始時に、その後あなたのライブラリーを切り直す。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[당신은 제어 숲의 수가 X이 차이가 전장 X 도청 숲에 넣어 당신의 손에있는 카드 중 녹색 마나 심볼의 가장 큰 수보다 적은 경우 보수의 시작 부분에서, 다음 라이브러리를 섞는다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[В начале вашего шага поддержки, если количество лесов Вы контролируют меньше наибольшего числа зеленых маны символов среди карт в вашей руке, положить на поле битвы X Резьбовые лесов, где Х это различие, затем перетасовать вашу библиотеку.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[No início de sua manutenção, se o número de florestas que você controla é menos do que o maior número de símbolos de mana verde entre as cartas na sua mão, coloque no campo de batalha X florestas aproveitado, onde X é a diferença, em seguida, embaralhe seu grimório.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[在你的維持開始時,若林你控制的數量少於人數最多的綠色法術力符號在你的手牌中,放進戰場X螺紋的森林,其中X是這種差異,然後洗你的牌庫中。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[在你的維持開始時,若林你控制的數量少於人數最多的綠色法術力符號在你的手牌中,放進戰場X螺紋的森林,其中X是這種差異,然後洗你的牌庫中。]]></LOCALISED_TEXT>
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
    return MTG():GetStep() == STEP_UPKEEP and (GreaterManaCountByColourInHand(COLOUR_GREEN, EffectController()) &gt; CountBasicLandsSubtypeControlledBy(LAND_TYPE_FOREST, EffectController(), ZONE_BATTLEFIELD))
    </TRIGGER>

    <PLAY_TIME_ACTION>
      EffectDC():Set_Int(100,0)
    </PLAY_TIME_ACTION>

    <PLAY_TIME_ACTION>
    local player = EffectController()
    if player ~= nil then
       player:BeginNewMultipleChoice()
       player:AddMultipleChoiceAnswer( "UI_CONDITIONAL_QUESTION_YES")
       player:AddMultipleChoiceAnswer("UI_CONDITIONAL_QUESTION_NO")
       player:AskMultipleChoiceQuestion( "OPTIONAL_ABILITY_QUESTION", Object() )
    end
    </PLAY_TIME_ACTION>

    <PLAY_TIME_ACTION>
    local player = EffectController()
    if player ~= nil and player:GetMultipleChoiceResult() == 0 then
      EffectDC():Set_Int(100,1)
   end
    </PLAY_TIME_ACTION>

   <RESOLUTION_TIME_ACTION>
    local ActivatedAbility = EffectDC():Get_Int(100)
    if ActivatedAbility == 1 then
       local player = EffectController()
       local numlands = CountBasicLandsSubtypeControlledBy(LAND_TYPE_FOREST, player, ZONE_BATTLEFIELD)
       EffectDC():Set_Int(50, numlands)
       EffectDC():Set_Int(51, 0)
    end
    </RESOLUTION_TIME_ACTION>

   <RESOLUTION_TIME_ACTION>
    local ActivatedAbility = EffectDC():Get_Int(100)
    if ActivatedAbility == 1 then
       local player = EffectController()
       if player ~= nil then
          --pick a card to reveal
          local filter = ClearFilter()
          filter:SetZone( ZONE_HAND, player )
          player:ChooseItem( "CARD_QUERY_CHOOSE_CARD_TO_REVEAL", EffectDC():Make_Targets(0) )
           end
    end 
    </RESOLUTION_TIME_ACTION>

   <RESOLUTION_TIME_ACTION>
    local ActivatedAbility = EffectDC():Get_Int(100)
    if ActivatedAbility == 1 then
       local player = EffectController()
       if player ~= nil then
          local card = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
          if card ~= nil then
             card:Reveal()
          end
           end
    end
    </RESOLUTION_TIME_ACTION>

<RESOLUTION_TIME_ACTION>
    local ActivatedAbility = EffectDC():Get_Int(100)
    if ActivatedAbility == 1 then
       local player = EffectController()
       local card = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
       if card ~= nil then
          local LandsToPutOnBattlefield = ColourManaCountIntoCard(COLOUR_GREEN, card, player)
     local NumOfLands = EffectDC():Get_Int(50)
     LandsToPutOnBattlefield = LandsToPutOnBattlefield - NumOfLands
     EffectDC():Set_Int(51, LandsToPutOnBattlefield)                       
       end
   end
</RESOLUTION_TIME_ACTION>

      <RESOLUTION_TIME_ACTION>
    local ActivatedAbility = EffectDC():Get_Int(100)
    if ActivatedAbility == 1 then
       local filter = ClearFilter()
       local effectController = EffectController()
       filter:Add( FE_SUPERTYPE, OP_IS, SUPERTYPE_BASIC )
       filter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
       filter:Add( FE_SUBTYPE, OP_IS, LAND_TYPE_FOREST )
       filter:SetZone( ZONE_LIBRARY, effectController )
       local LandsToPutOnBattlefield = EffectDC():Get_Int(51)
   effectController:SetItemCount( LandsToPutOnBattlefield )
       for i = 0, (LandsToPutOnBattlefield - 1) do
          effectController:SetItemPrompt(i, "CARD_QUERY_CHOOSE_LAND_TO_PUT_ONTO_THE_BATTLEFIELD_TAPPED" )
           end
       effectController:ChooseItems( EffectDC():Make_Targets(3), QUERY_FLAG_UP_TO )
    end
    </RESOLUTION_TIME_ACTION>

    <RESOLUTION_TIME_ACTION>
    local ActivatedAbility = EffectDC():Get_Int(100)
    if ActivatedAbility == 1 then
   local LandsToPutOnBattlefield = EffectDC():Get_Int(51)
       for i = 0,(LandsToPutOnBattlefield - 1) do
          local target_card = EffectDC():Get_Targets(3):Get_CardPtr(i)
              if target_card ~= nil  then
                  target_card:PutOntoBattlefieldTapped( EffectController() )
               end
            end
    end
    </RESOLUTION_TIME_ACTION>

    <RESOLUTION_TIME_ACTION>
     local ActivatedAbility = EffectDC():Get_Int(100)
     if ActivatedAbility == 1 then
        EffectController():ShuffleLibrary()
     end
    </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>


</CARD_V2>
I also used my own functions :
GreaterManaCountByColourInHand | Open
Code: Select all
GreaterManaCountByColourInHand = function(nColour, nPlayer)
 local player = nPlayer
    local filter = ClearFilter()
    local number = player:Hand_Count()
    local TempLands = 0
    local CurrentChromaCount = 0
     for i = 0, (number-1) do
         local card = player:Hand_GetNth(i)
         if card ~= nil then
             filter:Clear()
             filter:SetZone(ZONE_HAND, player)
             filter:Add(FE_CARD_INSTANCE, OP_IS, card)
             CurrentChromaCount =  filter:ChromaCount(nColour)
               if (CurrentChromaCount > TempLands) then
                   TempLands = CurrentChromaCount
               end
        end
    end
return TempLands
end
CountBasicLandsSubtypeControlledBy | Open
Code: Select all
CountBasicLandsSubtypeControlledBy = function(nType, nPlayer, nZone)
-- returns the number of basic land cards of the SUBTYPE (nTYPE), controlled by (nPlayer), considering the zone (nZone)
-- else returns 0

  local oFilter = ClearFilter()
  oFilter:Add( FE_SUPERTYPE, OP_IS, SUPERTYPE_BASIC )
  oFilter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
  oFilter:Add(FE_SUBTYPE, OP_IS, nType)
  oFilter:Add(FE_CONTROLLER, OP_IS, nPlayer)
  oFilter:SetZone( nZone, nPlayer )
  if (oFilter:Count() > 0) then
    return oFilter:Count()
  end
  return 0
end
ColourManaCountIntoCard | Open
Code: Select all
ColourManaCountIntoCard = function(nColour, nCard, nPlayer)
local filter = ClearFilter()
    local CurrentChromaCount = 0
         if nCard ~= nil then
        filter:Clear()
             local filter = ClearFilter()
        filter:SetZone(ZONE_HAND, nPlayer)
             filter:Add(FE_CARD_INSTANCE, OP_IS, nCard)
             CurrentChromaCount =  filter:ChromaCount(nColour)
               if (CurrentChromaCount > 0) then
                   return CurrentChromaCount
               else
                   return 0
               end
        else
       return 0
        end
end
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby thefiremind » 30 Nov 2013, 17:21

NeoAnderson wrote:I also revised the other card we were talking about.

Now it says :
At the beginning of your upkeep, you may reveal a card from your hand. If the number of Forests you control is less than the number of green mana symbols on the card you revealed, search your library for up to X Forests, where X is the difference between those numbers, put them onto the battlefield tapped, then shuffle your library.

Here you can find the revised code, let me know if is ok.
I wouldn't put any restriction inside the TRIGGER block... as the card reads now, you are free to reveal a card even if you have only lands or red cards in your hand. Moreover, the restriction would give away information about your hand to your opponents (if it doesn't trigger, then you don't have a suitable card in your hand).

The query in a PLAY_TIME_ACTION is also wrong: all the choices that don't involve targetting should be made during resolution. Actually, I would remove the query altogether and move the choice to the card selection with a QUERY_FLAG_MAY: if you don't want to reveal a card, you'll click on Finish, and this will save you from one useless click when you want to reveal a card.

Dryads recalling | Open
Code: Select all
...
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
    return MTG():GetStep() == STEP_UPKEEP
    </TRIGGER>
   <RESOLUTION_TIME_ACTION>
       local player = EffectController()
       local numlands = CountBasicLandsSubtypeControlledBy(LAND_TYPE_FOREST, player, ZONE_BATTLEFIELD)
       EffectDC():Set_Int(50, numlands)
       EffectDC():Set_Int(51, 0)
    </RESOLUTION_TIME_ACTION>
   <RESOLUTION_TIME_ACTION>
       local player = EffectController()
       if player ~= nil then
          --pick a card to reveal
          local filter = ClearFilter()
          filter:SetZone( ZONE_HAND, player )
          player:ChooseItem( "CARD_QUERY_CHOOSE_CARD_TO_REVEAL", EffectDC():Make_Targets(0), QUERY_FLAG_MAY )
           end
    </RESOLUTION_TIME_ACTION>
   <RESOLUTION_TIME_ACTION>
       local player = EffectController()
       if player ~= nil then
          local card = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
          if card ~= nil then
             card:Reveal()
          end
           end
    end
    </RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
       local player = EffectController()
       local card = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
       if card ~= nil then
          local LandsToPutOnBattlefield = ColourManaCountIntoCard(COLOUR_GREEN, card, player)
     local NumOfLands = EffectDC():Get_Int(50)
     LandsToPutOnBattlefield = LandsToPutOnBattlefield - NumOfLands
     EffectDC():Set_Int(51, LandsToPutOnBattlefield)                       
       end
</RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
    local LandsToPutOnBattlefield = EffectDC():Get_Int(51)
    if LandsToPutOnBattlefield &gt; 0 then
       local filter = ClearFilter()
       local effectController = EffectController()
       filter:Add( FE_SUPERTYPE, OP_IS, SUPERTYPE_BASIC )
       filter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
       filter:Add( FE_SUBTYPE, OP_IS, LAND_TYPE_FOREST )
       filter:SetZone( ZONE_LIBRARY, effectController )
   effectController:SetItemCount( LandsToPutOnBattlefield )
       for i = 0, (LandsToPutOnBattlefield - 1) do
          effectController:SetItemPrompt(i, "CARD_QUERY_CHOOSE_LAND_TO_PUT_ONTO_THE_BATTLEFIELD_TAPPED" )
           end
       effectController:ChooseItems( EffectDC():Make_Targets(3), QUERY_FLAG_UP_TO )
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local LandsToPutOnBattlefield = EffectDC():Get_Int(51)
    if LandsToPutOnBattlefield &gt; 0 then
       for i = 0,(LandsToPutOnBattlefield - 1) do
          local target_card = EffectDC():Get_Targets(3):Get_CardPtr(i)
              if target_card ~= nil  then
                  target_card:PutOntoBattlefieldTapped( EffectController() )
               end
            end
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local LandsToPutOnBattlefield = EffectDC():Get_Int(51)
    if LandsToPutOnBattlefield &gt; 0 then
        EffectController():ShuffleLibrary()
     end
    </RESOLUTION_TIME_ACTION>
...
I might have forgot to remove an "end" or something like that... the lack of a precise indentation really doesn't help. :lol:

EDIT: Oh, I was forgetting: this depends on you, but if you leave this line:
Code: Select all
filter:Add( FE_SUPERTYPE, OP_IS, SUPERTYPE_BASIC )
then the ability text should read "search your library for up to X basic Forests". Either modify the text, or remove that line.
< 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 11 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 11 users online :: 0 registered, 0 hidden and 11 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: No registered users and 11 guests

Login Form