It is currently 20 Jul 2019, 03:10
   
Text Size

Changing the colors

Moderators: Xander9009, CCGHQ Admins

Changing the colors

Postby Thran75 » 24 Feb 2013, 19:51

Is there someone that know the way to do cards alike Alchor's Tomb, Distorting lens, Caoslace or other color-changing stuff?
Thran75
 
Posts: 21
Joined: 24 Feb 2013, 11:38
Has thanked: 7 times
Been thanked: 0 time

Re: Changing the colors

Postby thefiremind » 24 Feb 2013, 19:58

You just have to take a look at the official cards.
Niveous Wisps is a good example of how to change color:
Code: Select all
  <SPELL_ABILITY dangerous="1" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Target creature becomes white until end of turn. Tap that creature.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[La créature ciblée devient blanche jusqu’à la fin du tour. Engagez cette créature.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[La criatura objetivo es blanca hasta el final del turno. Gira esa criatura.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Eine Kreatur deiner Wahl wird bis zum Ende des Zuges weiß. Tappe diese Kreatur.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Una creatura bersaglio diventa bianca fino alla fine del turno. TAPpa quella creatura.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[クリーチャー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[A criatura alvo torna-se branca até o final do turno. Vire aquela criatura.]]></LOCALISED_TEXT>
    <TARGET_DEFINITION id="0">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddCardType( CARD_TYPE_CREATURE )
    filter:SetZone( ZONE_IN_PLAY )
    filter:SetHint( HINT_ENEMY, EffectController() )
    </TARGET_DEFINITION>
    <TARGET_DETERMINATION>
    return AtLeastOneTargetFromDefinition(0)
    </TARGET_DETERMINATION>
    <PLAY_TIME_ACTION target_choosing="1">
    EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE_TAP", EffectDC():Make_Targets(0) )
    </PLAY_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target_card = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target_card ~= nil then
       target_card:Tap()
    end
    </RESOLUTION_TIME_ACTION>
    <CONTINUOUS_ACTION layer="5">
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local characteristics = target:GetCurrentCharacteristics()
       characteristics:Colour_Set( COLOUR_WHITE )
    end
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />
  </SPELL_ABILITY>
while Rise from the Grave is a good example of how to add a color to the pre-existing ones:
Code: Select all
  <SPELL_ABILITY filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Put target creature card from a graveyard onto the battlefield under your control. That creature is a black Zombie in addition to its other colors and types.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Mettez sur le champ de bataille, sous votre contrôle, une carte de créature ciblée d’un cimetière. Cette créature est un zombie noir en plus de ses autres couleurs et de ses autres types.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Pon en el campo de batalla bajo tu control la carta de criatura objetivo de un cementerio. Esa criatura es un Zombie negro además de sus otros colores y tipos.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Bringe eine Kreaturenkarte deiner Wahl aus einem Friedhof unter deiner Kontrolle ins Spiel. Diese Kreatur ist zusätzlich zu ihren anderen Farben und Typen ein schwarzer Zombie.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Metti sul campo di battaglia sotto il tuo controllo una carta creatura bersaglio da un cimitero. Quella creatura è uno Zombie nero in aggiunta ai suoi altri tipi e colori.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[いずれかの墓地にあるクリーチャー・カード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[Coloque o card de criatura alvo de um cemitério no campo de batalha sob o seu controle. Aquela criatura é um Zumbi preto além de suas outras cores e tipos.]]></LOCALISED_TEXT>
    <TARGET_DEFINITION id="0">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddCardType( CARD_TYPE_CREATURE )
    filter:SetZone( ZONE_GRAVEYARD )
    filter:SetHint( HINT_NEUTRAL, EffectController() )
    </TARGET_DEFINITION>
    <TARGET_DETERMINATION>
    return AtLeastOneTargetFromDefinition(0)
    </TARGET_DETERMINATION>
    <PLAY_TIME_ACTION target_choosing="1">
    EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE_TO_PUT_ONTO_BATTLEFIELD", EffectDC():Make_Targets(0) )
    </PLAY_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil and target:GetZone() == ZONE_GRAVEYARD then
       EffectDC():Get_Targets(0):Protect_CardPtr(0)
       target:PutIntoPlay( EffectController() )
    end
    </RESOLUTION_TIME_ACTION>
    <CONTINUOUS_ACTION layer="5">
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local characteristics = target:GetCurrentCharacteristics()
       characteristics:Colour_Get():Add( COLOUR_BLACK )
    end
    </CONTINUOUS_ACTION>
    <CONTINUOUS_ACTION layer="4">
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       target:GetCurrentCharacteristics():SubType_GetWritable(target):Add( CREATURE_TYPE_ZOMBIE , target )
    end
    </CONTINUOUS_ACTION>
    <DURATION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if (target ~= nil) then
       return false
    else
       return true
    end
    </DURATION>
  </SPELL_ABILITY>
< 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: 717 times

Re: Changing the colors

Postby Thran75 » 24 Feb 2013, 20:58

Thank you! I just did a working Distorting lens :D
Thran75
 
Posts: 21
Joined: 24 Feb 2013, 11:38
Has thanked: 7 times
Been thanked: 0 time


Return to Programming Talk

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron

Who is online

In total there are 2 users online :: 1 registered, 0 hidden and 1 guest (based on users active over the past 10 minutes)
Most users ever online was 287 on 31 Mar 2019, 04:11

Users browsing this forum: Bing [Bot] and 1 guest

Login Form