It is currently 16 Apr 2024, 13:56
   
Text Size

HOW TO: Additional and Kicker Cost and Card Text Formatting

Moderator: CCGHQ Admins

HOW TO: Additional and Kicker Cost and Card Text Formatting

Postby kevlahnota » 02 Sep 2010, 21:02

Just want to share my findings since i have already DLC2.(the sample codes below will work even without dlc 2 )
Now we must have 2 additional tags in our card text.
example:

GATEKEEPER_OF_MALAKIR_KICKED - if kicked, target player sacrifices a creature
GATEKEEPER_OF_MALAKIR_UNKICKED - cast Gatekeeper of Malakir

KICKER example:

Code: Select all
<UTILITY_ABILITY tag="GATEKEEPER_OF_MALAKIR_RULE_1" layer="0">
      <COST qualifier="Kicker" type="Mana" cost="{B}" />
</UTILITY_ABILITY>

 <TRIGGERED_ABILITY layer="0" tag="GATEKEEPER_OF_MALAKIR_RULE_2" forced_skip="1" >
           
         <TRIGGER value="COMES_INTO_PLAY">
            return SelfTriggered() and Object():Kicked() ~= 0
          </TRIGGER>
         
         <TARGET_DETERMINATION>
            return TargetPlayerBad()
          </TARGET_DETERMINATION>
       
           <PLAYTIME>
            ChooseTarget( "CHOOSEPLAYER" )
           </PLAYTIME>   
       
           <PRE_EFFECT>
            Object():GetFilter():Clear()
              Object():GetFilter():SetPlayer( Object():GetTargetPlayer() )
              Object():GetFilter():SetZone( ZONE_IN_PLAY )
              Object():GetFilter():SetController( Object():GetTargetPlayer() )
              Object():GetFilter():AddCardType( CARD_TYPE_CREATURE )
            Object():GetFilter():NotTargetted()
              Object():GetTargetPlayer():ChooseTarget( "CHOOSETARGETCREATURE" )
         </PRE_EFFECT>
         
           <EFFECT>
            SacrificeTargetCard()
           </EFFECT>
         
     </TRIGGERED_ABILITY>

--------------------------------------------------------------------------

Additional Cost Example:

Code: Select all
<UTILITY_ABILITY tag="HARROW_RULE_1" layer="0">
      <COST qualifier="Additional" type="Sacrifice">
        <TARGET_DETERMINATION>
          return TargetLandYouControl()
        </TARGET_DETERMINATION>
        <PLAYTIME>
          ChooseTarget( "ChooseLandToSacrifice" )
        </PLAYTIME>
      </COST>
    </UTILITY_ABILITY>
    <SPELL_ABILITY tag="HARROW_RULE_2" layer="0">
      <PRE_EFFECT>
        Object():GetFilter():Clear()
        Object():GetFilter():NotTargetted()
        Object():GetFilter():AddCardType( CARD_TYPE_LAND )
        Object():GetFilter():AddSupertype( SUPERTYPE_BASIC )
        Object():GetFilter():SetPlayer( Object():GetOwner() )
        Object():GetFilter():SetZone( ZONE_LIBRARY )
        Object():GetFilter():May()
        Object():GetPlayer():SetTargetCount( 2 )
        Object():GetPlayer():SetTargetPrompt( 0, "SearchYourLibraryForBasicLand" )
        Object():GetPlayer():SetTargetPrompt( 1, "SearchYourLibraryForAnotherBasicLand" )
        Object():GetPlayer():ChooseTargetsWithFlags( QUERY_FLAG_CAN_BE_FINISHED_EARLY )
      </PRE_EFFECT>
      <EFFECT>
        if (Object():GetNthTargetCard( 0 ) ~= nil) then
        Object():GetNthTargetCard( 0 ):PutIntoPlay( Object():GetOwner() )
        end

        if (Object():GetNthTargetCard( 1 ) ~= nil) then
        Object():GetNthTargetCard( 1 ):PutIntoPlay( Object():GetOwner() )
        end

        Object():GetOwner():ShuffleLibrary()
      </EFFECT>
    </SPELL_ABILITY>
---------------------------------------------------

Card text formatting:

We can use ASCII Character Reference and ASCII Device Control Characters
to format the text box of the card in our card_text.xml

this sample image doesn't use flavour text. :D
Image

example:
&#10; -- this is the line feed or next line.
&#160; -- this is a non breaking space
etc...
| sample text | -- to italicized text.
Code: Select all
<Cell><Data ss:Type="String">KNIGHT_OF_THE_RELIQUARY_RULE_1</Data></Cell>
    <Cell ss:Index="3" ss:StyleID="Default"><Data ss:Type="String">Knight of the Reliquary gets +1/+1 for each land card in your graveyard.&#10;</Data></Cell>

<Cell><Data ss:Type="String">KNIGHT_OF_THE_RELIQUARY_RULE_2</Data></Cell>
    <Cell ss:Index="3" ss:StyleID="s68"><Data ss:Type="String">{T}, Sacrifice a Forest or Plains: Search your library for a land card, put it onto the battlefield, then shuffle your library.&#10;|&#10;“Knowledge of Bant's landscape and ruins is a weapon that the invaders can't comprehend.”|</Data></Cell>

User avatar
kevlahnota
Programmer
 
Posts: 825
Joined: 19 Jul 2010, 17:45
Location: Philippines
Has thanked: 14 times
Been thanked: 264 times

Re: HOW TO: Additional and Kicker Cost and Card Text Formatt

Postby Yanna » 03 Sep 2010, 17:33

Very interesting finding kev, especially (well for me) the ascii insertion.

Congrats on the findings, that'll sure up the prospects of coding new cards =D>
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Re: HOW TO: Additional and Kicker Cost and Card Text Formatt

Postby Uresti » 04 Sep 2010, 05:11

Yes Pack 2 is out now. seems they just "enabled" the extra abilities on the exe because <COST qualifier="Kicker"/> didnt work in the first DLC, we can use now kicker to improve my old "buyback" code...i mean use kicker instead of buyback....
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: HOW TO: Additional and Kicker Cost and Card Text Formatt

Postby n00854180t » 09 Oct 2010, 05:49

Is there a way to do multikicker, as from M11 (I think?)?
n00854180t
 
Posts: 19
Joined: 09 Oct 2010, 05:41
Has thanked: 0 time
Been thanked: 0 time


Return to Documentation

Who is online

Users browsing this forum: No registered users and 13 guests


Who is online

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

Users browsing this forum: No registered users and 13 guests

Login Form