It is currently 16 Apr 2021, 00:06
   
Text Size

Help..need a code for new card Lilianas Scrounger

Moderators: Xander9009, CCGHQ Admins

Help..need a code for new card Lilianas Scrounger

Postby newtomagic » 10 Jul 2020, 07:15

I am trying to make those new Liliana card from core set 2021 and im having trouble making this card Lilianas Scrounger cause i cant find the way to implement the MAY condition..can someone make the code..Thanks a lot
newtomagic
 
Posts: 26
Joined: 10 Jul 2020, 06:56
Has thanked: 8 times
Been thanked: 1 time

Re: Help..need a code for new card Lilianas Scrounger

Postby RiiakShiNal » 15 Jul 2020, 10:43

Implementing MAY is easy, you simply add a MAY block to the TRIGGERED_ABILITY. Or if you want to always have it prompt the user (instead of having the AI determine whether to use the ability or not if the appropriate option is set) then add the always_prompt="1" attribute. The MAY block can be simple like <MAY/> or <MAY always_prompt="1"/> or can be more complex with additional logic to help determine the best times to use. Using the "tag" attribute you can even determine what you want to ask the player.

Here is an example of a slightly more complex usage:
Izzet Keyrune | Open
Code: Select all
   <TRIGGERED_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Izzet Keyrune deals combat damage to a player, you may draw a card. If you do, discard a card.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que la Runeclé d’Izzet inflige des blessures de combat à un joueur, vous pouvez piocher une carte. Si vous faites ainsi, défaussez-vous d’une carte.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que la Llave rúnica ízzet haga daño de combate a un jugador, puedes robar una carta. Si lo haces, descarta una carta.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn der Izzet-Runenschlüssel einem Spieler Kampfschaden zufügt, kannst du eine Karte ziehen. Falls du dies tust, wirf eine Karte aus deiner Hand ab.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta la Runachiave Izzet infligge danno da combattimento a un giocatore, puoi pescare una carta. Se lo fai, scarta una carta.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[イゼットの魔鍵がいずれかのプレイヤーに戦闘ダメージを与えるたび、あなたはカードを1枚引いてもよい。そうした場合、カードを1枚捨てる。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[이젯 열쇠룬이 플레이어에게 전투피해를 입힐 때마다, 당신은 카드 한 장을 뽑을 수 있다. 그렇게 한다면, 카드 한 장을 버린다.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда Рунный Ключ Иззетов наносит боевые повреждения игроку, вы можете взять карту. Если вы это делаете, сбросьте карту.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que Chave Rúnica Izzet causa dano de combate a um jogador, você pode comprar um card. Se fizer isso, descarte um card.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[每当伊捷符镇兵对一位牌手造成战斗伤害时,你可以抓一张牌。若你如此作,则弃一张牌。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[每當伊捷符鎮兵對一位玩家造成戰鬥傷害時,你可以抽一張牌。若你如此作,則棄一張牌。]]></LOCALISED_TEXT>
      <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" simple_qualifier="self" damage_type="combat" />
      <MAY tag="CARD_QUERY_DRAW_A_CARD" always_prompt="1">
         -- AI behaviour
         if (EffectController():Library_Count() &lt; 10) or (EffectController():Hand_Count() &lt; 1) then
            return false
         else
            return true
         end
      </MAY>
      <RESOLUTION_TIME_ACTION>
         EffectController():DrawCards(1)
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         local oFilter = ClearFilter()
         oFilter:SetZone( ZONE_HAND, EffectController() )
         EffectController():ChooseItem( "CARD_QUERY_CHOOSE_CARD_TO_DISCARD", EffectDC():Make_Targets( 0 ) )
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         local oCard = EffectDC():Get_Targets( 0 ):Get_CardPtr( 0 )
         if (oCard ~= nil) then
            oCard:Discard()
         end
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
RiiakShiNal
Programmer
 
Posts: 2154
Joined: 16 May 2011, 21:37
Has thanked: 74 times
Been thanked: 480 times


Return to 2014

Who is online

Users browsing this forum: No registered users and 5 guests


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 1371 on 09 Feb 2020, 16:22

Users browsing this forum: No registered users and 5 guests

Login Form