HOW TO: Additional and Kicker Cost and Card Text Formatting
Posted: 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:
Additional Cost Example:
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.
example:
-- this is the line feed or next line.
  -- this is a non breaking space
etc...
| sample text | -- to italicized text.
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.
example:
-- this is the line feed or next line.
  -- 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. </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. | “Knowledge of Bant's landscape and ruins is a weapon that the invaders can't comprehend.”|</Data></Cell>