It is currently 20 Jun 2025, 12:32
   
Text Size

Formal Request Thread

Moderator: CCGHQ Admins

Re: Formal Request Thread

Postby thefiremind » 04 Sep 2013, 10:19

The problem of selecting the right players isn't difficult to solve, you can add the players to a chest while you look through the filtered cards, like this:
Gomazoa (incomplete) | Open
Code: Select all
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Put Gomazoa and each creature it’s blocking on top of their owners’ libraries, then those players shuffle their libraries.]]></LOCALISED_TEXT>
    <COST type="TapSelf" />
    <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:Set_Or()
    filter:Add( FE_CARD_INSTANCE, OP_IS, EffectSource() )
    local subFilter = filter:AddSubFilter_And()
       subFilter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
       subFilter:Add(FE_IS_BLOCKED, true)
       subFilter:Add( FE_LUA_CONDITION, 1, EffectController(), EffectDC() )
    </FILTER>
    <FILTER_CONDITION id="1">
    -- here we are missing something that filters the creatures blocked by Gomazoa
    return true
    </FILTER_CONDITION>
    <RESOLUTION_TIME_ACTION>
    EffectDC():Make_Chest(1)
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION filter_id="0">
    if FilteredCard() ~= nil then
       local ownersDC = EffectDC():Get_Chest(1)
       local owner = FilteredCard():GetOwner()
       -- We want to see if this owner has been already added to ownersDC
       local already_added = false
       local index = 0
       local player = ownersDC:Get_PlayerPtr(0)
       while player ~= nil do
          if player == owner then
             -- We already added this owner to ownersDC
             already_added = true
             player = nil
          else
             -- Let's go on with the search
             index = index + 1
             player = ownersDC:Get_PlayerPtr(index)
          end
       end
       if already_added == false then
          -- We didn't add this owner to ownersDC, let's do it now
          ownersDC:Set_PlayerPtr(index, owner)
       end
        FilteredCard():PutOnTopOfLibrary()
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local ownersDC = EffectDC():Get_Chest(1)
    local index = 0
    local player = ownersDC:Get_PlayerPtr(0)
    while player ~= nil do
       player:ShuffleLibrary()
       index = index + 1
       player = ownersDC:Get_PlayerPtr(index)
    end
    </RESOLUTION_TIME_ACTION>
  </ACTIVATED_ABILITY>
What's still missing here is a way to select the creatures blocked by Gomazoa. GetBlockVictim returns the "victim of the block", that is the blocked creature, but this goes against DotP2014's capability of blocking multiple creatures: that function won't return multiple creatures, just one. You'll probably need a WAS_BLOCKED_BY_A_CREATURE trigger that saves all creatures blocked by Gomazoa in a LinkedDC chest. But before thinking about that, you can test the code I gave you: it will return Gomazoa plus all blocked creatures (not only those blocked by Gomazoa) to their owners' libraries, and it's enough to see if this part works as expected.
< 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 Misplay » 04 Sep 2013, 12:05

Hi!

I would like to submit two requests.

The first one is "Yavimaya elder". I can't find a way to code the "search two lands" ability. Currently, I only search for one land (I used "Borderland ranger" as a basis).

Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="11">
  <FILENAME text="YAVIMAYA_ELDER_27678366" />
  <CARDNAME text="YAVIMAYA_ELDER" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Yavimaya Elder]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vieux sage de la Yavimaya]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Yavimaya Elder]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Yavimaya Elder]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Yavimaya Elder]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Yavimaya Elder]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Yavimaya Elder]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Yavimaya Elder]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Yavimaya Elder]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="27678366" />
  <ARTID value="27678366" />
  <ARTIST name="Jesper Ejsing" />
  <CASTING_COST cost="{1}{G}{G}" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“Only fools and bandits use roads.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Il n'y a que les imbéciles et les bandits pour utiliser la route. »]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“Solo los tontos y los bandidos usan los caminos.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Nur Dummköpfe und Banditen verwenden Straßen.“]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Solo gli sciocchi e i banditi usano le strade.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[「道なんかを使うのは馬鹿か山賊だけだ。」]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA["길로 다니는 건 바보와 강도 뿐이지."]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[«По дорогам ходят лишь дураки да разбойники».]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“Só os tolos e os bandidos viajam por estradas.”]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Human" />
  <SUB_TYPE metaname="Druid" />
  <EXPANSION value="DPI" />
  <RARITY metaname="C" />
  <POWER value="2" />
  <TOUGHNESS value="1" />
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Yavimaya Elder dies, you may search your library for up to two basic land cards, reveal them, and put them into your hand. If you do, shuffle your library.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quand le Vieux sage de la Yavimaya est mis dans un cimetière depuis le champ de bataille, vous pouvez chercher dans votre bibliothèque jusqu'à deux cartes de terrain de base, les révéler et les mettre dans votre main. Si vous faites ainsi, mélangez ensuite votre bibliothèque.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[When Yavimaya Elder dies, you may search your library for up to two basic land cards, reveal them, and put them into your hand. If you do, shuffle your library.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[When Yavimaya Elder dies, you may search your library for up to two basic land cards, reveal them, and put them into your hand. If you do, shuffle your library.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[When Yavimaya Elder dies, you may search your library for up to two basic land cards, reveal them, and put them into your hand. If you do, shuffle your library.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[When Yavimaya Elder dies, you may search your library for up to two basic land cards, reveal them, and put them into your hand. If you do, shuffle your library.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When Yavimaya Elder dies, you may search your library for up to two basic land cards, reveal them, and put them into your hand. If you do, shuffle your library.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[When Yavimaya Elder dies, you may search your library for up to two basic land cards, reveal them, and put them into your hand. If you do, shuffle your library.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[When Yavimaya Elder dies, you may search your library for up to two basic land cards, reveal them, and put them into your hand. If you do, shuffle your library.]]></LOCALISED_TEXT>
    <TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="self" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_BATTLEFIELD" />
    <RESOLUTION_TIME_ACTION>
    local filter = ClearFilter()
    local effectController = EffectController()
    filter:Add( FE_SUPERTYPE, OP_IS, SUPERTYPE_BASIC )
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
    filter:SetZone( ZONE_LIBRARY, effectController )
    effectController:ChooseItem( "CARD_QUERY_CHOOSE_LAND_TO_PUT_INTO_HAND", EffectDC():Make_Targets(0) )
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if  target ~= nil then
       target:GuidedReveal( target:GetZone(), ZONE_HAND )
    end 
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if  target ~= nil then
       target:PutInHand()
    end 
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    EffectController():ShuffleLibrary()
    </RESOLUTION_TIME_ACTION>
    <MAY />
  </TRIGGERED_ABILITY>
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{2}, Sacrifice Yavimaya Elder: Draw a card.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{2}, sacrifiez le Vieux sage de la Yavimaya : Piochez une carte.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{2}, sacrificar al Cátaro altruista: Las criaturas que controlas obtienen +1/+1 hasta el final del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{2}, opfere den Selbstlosen Katharer: Kreaturen, die du kontrollierst, erhalten +1/+1 bis zum Ende des Zuges.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{2}, Sacrifica il Cataro Altruista: Le creature che controlli prendono +1/+1 fino alla fine del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{2}, 無私の聖戦士を生け贄に捧げる:あなたがコントロールするクリーチャーは、ターン終了時まで+1/+1の修整を受ける。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{2}, 헌신적인 카타르를 희생한다: 당신이 조종하는 생물들은 턴종료까지 +1/+1을 받는다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{2}, пожертвуйте Самоотверженного Катара: существа под вашим контролем получают +1/+1 до конца хода.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{2}, Sacrifique Cátaro Altruísta: As criaturas que você controla recebem +1/+1 até o final do turno.]]></LOCALISED_TEXT>
    <COST mana_cost="{2}" type="Mana" />
    <COST type="SacrificeSelf" />
    <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add( FE_CONTROLLER, OP_IS, EffectController())
    </FILTER>
    <RESOLUTION_TIME_ACTION>
    local NumCards = 1
    while (NumCards &gt; 0) do
       NumCards = NumCards - 1
       EffectController():DrawCard()
    end
    </RESOLUTION_TIME_ACTION>
    <DURATION simple_duration="UntilEOT" />
    <AI_AVAILABILITY window_step="declare_blockers" type="window" />
    <AI_AVAILABILITY type="in_response" response_source="1" />
    <AI_AVAILABILITY type="in_response" />
    <AI_AVAILABILITY window_step="declare_blockers" type="window" />
  </ACTIVATED_ABILITY>
  <SFX text="COMBAT_BLADE_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_BLADE_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
  <AI_BASE_SCORE score="300" zone="ZONE_HAND" />
</CARD_V2>
Hope someone could help me! :D

The other card is "Undead Gladiator". I tried to post the code from the Mod of Sumomole (DotP 2013), but the site doesn't want: "Your post looks too spamy for a new user, please remove off-site URLs. " :?
Misplay
 
Posts: 92
Joined: 29 Aug 2013, 08:26
Has thanked: 50 times
Been thanked: 10 times

Re: Formal Request Thread

Postby sumomole » 04 Sep 2013, 13:07

Misplay wrote:Hi!

I would like to submit two requests.

The first one is "Yavimaya elder". I can't find a way to code the "search two lands" ability. Currently, I only search for one land (I used "Borderland ranger" as a basis).
Hope someone could help me! :D

The other card is "Undead Gladiator". I tried to post the code from the Mod of Sumomole (DotP 2013), but the site doesn't want: "Your post looks too spamy for a new user, please remove off-site URLs. " :?
Yavimaya Elder in here
Undead Gladiator | Open
Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="UNDEAD_GLADIATOR_prefix41166" />
  <CARDNAME text="UNDEAD_GLADIATOR" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Undead Gladiator]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Gladiateur mort-vivant]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Gladiador muerto viviente]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Untoter Gladiator]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gladiatore Non Morto]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Undead Gladiator]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Undead Gladiator]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Undead Gladiator]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Gladiador Morto-Vivo]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[不死剑斗士]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[不死劍鬥士]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="prefix41166" />
  <ARTID value="prefix41166" />
  <ARTIST name="Jeff Easley" />
  <CASTING_COST cost="{1}{B}{B}" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Zombie" />
  <SUB_TYPE metaname="Barbarian" />
  <EXPANSION value="DPI" />
  <RARITY metaname="R" />
  <POWER value="3" />
  <TOUGHNESS value="1" />
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{B}, Discard a card: Return Undead Gladiator from your graveyard to your hand. Activate this ability only during your upkeep.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{B}, défaussez-vous d’une carte de votre main : Renvoyez le Gladiateur mort-vivant depuis votre cimetière dans votre main. Ne jouez cette capacité que pendant votre phase d’entretien.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{B}, descartar una carta de tu mano: Regresa el Gladiador muerto viviente de tu cementerio a tu mano. Juega esta habilidad sólo durante tu mantenimiento.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{B}, wirf eine Karte aus deiner Hand ab: Bringe den Untoten Gladiator aus deinem Friedhof auf deine Hand zurück. Spiele diese Fähigkeit nur während deines Versorgungssegments.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{B}, Scarta una carta: Riprendi in mano il Gladiatore Non Morto dal tuo cimitero. Attiva questa abilità solo durante il tuo mantenimento.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{B}, Discard a card: Return Undead Gladiator from your graveyard to your hand. Activate this ability only during your upkeep.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{B}, Discard a card: Return Undead Gladiator from your graveyard to your hand. Activate this ability only during your upkeep.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{B}, Discard a card: Return Undead Gladiator from your graveyard to your hand. Activate this ability only during your upkeep.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{B}, Descarte um card de sua mão: Devolve Gladiado Morto-Vivo de seu cemitério para sua mão. Use esta habilidade somente durante sua manutenção.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[{1}{B},从你手上弃掉一张牌:将不死剑斗士从你的坟墓场中移回你手上。你只能在你的维持中使用此异能。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[{1}{B},從你手上棄掉一張牌:將不死劍鬥士從你的墳墓場中移回你手上。你只能在你的維持中使用此異能。]]></LOCALISED_TEXT>
    <AVAILABILITY upkeep="1">
    return EffectController():MyTurn()
    </AVAILABILITY>
    <COST mana_cost="{1}{B}" type="Mana" />
    <COST type="Discard" definition="0" compartment="1" query_tag="CARD_QUERY_CHOOSE_CARD_TO_DISCARD" item_count="1" />
    <COST_DEFINITION id="0">
    local filter = ClearFilter()
    filter:SetZone( ZONE_HAND, EffectController() )
    </COST_DEFINITION>
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       EffectSource():PutInHand()
    end
    </RESOLUTION_TIME_ACTION>
    <AUTO_SKIP no_effect_source="1" />
    <AI_AVAILABILITY window_step="upkeep" window_turn="my_turn" type="window" />
  </ACTIVATED_ABILITY>
  <TRIGGERED_ABILITY>
    <TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
    local player = EffectController()
    local filter = ClearFilter()
    filter:SetZone( ZONE_GRAVEYARD, EffectController() )
    filter:Add( FE_CARD_NAME, OP_IS, "UNDEAD_GLADIATOR" )
    filter:EvaluateObjects()
    if EffectSource() == filter:GetNthEvaluatedObject(0) then
      return MTG():GetStep() == STEP_UPKEEP
    end
    return false
    </TRIGGER>
    <RESOLUTION_TIME_ACTION />
    <AUTO_SKIP no_effect_source="1" />
  </TRIGGERED_ABILITY>
  <ACTIVATED_ABILITY active_zone="ZONE_HAND">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Cycling {1}{B}]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Recyclage {1}{B}]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Ciclo {1}{B}.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Umwandlung {1}{B}]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ciclo {1}{B}]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[サイクリング {1}{B}]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[순환 {1}{B}]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Цикл {1}{B}]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Reciclar {1}{B}]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[循环{1}{B}]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[循環{1}{B}]]></LOCALISED_TEXT>
    <COST mana_cost="{1}{B}" type="Mana" />
    <COST type="DiscardSelf" />
    <PLAY_TIME_ACTION>
    MTG():FireTrigger( TRIGGER_CYCLED, EffectSource() )
    </PLAY_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    EffectController():DrawCards(1)
    </RESOLUTION_TIME_ACTION>
    <AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
    <AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
    <AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
    <AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
    <AI_AVAILABILITY window_step="declare_attackers" window_turn="their_turn" type="window" />
    <AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
    <AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
    <AI_AVAILABILITY type="in_response" response_source="1" />
    <AI_AVAILABILITY window_step="declare_blockers" type="window" />
    <AI_AVAILABILITY type="in_response" response_target="1" />
  </ACTIVATED_ABILITY>
  <HELP title="MORE_INFO_TITLE_CYCLING" body="MORE_INFO_BODY_CYCLING" zone="ZONE_ANY" />
  <SFX text="COMBAT_BLADE_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_BLADE_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Formal Request Thread

Postby Misplay » 04 Sep 2013, 14:57

Thx for your help! :wink:

One question about Undead gladiator: is it possible to add a query "do you want to use this ability?" during the upkeep? Currently, you could only use the first ability if you have another permanent that triggers during the upkeep... :(
Misplay
 
Posts: 92
Joined: 29 Aug 2013, 08:26
Has thanked: 50 times
Been thanked: 10 times

Re: Formal Request Thread

Postby sumomole » 04 Sep 2013, 15:26

Misplay wrote:Thx for your help! :wink:

One question about Undead gladiator: is it possible to add a query "do you want to use this ability?" during the upkeep? Currently, you could only use the first ability if you have another permanent that triggers during the upkeep... :(
Ah, miss something.
Undead Gladiator | Open
Code: Select all
    <?xml version="1.0"?>
    <CARD_V2 ExportVersion="1">
      <FILENAME text="UNDEAD_GLADIATOR_prefix41166" />
      <CARDNAME text="UNDEAD_GLADIATOR" />
      <TITLE>
        <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Undead Gladiator]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Gladiateur mort-vivant]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Gladiador muerto viviente]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Untoter Gladiator]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gladiatore Non Morto]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Undead Gladiator]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Undead Gladiator]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Undead Gladiator]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Gladiador Morto-Vivo]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[不死剑斗士]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[不死劍鬥士]]></LOCALISED_TEXT>
      </TITLE>
      <MULTIVERSEID value="prefix41166" />
      <ARTID value="prefix41166" />
      <ARTIST name="Jeff Easley" />
      <CASTING_COST cost="{1}{B}{B}" />
      <TYPE metaname="Creature" />
      <SUB_TYPE metaname="Zombie" />
      <SUB_TYPE metaname="Barbarian" />
      <EXPANSION value="DPI" />
      <RARITY metaname="R" />
      <POWER value="3" />
      <TOUGHNESS value="1" />
      <ACTIVATED_ABILITY active_zone="ZONE_GRAVEYARD">
        <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{B}, Discard a card: Return Undead Gladiator from your graveyard to your hand. Activate this ability only during your upkeep.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{B}, défaussez-vous d’une carte de votre main : Renvoyez le Gladiateur mort-vivant depuis votre cimetière dans votre main. Ne jouez cette capacité que pendant votre phase d’entretien.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{B}, descartar una carta de tu mano: Regresa el Gladiador muerto viviente de tu cementerio a tu mano. Juega esta habilidad sólo durante tu mantenimiento.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{B}, wirf eine Karte aus deiner Hand ab: Bringe den Untoten Gladiator aus deinem Friedhof auf deine Hand zurück. Spiele diese Fähigkeit nur während deines Versorgungssegments.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{B}, Scarta una carta: Riprendi in mano il Gladiatore Non Morto dal tuo cimitero. Attiva questa abilità solo durante il tuo mantenimento.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{B}, Discard a card: Return Undead Gladiator from your graveyard to your hand. Activate this ability only during your upkeep.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{B}, Discard a card: Return Undead Gladiator from your graveyard to your hand. Activate this ability only during your upkeep.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{B}, Discard a card: Return Undead Gladiator from your graveyard to your hand. Activate this ability only during your upkeep.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{B}, Descarte um card de sua mão: Devolve Gladiado Morto-Vivo de seu cemitério para sua mão. Use esta habilidade somente durante sua manutenção.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[{1}{B},从你手上弃掉一张牌:将不死剑斗士从你的坟墓场中移回你手上。你只能在你的维持中使用此异能。]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[{1}{B},從你手上棄掉一張牌:將不死劍鬥士從你的墳墓場中移回你手上。你只能在你的維持中使用此異能。]]></LOCALISED_TEXT>
        <AVAILABILITY upkeep="1">
        return EffectController():MyTurn()
        </AVAILABILITY>
        <COST mana_cost="{1}{B}" type="Mana" />
        <COST type="Discard" definition="0" compartment="1" query_tag="CARD_QUERY_CHOOSE_CARD_TO_DISCARD" item_count="1" />
        <COST_DEFINITION id="0">
        local filter = ClearFilter()
        filter:SetZone( ZONE_HAND, EffectController() )
        </COST_DEFINITION>
        <RESOLUTION_TIME_ACTION>
        if EffectSource() ~= nil then
           EffectSource():PutInHand()
        end
        </RESOLUTION_TIME_ACTION>
        <AUTO_SKIP no_effect_source="1" />
        <AI_AVAILABILITY window_step="upkeep" window_turn="my_turn" type="window" />
      </ACTIVATED_ABILITY>
      <TRIGGERED_ABILITY active_zone="ZONE_GRAVEYARD">
        <TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
        local player = EffectController()
        local filter = ClearFilter()
        filter:SetZone( ZONE_GRAVEYARD, EffectController() )
        filter:Add( FE_CARD_NAME, OP_IS, "UNDEAD_GLADIATOR" )
        filter:EvaluateObjects()
        if EffectSource() == filter:GetNthEvaluatedObject(0) then
          return MTG():GetStep() == STEP_UPKEEP
        end
        return false
        </TRIGGER>
        <RESOLUTION_TIME_ACTION />
        <AUTO_SKIP no_effect_source="1" />
      </TRIGGERED_ABILITY>
      <ACTIVATED_ABILITY active_zone="ZONE_HAND">
        <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Cycling {1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Recyclage {1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Ciclo {1}{B}.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Umwandlung {1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ciclo {1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[サイクリング {1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[순환 {1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Цикл {1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Reciclar {1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[循环{1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[循環{1}{B}]]></LOCALISED_TEXT>
        <COST mana_cost="{1}{B}" type="Mana" />
        <COST type="DiscardSelf" />
        <PLAY_TIME_ACTION>
        MTG():FireTrigger( TRIGGER_CYCLED, EffectSource() )
        </PLAY_TIME_ACTION>
        <RESOLUTION_TIME_ACTION>
        EffectController():DrawCards(1)
        </RESOLUTION_TIME_ACTION>
        <AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
        <AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
        <AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
        <AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
        <AI_AVAILABILITY window_step="declare_attackers" window_turn="their_turn" type="window" />
        <AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
        <AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
        <AI_AVAILABILITY type="in_response" response_source="1" />
        <AI_AVAILABILITY window_step="declare_blockers" type="window" />
        <AI_AVAILABILITY type="in_response" response_target="1" />
      </ACTIVATED_ABILITY>
      <HELP title="MORE_INFO_TITLE_CYCLING" body="MORE_INFO_BODY_CYCLING" zone="ZONE_ANY" />
      <SFX text="COMBAT_BLADE_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
      <SFX text="COMBAT_BLADE_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
    </CARD_V2>
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Formal Request Thread

Postby mr friendly guy » 04 Sep 2013, 15:35

For my multicolor deck, I would like to request Savage Lands
mr friendly guy
 
Posts: 85
Joined: 23 Aug 2013, 12:03
Has thanked: 2 times
Been thanked: 1 time

Re: Formal Request Thread

Postby gorem2k » 04 Sep 2013, 18:34

thefiremind wrote: But before thinking about that, you can test the code I gave you: it will return Gomazoa plus all blocked creatures (not only those blocked by Gomazoa) to their owners' libraries, and it's enough to see if this part works as expected.
Yes. affirmative :)

That part is working, players shuffle only one time even if two+ creatures of same player are blocked.

so now, we have to add a trigger WAS_BLOCKED_BY_A_CREATURE, save only creatures that SecondaryObject is Gomazoa then return saved result to LUA_CONDITION? when the trigger activates, will it be too late ? I wonder if WAS_BLOCKED will work, if not then maybe TRIGGER_ "BLOCKING" would be more safe?

EDIT: I mean "BLOCKS_A_CREATURE". I was about to complete but have no idea how to pass a LinkedDC filter to filter id 1. I don't even know what I'm talking about now :?
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: Formal Request Thread

Postby Misplay » 04 Sep 2013, 19:27

sumomole wrote:
Misplay wrote:Thx for your help! :wink:

One question about Undead gladiator: is it possible to add a query "do you want to use this ability?" during the upkeep? Currently, you could only use the first ability if you have another permanent that triggers during the upkeep... :(
Ah, miss something.
Undead Gladiator | Open
Code: Select all
    <?xml version="1.0"?>
    <CARD_V2 ExportVersion="1">
      <FILENAME text="UNDEAD_GLADIATOR_prefix41166" />
      <CARDNAME text="UNDEAD_GLADIATOR" />
      <TITLE>
        <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Undead Gladiator]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Gladiateur mort-vivant]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Gladiador muerto viviente]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Untoter Gladiator]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gladiatore Non Morto]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Undead Gladiator]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Undead Gladiator]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Undead Gladiator]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Gladiador Morto-Vivo]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[不死剑斗士]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[不死劍鬥士]]></LOCALISED_TEXT>
      </TITLE>
      <MULTIVERSEID value="prefix41166" />
      <ARTID value="prefix41166" />
      <ARTIST name="Jeff Easley" />
      <CASTING_COST cost="{1}{B}{B}" />
      <TYPE metaname="Creature" />
      <SUB_TYPE metaname="Zombie" />
      <SUB_TYPE metaname="Barbarian" />
      <EXPANSION value="DPI" />
      <RARITY metaname="R" />
      <POWER value="3" />
      <TOUGHNESS value="1" />
      <ACTIVATED_ABILITY active_zone="ZONE_GRAVEYARD">
        <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{B}, Discard a card: Return Undead Gladiator from your graveyard to your hand. Activate this ability only during your upkeep.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{B}, défaussez-vous d’une carte de votre main : Renvoyez le Gladiateur mort-vivant depuis votre cimetière dans votre main. Ne jouez cette capacité que pendant votre phase d’entretien.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{B}, descartar una carta de tu mano: Regresa el Gladiador muerto viviente de tu cementerio a tu mano. Juega esta habilidad sólo durante tu mantenimiento.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{B}, wirf eine Karte aus deiner Hand ab: Bringe den Untoten Gladiator aus deinem Friedhof auf deine Hand zurück. Spiele diese Fähigkeit nur während deines Versorgungssegments.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{B}, Scarta una carta: Riprendi in mano il Gladiatore Non Morto dal tuo cimitero. Attiva questa abilità solo durante il tuo mantenimento.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{B}, Discard a card: Return Undead Gladiator from your graveyard to your hand. Activate this ability only during your upkeep.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{B}, Discard a card: Return Undead Gladiator from your graveyard to your hand. Activate this ability only during your upkeep.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{B}, Discard a card: Return Undead Gladiator from your graveyard to your hand. Activate this ability only during your upkeep.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{B}, Descarte um card de sua mão: Devolve Gladiado Morto-Vivo de seu cemitério para sua mão. Use esta habilidade somente durante sua manutenção.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[{1}{B},从你手上弃掉一张牌:将不死剑斗士从你的坟墓场中移回你手上。你只能在你的维持中使用此异能。]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[{1}{B},從你手上棄掉一張牌:將不死劍鬥士從你的墳墓場中移回你手上。你只能在你的維持中使用此異能。]]></LOCALISED_TEXT>
        <AVAILABILITY upkeep="1">
        return EffectController():MyTurn()
        </AVAILABILITY>
        <COST mana_cost="{1}{B}" type="Mana" />
        <COST type="Discard" definition="0" compartment="1" query_tag="CARD_QUERY_CHOOSE_CARD_TO_DISCARD" item_count="1" />
        <COST_DEFINITION id="0">
        local filter = ClearFilter()
        filter:SetZone( ZONE_HAND, EffectController() )
        </COST_DEFINITION>
        <RESOLUTION_TIME_ACTION>
        if EffectSource() ~= nil then
           EffectSource():PutInHand()
        end
        </RESOLUTION_TIME_ACTION>
        <AUTO_SKIP no_effect_source="1" />
        <AI_AVAILABILITY window_step="upkeep" window_turn="my_turn" type="window" />
      </ACTIVATED_ABILITY>
      <TRIGGERED_ABILITY active_zone="ZONE_GRAVEYARD">
        <TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
        local player = EffectController()
        local filter = ClearFilter()
        filter:SetZone( ZONE_GRAVEYARD, EffectController() )
        filter:Add( FE_CARD_NAME, OP_IS, "UNDEAD_GLADIATOR" )
        filter:EvaluateObjects()
        if EffectSource() == filter:GetNthEvaluatedObject(0) then
          return MTG():GetStep() == STEP_UPKEEP
        end
        return false
        </TRIGGER>
        <RESOLUTION_TIME_ACTION />
        <AUTO_SKIP no_effect_source="1" />
      </TRIGGERED_ABILITY>
      <ACTIVATED_ABILITY active_zone="ZONE_HAND">
        <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Cycling {1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Recyclage {1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Ciclo {1}{B}.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Umwandlung {1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ciclo {1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[サイクリング {1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[순환 {1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Цикл {1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Reciclar {1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[循环{1}{B}]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[循環{1}{B}]]></LOCALISED_TEXT>
        <COST mana_cost="{1}{B}" type="Mana" />
        <COST type="DiscardSelf" />
        <PLAY_TIME_ACTION>
        MTG():FireTrigger( TRIGGER_CYCLED, EffectSource() )
        </PLAY_TIME_ACTION>
        <RESOLUTION_TIME_ACTION>
        EffectController():DrawCards(1)
        </RESOLUTION_TIME_ACTION>
        <AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
        <AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
        <AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
        <AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
        <AI_AVAILABILITY window_step="declare_attackers" window_turn="their_turn" type="window" />
        <AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
        <AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
        <AI_AVAILABILITY type="in_response" response_source="1" />
        <AI_AVAILABILITY window_step="declare_blockers" type="window" />
        <AI_AVAILABILITY type="in_response" response_target="1" />
      </ACTIVATED_ABILITY>
      <HELP title="MORE_INFO_TITLE_CYCLING" body="MORE_INFO_BODY_CYCLING" zone="ZONE_ANY" />
      <SFX text="COMBAT_BLADE_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
      <SFX text="COMBAT_BLADE_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
    </CARD_V2>
I hate to be that man... But it doesn't work, I don't know why. The game crashes when I use it. :?
Misplay
 
Posts: 92
Joined: 29 Aug 2013, 08:26
Has thanked: 50 times
Been thanked: 10 times

Re: Formal Request Thread

Postby thefiremind » 04 Sep 2013, 19:56

gorem2k wrote:so now, we have to add a trigger WAS_BLOCKED_BY_A_CREATURE, save only creatures that SecondaryObject is Gomazoa then return saved result to LUA_CONDITION? when the trigger activates, will it be too late ? I wonder if WAS_BLOCKED will work, if not then maybe TRIGGER_ "BLOCKING" would be more safe?

EDIT: I mean "BLOCKS_A_CREATURE". I was about to complete but have no idea how to pass a LinkedDC filter to filter id 1. I don't even know what I'm talking about now :?
I was meaning to do something similar to Guardian of the Gateless:
Gomazoa (untested) | Open
Code: Select all
  <TRIGGERED_ABILITY linked_ability_group="1" replacement_effect="1" priority="20">
    <TRIGGER value="BLOCKS_A_CREATURE" simple_qualifier="self" />
    <RESOLUTION_TIME_ACTION>
    local chest = LinkedDC():Get_Chest(1)
    if chest == nil then
       chest = LinkedDC():Make_Chest(1)
       LinkedDC():Set_Int(0, 0)
    end
    chest:Set_CardPtr( LinkedDC():Get_Int(0), SecondaryObject() )
    LinkedDC():Int_Inc(0)
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY linked_ability_group="1" replacement_effect="1" priority="20">
    <TRIGGER value="BEGINNING_OF_STEP">
    return MTG():GetStep() == STEP_BEGIN_COMBAT
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    LinkedDC():Free_Compartment(1)
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <ACTIVATED_ABILITY linked_ability_group="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Put Gomazoa and each creature it’s blocking on top of their owners’ libraries, then those players shuffle their libraries.]]></LOCALISED_TEXT>
    <COST type="TapSelf" />
    <PLAY_TIME_ACTION>
    -- I'm not sure if LinkedDC would survive in case Gomazoa leaves the battlefield in response to its activation, so I'm copying the data to EffectDC
    local chest = EffectDC():Make_Chest(1)
    local lchest = LinkedDC():Get_Chest(1)
    if lchest ~= nil then
       chest:CopyFrom(lchest)
       EffectDC():Set_Int( 0, LinkedDC():Get_Int(0) )
    end
    </PLAY_TIME_ACTION>
    <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:Set_Or()
    filter:Add( FE_CARD_INSTANCE, OP_IS, EffectSource() )
    local subFilter = filter:AddSubFilter_And()
       subFilter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
       subFilter:Add(FE_IS_BLOCKED, true)
       subFilter:Add( FE_LUA_CONDITION, 1, EffectController(), EffectDC() )
    </FILTER>
    <FILTER_CONDITION id="1">
    local chest = EffectDC():Get_Chest(1)
    local count = EffectDC():Get_Int(0)
    if count &gt; 0 then
       for i=0,count-1 do
          if FilteredCard() == chest:Get_CardPtr(i) then
             return true
          end
       end
    end
    return false
    </FILTER_CONDITION>
    <RESOLUTION_TIME_ACTION>
    EffectDC():Make_Chest(2)
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION filter_id="0">
    if FilteredCard() ~= nil then
       local ownersDC = EffectDC():Get_Chest(2)
       local owner = FilteredCard():GetOwner()
       -- We want to see if this owner has been already added to ownersDC
       local already_added = false
       local index = 0
       local player = ownersDC:Get_PlayerPtr(0)
       while player ~= nil do
          if player == owner then
             -- We already added this owner to ownersDC
             already_added = true
             player = nil
          else
             -- Let's go on with the search
             index = index + 1
             player = ownersDC:Get_PlayerPtr(index)
          end
       end
       if already_added == false then
          -- We didn't add this owner to ownersDC, let's do it now
          ownersDC:Set_PlayerPtr(index, owner)
       end
        FilteredCard():PutOnTopOfLibrary()
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local ownersDC = EffectDC():Get_Chest(2)
    local index = 0
    local player = ownersDC:Get_PlayerPtr(0)
    while player ~= nil do
       player:ShuffleLibrary()
       index = index + 1
       player = ownersDC:Get_PlayerPtr(index)
    end
    </RESOLUTION_TIME_ACTION>
  </ACTIVATED_ABILITY>
EDIT: Now that I think about it, if Gomazoa leaves the battlefield in response to its activation, nothing would happen... anyway I don't feel safe using LinkedDC inside FILTER_CONDITION, so I think that copying it to EffectDC is still a good choice.
We are also probably making this more complicated than it should... on second thought I would remove the FILTER and FILTER_CONDITION blocks altogether and loop through the blocked creatures' chest directly into the RESOLUTION_TIME_ACTION. But I'm not doing it right now... maybe I will if this version doesn't work.
Last edited by thefiremind on 04 Sep 2013, 20:07, edited 3 times in total.
< 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 gorem2k » 04 Sep 2013, 19:57

Misplay wrote:I hate to be that man... But it doesn't work, I don't know why. The game crashes when I use it. :?
looking at the code you have here, seems to me the header and EOF </CARD_V2> spacing may be off.

it should look like this in notepad:
Image
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: Formal Request Thread

Postby gorem2k » 04 Sep 2013, 20:08

thefiremind wrote:I was meaning to do something similar to Guardian of the Gateless:
Wait, I thought Guardian of the Gateless was impossible?!
just found out sumomole did it, I wasn't aware until you mention this card.

I'm gonna try Gomazoa first and see how it turns out.

EDIT: AI attacked with Crazed Goblin, I blocked then activate Gomazoa, goblin stayed on battlefield, Gomazoa put on top of my library, no player shuffled library. yeah I think it's gettin too complicated, should do only one loop like RSN said .
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: Formal Request Thread

Postby gorem2k » 04 Sep 2013, 20:36

thefiremind wrote:But I'm not doing it right now... maybe I will if this version doesn't work.
Sure, don't do it if you don't plan to use this card in the future :D Maze of Ith or even Fog Bank is much better, the only things this does is shuffle library and prevent losing when drawing the last card of deck.
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: Formal Request Thread

Postby jacque » 05 Sep 2013, 02:03

Can someone please include Propaganda & Ghost Town in their next release? xD
Learn making your own cards today!!!

Click on Image if a post/reply helped you.

I stitch old cards together to make new ones...

~ Jacque, the confused
jacque
 
Posts: 217
Joined: 07 Jun 2013, 20:11
Has thanked: 26 times
Been thanked: 44 times

Re: Formal Request Thread

Postby thefiremind » 05 Sep 2013, 08:36

I don't think you'll ever find Propaganda or Ghostly Prison in any release, those cards gave headaches to more than one modder... :lol:
< 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 jacque » 05 Sep 2013, 08:58

Noooo... =( Evilll... Kinda love having them around... *solves a lot of problems* xD
Learn making your own cards today!!!

Click on Image if a post/reply helped you.

I stitch old cards together to make new ones...

~ Jacque, the confused
jacque
 
Posts: 217
Joined: 07 Jun 2013, 20:11
Has thanked: 26 times
Been thanked: 44 times

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 5 guests

Main Menu

User Menu

Our Partners


Who is online

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

Login Form