Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
2014




Formal Request Thread
Moderator: CCGHQ Admins
Re: Formal Request Thread
by drleg3nd » 03 Dec 2013, 13:04
hey guys can someone help with this card last ability and chk out the codes i inputted to see if everything chks out.thx
- Utopia Sprawl | Open
- Code: Select all
<SPELL_ABILITY attach_definition="0">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchant Forest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanter : forêt]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Encantar bosque.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Waldverzauberung]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Incanta Foresta]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャント(森)]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchant Forest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Зачаровать Лес]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Encantar Floresta]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_FOREST_TO_ENCHANT" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_SUBTYPE, OP_IS, LAND_TYPE_FOREST )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if (target ~= nil and EffectSource() ~= nil) then
EffectSource():Attach( target )
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY replacement_query="1" linked_ability_group="1" active_zone="ZONE_TRANSITION">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Utopia Sprawl enters the battlefield, choose a color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Au moment où l’Étendue de l’utopie arrive en jeu, choisissez une couleur.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[En cuanto la Expansión utópica entre en juego, elige un color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sowie die Utopia-Ausbreitung ins Spiel kommt, bestimme eine Farbe.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mentre la Propagazione dell’Utopia entra nel campo di battaglia, scegli un colore.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[楽園の拡散が場に出るに際し、色を1色選ぶ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As Utopia Sprawl enters the battlefield, choose a color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда Утопический рост вступает в игру, выберите цвет.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conforme Propagação da Utopia entra em jogo, escolha uma cor.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
<RESOLUTION_TIME_ACTION>
EffectController():ChooseColour( "CARD_QUERY_CHOOSE_COLOUR", true )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
LinkedDC():Set_Int( 0, GetChosenColour() )
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que la forêt enchantée est engagée pour du mana, son contrôleur ajoute un mana de la couleur choisie à sa réserve.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que el bosque encantado se gire para obtener maná, su controlador agrega un maná del color elegido a su reserva de maná.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn der verzauberte Wald für Mana getappt wird, erhöht sein Beherrscher seinen Manavorrat um ein zusätzliches Mana der bestimmten Farbe.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta la Foresta incantata è TAPpata per attingere mana, il suo controllore aggiunge un mana del colore scelto alla sua riserva di mana.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャントされている森がマナを引き出す目的でタップされるたび、それのコントローラーは選ばれた色のマナ1点を自分のマナ・プールに加える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда зачарованный Лес поворачивается для получения маны, контролирующий его игрок добавляет одну ману выбранного цвета в свой запас маны.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que a floresta encantada é virada para gerar mana, seu controlador adiciona um mana da cor escolhida à sua própria reserva de mana.]]></LOCALISED_TEXT>
</TRIGGERED_ABILITY>
</CARD_V2>
Re: Formal Request Thread
by drleg3nd » 03 Dec 2013, 13:33
can someone chk out this card thx,
- Tariel,Reckoner of Souls | Open
- Code: Select all
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flying, vigilance]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vol, vigilance]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Vuela, vigilancia.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fliegend, Wachsamkeit]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Volare, cautela]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[飛行、警戒]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Flying, vigilance]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Flying, vigilance]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Flying, vigilance]]></LOCALISED_TEXT>
<INTRINSIC characteristic="CHARACTERISTIC_FLYING" />
<INTRINSIC characteristic="CHARACTERISTIC_VIGILANCE" />
</STATIC_ABILITY>
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Choose a creature card at random from target opponent’s graveyard. Put that card onto the battlefield under your control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T} : Choisissez une carte de créature au hasard dans le cimetière d’un adversaire ciblé. Mettez cette carte sur le champ de bataille sous votre contrôle.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: Elige una carta de criatura al azar del cementerio del oponente objetivo. Pon esa carta en el campo de batalla bajo tu control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Bestimme zufällig eine Kreaturenkarte aus dem Friedhof eines Gegners deiner Wahl. Bringe diese Karte unter deiner Kontrolle ins Spiel.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Scegli una carta creatura a caso dal cimitero di un avversario bersaglio. Mettila sul campo di battaglia sotto il tuo controllo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:対戦相手1人を対象とする。そのプレイヤーの墓地にあるクリーチャー・カードを無作為に1枚選ぶ。そのカードを、あなたのコントロール下で戦場に出す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: Choose a creature card at random from target opponent’s graveyard. Put that card onto the battlefield under your control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: Choose a creature card at random from target opponent’s graveyard. Put that card onto the battlefield under your control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Choose a creature card at random from target opponent’s graveyard. Put that card onto the battlefield under your control.]]></LOCALISED_TEXT>
<COST type="TapSelf" />
<RESOLUTION_TIME_ACTION>
local player = EffectController()
local numCards = player:Graveyard_Count()
if numCards > 0 then
local index = math.random(0, numCards-1)
local card = player:Graveyard_GetNth(index)
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE ) then
card:PutOntoBattlefield( EffectController() )
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
Re: Formal Request Thread
by RiiakShiNal » 03 Dec 2013, 14:00
For these abilities they will only work with manual mana as otherwise there is no way to tell when something is tapped for mana. The abilities are going to be variants on how I coded Mana Flare as they will be TRIGGERED_ABILITYs with value="BECAME_TAPPED_FOR_MANA", the difference is in what it will produce for Verdant Haven you can choose any color (so you can look at cards like Birds of Paradise and Abundant Growth) for Utopia Sprawl you only need to produce the colour that was chosen when entering the battlefield so that makes that ability slightly easier.drleg3nd wrote:hey guys can someone help with this card last ability and chk out the codes i inputted to see if everything chks out.thxi was looking for Verdant Haven to copy last ability but either it wasnt made or it's not on portable HDD
- Utopia Sprawl | Open
- Code: Select all
<SPELL_ABILITY attach_definition="0">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchant Forest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanter : forêt]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Encantar bosque.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Waldverzauberung]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Incanta Foresta]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャント(森)]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchant Forest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Зачаровать Лес]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Encantar Floresta]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_FOREST_TO_ENCHANT" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_SUBTYPE, OP_IS, LAND_TYPE_FOREST )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if (target ~= nil and EffectSource() ~= nil) then
EffectSource():Attach( target )
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY replacement_query="1" linked_ability_group="1" active_zone="ZONE_TRANSITION">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Utopia Sprawl enters the battlefield, choose a color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Au moment où l’Étendue de l’utopie arrive en jeu, choisissez une couleur.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[En cuanto la Expansión utópica entre en juego, elige un color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sowie die Utopia-Ausbreitung ins Spiel kommt, bestimme eine Farbe.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mentre la Propagazione dell’Utopia entra nel campo di battaglia, scegli un colore.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[楽園の拡散が場に出るに際し、色を1色選ぶ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As Utopia Sprawl enters the battlefield, choose a color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда Утопический рост вступает в игру, выберите цвет.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conforme Propagação da Utopia entra em jogo, escolha uma cor.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
<RESOLUTION_TIME_ACTION>
EffectController():ChooseColour( "CARD_QUERY_CHOOSE_COLOUR", true )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
LinkedDC():Set_Int( 0, GetChosenColour() )
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que la forêt enchantée est engagée pour du mana, son contrôleur ajoute un mana de la couleur choisie à sa réserve.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que el bosque encantado se gire para obtener maná, su controlador agrega un maná del color elegido a su reserva de maná.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn der verzauberte Wald für Mana getappt wird, erhöht sein Beherrscher seinen Manavorrat um ein zusätzliches Mana der bestimmten Farbe.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta la Foresta incantata è TAPpata per attingere mana, il suo controllore aggiunge un mana del colore scelto alla sua riserva di mana.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャントされている森がマナを引き出す目的でタップされるたび、それのコントローラーは選ばれた色のマナ1点を自分のマナ・プールに加える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда зачарованный Лес поворачивается для получения маны, контролирующий его игрок добавляет одну ману выбранного цвета в свой запас маны.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que a floresta encantada é virada para gerar mana, seu controlador adiciona um mana da cor escolhida à sua própria reserva de mana.]]></LOCALISED_TEXT>
</TRIGGERED_ABILITY>
</CARD_V2>
You should note though that you will have problems with the abilities if you enchant a basic land or enchant a land that does not use my manual mana functions because the required triggers will only function with my manual mana functions.
No, this won't work. the ACTIVATED_ABILITY is completely wrong. First the ability says "target opponent's graveyard", but you define the player as EffectController() (which is you, not an opponent). You need to have a TARGET block and a TARGET_DEFINITION for selecting which opponent.drleg3nd wrote:can someone chk out this card thx,
- Tariel,Reckoner of Souls | Open
- Code: Select all
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flying, vigilance]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vol, vigilance]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Vuela, vigilancia.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fliegend, Wachsamkeit]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Volare, cautela]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[飛行、警戒]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Flying, vigilance]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Flying, vigilance]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Flying, vigilance]]></LOCALISED_TEXT>
<INTRINSIC characteristic="CHARACTERISTIC_FLYING" />
<INTRINSIC characteristic="CHARACTERISTIC_VIGILANCE" />
</STATIC_ABILITY>
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Choose a creature card at random from target opponent’s graveyard. Put that card onto the battlefield under your control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T} : Choisissez une carte de créature au hasard dans le cimetière d’un adversaire ciblé. Mettez cette carte sur le champ de bataille sous votre contrôle.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: Elige una carta de criatura al azar del cementerio del oponente objetivo. Pon esa carta en el campo de batalla bajo tu control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Bestimme zufällig eine Kreaturenkarte aus dem Friedhof eines Gegners deiner Wahl. Bringe diese Karte unter deiner Kontrolle ins Spiel.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Scegli una carta creatura a caso dal cimitero di un avversario bersaglio. Mettila sul campo di battaglia sotto il tuo controllo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:対戦相手1人を対象とする。そのプレイヤーの墓地にあるクリーチャー・カードを無作為に1枚選ぶ。そのカードを、あなたのコントロール下で戦場に出す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: Choose a creature card at random from target opponent’s graveyard. Put that card onto the battlefield under your control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: Choose a creature card at random from target opponent’s graveyard. Put that card onto the battlefield under your control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Choose a creature card at random from target opponent’s graveyard. Put that card onto the battlefield under your control.]]></LOCALISED_TEXT>
<COST type="TapSelf" />
<RESOLUTION_TIME_ACTION>
local player = EffectController()
local numCards = player:Graveyard_Count()
if numCards > 0 then
local index = math.random(0, numCards-1)
local card = player:Graveyard_GetNth(index)
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE ) then
card:PutOntoBattlefield( EffectController() )
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
Also it says "choose a creature card at random" not "choose a card at random" so you can't use Graveyard_Count() or Graveyard_GetNth(). You need to set up a filter for CARD_TYPE_CREATURE in zone ZONE_GRAVEYARD belonging to targeted player, EvaluateObjects() on that filter then GetRandomEvaluatedObject() to get the random creature.
Also you need to watch your code structure and syntax you have an if block without an end and you have then at the end of a line without a corresponding if and end.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Formal Request Thread
by NeoAnderson » 03 Dec 2013, 14:22
As Riiak already tell you this code will not work for many reasons.drleg3nd wrote:can someone chk out this card thx,
- Tariel,Reckoner of Souls | Open
- Code: Select all
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flying, vigilance]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vol, vigilance]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Vuela, vigilancia.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fliegend, Wachsamkeit]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Volare, cautela]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[飛行、警戒]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Flying, vigilance]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Flying, vigilance]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Flying, vigilance]]></LOCALISED_TEXT>
<INTRINSIC characteristic="CHARACTERISTIC_FLYING" />
<INTRINSIC characteristic="CHARACTERISTIC_VIGILANCE" />
</STATIC_ABILITY>
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Choose a creature card at random from target opponent’s graveyard. Put that card onto the battlefield under your control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T} : Choisissez une carte de créature au hasard dans le cimetière d’un adversaire ciblé. Mettez cette carte sur le champ de bataille sous votre contrôle.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: Elige una carta de criatura al azar del cementerio del oponente objetivo. Pon esa carta en el campo de batalla bajo tu control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Bestimme zufällig eine Kreaturenkarte aus dem Friedhof eines Gegners deiner Wahl. Bringe diese Karte unter deiner Kontrolle ins Spiel.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Scegli una carta creatura a caso dal cimitero di un avversario bersaglio. Mettila sul campo di battaglia sotto il tuo controllo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:対戦相手1人を対象とする。そのプレイヤーの墓地にあるクリーチャー・カードを無作為に1枚選ぶ。そのカードを、あなたのコントロール下で戦場に出す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: Choose a creature card at random from target opponent’s graveyard. Put that card onto the battlefield under your control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: Choose a creature card at random from target opponent’s graveyard. Put that card onto the battlefield under your control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Choose a creature card at random from target opponent’s graveyard. Put that card onto the battlefield under your control.]]></LOCALISED_TEXT>
<COST type="TapSelf" />
<RESOLUTION_TIME_ACTION>
local player = EffectController()
local numCards = player:Graveyard_Count()
if numCards > 0 then
local index = math.random(0, numCards-1)
local card = player:Graveyard_GetNth(index)
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE ) then
card:PutOntoBattlefield( EffectController() )
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
If i would code it i thought something like this :
- Tariel,Reckoner of Souls (Tested) | Open
- Code: Select all
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flying, vigilance]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vol, vigilance]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Vuela, vigilancia.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fliegend, Wachsamkeit]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Volare, cautela]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[飛行、警戒]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Flying, vigilance]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Flying, vigilance]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Flying, vigilance]]></LOCALISED_TEXT>
<INTRINSIC characteristic="CHARACTERISTIC_FLYING" />
<INTRINSIC characteristic="CHARACTERISTIC_VIGILANCE" />
</STATIC_ABILITY>
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Choose a creature card at random from target opponent’s graveyard. Put that card onto the battlefield under your control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T} : Choisissez une carte de créature au hasard dans le cimetière d’un adversaire ciblé. Mettez cette carte sur le champ de bataille sous votre contrôle.]]
></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: Elige una carta de criatura al azar del cementerio del oponente objetivo. Pon esa carta en el campo de batalla bajo tu control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Bestimme zufällig eine Kreaturenkarte aus dem Friedhof eines Gegners deiner Wahl. Bringe diese Karte unter deiner Kontrolle ins Spiel.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Scegli una carta creatura a caso dal cimitero di un avversario bersaglio. Mettila sul campo di battaglia sotto il tuo controllo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:対戦相手1人を対象とする。そのプレイヤーの墓地にあるクリーチャー・カードを無作為に1枚選ぶ。そのカードを、あなたのコントロール下で戦場に出す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: Choose a creature card at random from target opponent’s graveyard. Put that card onto the battlefield under your control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: Choose a creature card at random from target opponent’s graveyard. Put that card onto the battlefield under your control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Choose a creature card at random from target opponent’s graveyard. Put that card onto the battlefield under your control.]]></LOCALISED_TEXT>
<COST type="TapSelf" />
<TARGET tag="CARD_QUERY_CHOOSE_PLAYER" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:SetFilterType(FILTER_TYPE_PLAYERS)
filter:Add( FE_TEAM, OP_NOT, EffectController():GetTeam() )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local oTPlayer = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if oTPlayer ~= nil then
local filter = ClearFilter()
filter:SetZone( ZONE_GRAVEYARD, oTPlayer)
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:EvaluateObjects()
local oCard = filter:GetRandomEvaluatedObject()
if oCard ~= nil then
oCard:PutOntoBattlefield( EffectController() )
end
end
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>

Last edited by NeoAnderson on 03 Dec 2013, 14:40, edited 1 time in total.
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Formal Request Thread
by thefiremind » 03 Dec 2013, 14:33
Tariel is both in my mod (guaranteed to work) and here (not guaranteed, I haven't checked the code myself).
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
Re: Formal Request Thread
by drleg3nd » 03 Dec 2013, 20:33
thx for the help guys on Tariel and Utopia Sprawl..here is my 2nd try for Utopia, hopefully im on right track.RiiakShiNal wrote:For these abilities they will only work with manual mana as otherwise there is no way to tell when something is tapped for mana. The abilities are going to be variants on how I coded Mana Flare as they will be TRIGGERED_ABILITYs with value="BECAME_TAPPED_FOR_MANA", the difference is in what it will produce for Verdant Haven you can choose any color (so you can look at cards like Birds of Paradise and Abundant Growth) for Utopia Sprawl you only need to produce the colour that was chosen when entering the battlefield so that makes that ability slightly easier.drleg3nd wrote:hey guys can someone help with this card last ability and chk out the codes i inputted to see if everything chks out.thxi was looking for Verdant Haven to copy last ability but either it wasnt made or it's not on portable HDD
- Utopia Sprawl | Open
- Code: Select all
<SPELL_ABILITY attach_definition="0">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchant Forest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanter : forêt]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Encantar bosque.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Waldverzauberung]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Incanta Foresta]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャント(森)]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchant Forest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Зачаровать Лес]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Encantar Floresta]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_FOREST_TO_ENCHANT" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_SUBTYPE, OP_IS, LAND_TYPE_FOREST )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if (target ~= nil and EffectSource() ~= nil) then
EffectSource():Attach( target )
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY replacement_query="1" linked_ability_group="1" active_zone="ZONE_TRANSITION">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Utopia Sprawl enters the battlefield, choose a color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Au moment où l’Étendue de l’utopie arrive en jeu, choisissez une couleur.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[En cuanto la Expansión utópica entre en juego, elige un color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sowie die Utopia-Ausbreitung ins Spiel kommt, bestimme eine Farbe.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mentre la Propagazione dell’Utopia entra nel campo di battaglia, scegli un colore.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[楽園の拡散が場に出るに際し、色を1色選ぶ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As Utopia Sprawl enters the battlefield, choose a color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда Утопический рост вступает в игру, выберите цвет.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conforme Propagação da Utopia entra em jogo, escolha uma cor.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
<RESOLUTION_TIME_ACTION>
EffectController():ChooseColour( "CARD_QUERY_CHOOSE_COLOUR", true )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
LinkedDC():Set_Int( 0, GetChosenColour() )
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que la forêt enchantée est engagée pour du mana, son contrôleur ajoute un mana de la couleur choisie à sa réserve.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que el bosque encantado se gire para obtener maná, su controlador agrega un maná del color elegido a su reserva de maná.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn der verzauberte Wald für Mana getappt wird, erhöht sein Beherrscher seinen Manavorrat um ein zusätzliches Mana der bestimmten Farbe.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta la Foresta incantata è TAPpata per attingere mana, il suo controllore aggiunge un mana del colore scelto alla sua riserva di mana.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャントされている森がマナを引き出す目的でタップされるたび、それのコントローラーは選ばれた色のマナ1点を自分のマナ・プールに加える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда зачарованный Лес поворачивается для получения маны, контролирующий его игрок добавляет одну ману выбранного цвета в свой запас маны.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que a floresta encantada é virada para gerar mana, seu controlador adiciona um mana da cor escolhida à sua própria reserva de mana.]]></LOCALISED_TEXT>
</TRIGGERED_ABILITY>
</CARD_V2>
You should note though that you will have problems with the abilities if you enchant a basic land or enchant a land that does not use my manual mana functions because the required triggers will only function with my manual mana functions.
.
- Utopia Sprawl | Open
- Code: Select all
<SPELL_ABILITY attach_definition="0">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchant Forest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanter : forêt]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Encantar bosque.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Waldverzauberung]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Incanta Foresta]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャント(森)]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchant Forest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Зачаровать Лес]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Encantar Floresta]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_FOREST_TO_ENCHANT" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_SUBTYPE, OP_IS, LAND_TYPE_FOREST )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if (target ~= nil and EffectSource() ~= nil) then
EffectSource():Attach( target )
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY replacement_query="1" linked_ability_group="1" active_zone="ZONE_TRANSITION">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Utopia Sprawl enters the battlefield, choose a color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Au moment où l’Étendue de l’utopie arrive en jeu, choisissez une couleur.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[En cuanto la Expansión utópica entre en juego, elige un color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sowie die Utopia-Ausbreitung ins Spiel kommt, bestimme eine Farbe.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mentre la Propagazione dell’Utopia entra nel campo di battaglia, scegli un colore.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[楽園の拡散が場に出るに際し、色を1色選ぶ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As Utopia Sprawl enters the battlefield, choose a color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда Утопический рост вступает в игру, выберите цвет.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conforme Propagação da Utopia entra em jogo, escolha uma cor.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
<PLAY_TIME_ACTION>
RSN_MarkManaAbilityStart()
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
-- Need to choose a colour first.
EffectController():ChooseColour( "CARD_QUERY_CHOOSE_COLOUR", true )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
-- Get the chosen colour.
local nColour = GetChosenColour()
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que la forêt enchantée est engagée pour du mana, son contrôleur ajoute un mana de la couleur choisie à sa réserve.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que el bosque encantado se gire para obtener maná, su controlador agrega un maná del color elegido a su reserva de maná.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn der verzauberte Wald für Mana getappt wird, erhöht sein Beherrscher seinen Manavorrat um ein zusätzliches Mana der bestimmten Farbe.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta la Foresta incantata è TAPpata per attingere mana, il suo controllore aggiunge un mana del colore scelto alla sua riserva di mana.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャントされている森がマナを引き出す目的でタップされるたび、それのコントローラーは選ばれた色のマナ1点を自分のマナ・プールに加える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда зачарованный Лес поворачивается для получения маны, контролирующий его игрок добавляет одну ману выбранного цвета в свой запас маны.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que a floresta encantada é virada para gerar mana, seu controlador adiciona um mana da cor escolhida à sua própria reserva de mana.]]></LOCALISED_TEXT>
<TRIGGER value="BECAME_TAPPED_FOR_MANA">
local oCard = TriggerObject()
if (oCard ~= nil) then
if (oCard:GetCardType():Test( CARD_TYPE_LAND )) then
if (RSN_UsedManaAbility( oCard )) then
return true
end
end
end
return false
</TRIGGERED_ABILITY>
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_B" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_C" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_G" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_R" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_U" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_W" />
</CARD_V2>
Re: Formal Request Thread
by NeoAnderson » 03 Dec 2013, 22:26
Hi guys,
I have some questions, hope someone could help me.
I am working on a new card :
Elysian Fields
Type : Enchantment
Effect : At the beginning of your upkeep, if an creature is exiled in the Elysian Fields put a Elysium counter on the Elysian Fields.
: exile a non-token creature in the Elysian Fields. You can use this ability once per turn and can be only one creature at a time exiled in the Elysian Fields.
Second Ability :
: remove all Elysium counters, from Elysian Fields, return to the battlefield the exiled creature with power and toughness X/X, where X is the number of counters removed added to the power and toughness at the time when it was exiled. You can use this ability once per turn and only if there is at least one Elysium counter on the Elysian Fields.
My questions :
1. First issues is about AVAILABILITY block, i know i cannot retrieve LinkedDC values from these blocks, i would know if someone have a solution to work around the problem.
2. Is possible to retrieve any information about the card that is NailOnTo another one? I mean after i have used nailonto on a card there is an inverse function to know if a card is nail on to another one??
3. To implement this card i have used a TRIGGER value="ACTIVATED_ABILITY_PLAYED" but it doesn't trigger so i had to force it with FireTrigger, now it works but i would understand why this trigger is not automatically working ?
4. As i coded the card the values permanently change, until the card changes zone. If i would keep these values changed also in other zones? For Example : a 3/3 creature is powered up by Elysian Fields and now it is 5/5, a spell make it to return in my hand , as it is coded it returns to a 3/3 status, if I would keep the powered status, which will be the better solution?
I already tried with 2 delayed triggers, granted by Elysian Fields when the card is powered up, but i had some problems, one of this issues was that the card has a conflict if is exiled again under Elysian fields, and the second power up, is overrided by the delayed dc.
I have some questions, hope someone could help me.
I am working on a new card :
Elysian Fields
Type : Enchantment
Effect : At the beginning of your upkeep, if an creature is exiled in the Elysian Fields put a Elysium counter on the Elysian Fields.
- Elysian Fields | Open
- Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="6">
<FILENAME text="ELYSIAN_FIELDS_W_7272130" />
<CARDNAME text="ELYSIAN_FIELDS_W" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Elysian Fields]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Défenses naturelles]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Defensa Naturales]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Natürliche Abwehr]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Campi Elisi]]></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[Defesa Natural]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="7272130" />
<ARTID value="7227130" />
<ARTIST name="Applibot© Legend of Cryptids" />
<CASTING_COST cost="{W}{W}{W}" />
<SUPERTYPE metaname="Legendary" />
<TYPE metaname="Tribal" />
<TYPE metaname="Enchantment" />
<SUB_TYPE metaname="Divinity" />
<EXPANSION value="DPI" />
<RARITY metaname="R" />
<TRIGGERED_ABILITY linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of your upkeep, if a creature is exiled in the Elysian Fields put an Elysium counter on the Elysian Fields.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Au début de votre entretien, mettez un marqueur de la prospérité, sur le sceau de l'abondance.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Al comienzo de tu mantenimiento, pon un marcador de la prosperidad, en el sello de la abundancia.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Zu Beginn Ihres Unterhalt, legte einen Wohlstand Marker, auf dem Siegel des Überflusses.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[All'inizio del tuo mantenimento, se una creatura è esiliata nei Campi Elisi metti un segnalino Elysium, sui Campi Elisi.]]></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[No início de sua manutenção, coloque um marcador de prosperidade, no selo de abundância.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[在你的維持開始,把一個繁榮標記上富足的印章。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[在你的維持開始,把一個繁榮標記上富足的印章。]]></LOCALISED_TEXT>
<COUNTER_REGISTRATION name="Elysium" proliferate="11" />
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
return MTG():GetStep() == STEP_UPKEEP and LinkedDC():Int_Get(0) == 2
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():AddCounters( MTG():GetCountersType("Elysium"), 1)
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY linked_ability_group="1" forced_skip="1">
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
LinkedDC():Int_Set(0,1)
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<ACTIVATED_ABILITY linked_ability_group="1" >
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{0}: Exile a non-token creature in the Elysian Fields. You can use this ability once per turn and can be only one creature at a time exiled in the Elysian Fields.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{0}: Exiler une créature non-jeton dans les Champs-Elysées. Vous pouvez utiliser cette capacité une fois par tour et peut être seulement une créature à la fois en exil dans les Champs-Elysées.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{0}: Exilio una criatura que no sea ficha en los Campos Elíseos. Usted puede utilizar esta habilidad una vez por turno y puede haber sólo una criatura en un momento en el exilio en los Campos Elíseos.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{0}: Verbannung ein nicht-Token Geschöpf in der Elysian Fields. Sie können diese Fähigkeit einmal pro Runde und kann nur eine Kreatur in einer Zeit, in der Elysian Fields verbannt sein.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{0}: Esilia una creatura non pedina nei Campi Elisi. Puoi usare quesata abilità una volta per turno e può esserci solo una creatura per volta esiliata nei Campi Elisi.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{0}:エリュシオンの野に亡命非トークン生き物。あなたは1ターンに1度、この機能を使用することができますし、エリュシオンのフィールドに追放され、一度に1生き物です。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{0}: 엘리 시안 필즈에서 망명 아닌 토큰 생물. 당신은 1 턴에 1 번이 기능을 사용할 수 있으며, 엘리 시안 필즈에서 망명 한 번에 하나의 생물이 될 수 있습니다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{0}: Изгнание не-маркер существо на Елисейских полях. Вы можете использовать эту способность один раз за ход и может быть только одно существо в то время в изгнании на Елисейских полях.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{0}: Exile uma criatura não-símbolo nos Campos Elísios. Você pode usar esta habilidade uma vez por turno e pode ser apenas uma criatura de cada vez exilado nos Campos Elísios.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[{0}: 流亡的非標記的生物在極樂世界。您可以使用此功能每一次轉彎,可在放逐中的極樂世界一時間只有一個生物。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[{0}: 流亡的非標記的生物在極樂世界。您可以使用此功能每一次轉彎,可在放逐中的極樂世界一時間只有一個生物。]]></LOCALISED_TEXT>
<COST mana_cost="{0}" type="Mana" />
<AVAILABILITY>
local filter = ClearFilter()
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_IS_TOKEN, false )
local count = filter:Count()
if count > 0 then
return true
else
return false
end
</AVAILABILITY>
<AVAILABILITY per_turn_limit="1" />
<RESOLUTION_TIME_ACTION>
local player = EffectController()
if player ~= nil and LinkedDC():Int_Get(0) == 1 then
local filter = ClearFilter()
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_IS_TOKEN, false )
local count = filter:Count()
if count > 0 then
player:SetItemCount( 1 )
for i = 0,(1-1) do
player:SetItemPrompt (i, "CARD_QUERY_CHOOSE_CREATURE_TO_EXILE" )
end
end
player:ChooseItems( EffectDC():Make_Targets(0) )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local toughness = target:GetCurrentToughness()
local power = target:GetCurrentPower()
LinkedDC():Int_Set(5,power)
LinkedDC():Int_Set(6,toughness)
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
EffectDC():Get_Targets(0):Protect_CardPtr(0)
target:Exile()
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local delayDC = EffectDC():Make_Chest(1)
delayDC:Set_CardPtr(0, target)
delayDC:Protect_CardPtr(0)
MTG():CreateDelayedTrigger(1, delayDC)
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
local source = EffectSource()
if target ~= nil and source ~= nil then
target:NailOnto(source)
LinkedDC():Int_Set(0,2)
end
</RESOLUTION_TIME_ACTION>
<AI_AVAILABILITY window_step="upkeep" type="window" />
<AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="begin_combat" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="declare_attackers" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="declare_blockers" type="window" />
<AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="end_of_turn" type="window" />
<AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
<AI_AVAILABILITY type="in_response" response_source="1" response_target="1" />
<AI_AVAILABILITY type="in_response" response_source="1" />
<AI_AVAILABILITY type="in_response" response_target="1" />
<AUTO_SKIP>
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
return false
else
return true
end
</AUTO_SKIP>
</ACTIVATED_ABILITY>
<ACTIVATED_ABILITY linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{0}: Remove all Elysium counters, from Elysian Fields, return to the battlefield the exiled creature with power and toughness X/X, where X is the number of counters removed added to the power and toughness at the time when it was exiled. You can use this ability once per turn and only if there is at least one Elysium counter on the Elysian Fields.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{0}: Retirez tous les compteurs Elysium, de Elysian Fields, retourner au champ de bataille de la créature exilée avec force et l'endurance X / X, où X est le nombre de compteurs retirés ajoutés à la force et l'endurance à l'époque où il a été exilé. Vous pouvez utiliser cette capacité une fois par tour et seulement si il est au moins un compteur Elysée sur les Champs-Elysées.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{0}: Remueve todos los contadores Elysium, de los Campos Elíseos, volver al campo de batalla a la criatura exiliada con fuerza como la resistencia X / X, donde X es el número de contadores retirados añadidos a la fuerza y la resistencia en el momento en que fue exiliado. Usted puede utilizar esta habilidad una vez por turno y sólo si hay al menos un contador Elysium en los Campos Elíseos.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{0}: Entfernen Sie alle Elysium Zähler, von lysischen Felder, zurück auf das Schlachtfeld im Exil lebenden Kreatur mit Stärke und Widerstandskraft X / X, wobei X die Anzahl der Zähler entfernt, um die Stärke und Widerstandskraft zu der Zeit hinzugefügt, wenn sie ins Exil geschickt wurde. Sie können diese Fähigkeit nur einmal pro Zug und nur, wenn es mindestens ein Elysium Zähler auf den Elysischen Felder aus.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{0} : Rimuovi tutti i segnalini Elysium dai Campi Elisi, rimetti sul campo di battaglia la creatura esiliata con forza e costituzione X/X, dove X è il numero di segnalini rimossi sommati alla forza e alla costituzione della creatura al momento in cui è stata esiliata. Puoi usare questa abilità una volta per turno e solo se c'è almeno un segnalino Elysium sui Campi Elisi. ]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{0}: 、エリシアン分野から、すべてのエリュシオンカウンターを取り除く戦場にXは、それが追放された時点でのパワーとタフネスを追加、削除カウンタの数であり、パワーとタフネスX / Xと追放されたクリーチャーを返す。 エリシアンフィールド上に少なくとも1エリュシオンカウンターがあるターンとする場合にのみ、一度この機能を使用することができます。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{0}: , 엘리 시안 필드에서, 모든 엘리시움 카운터를 제거 전장에 X가이 추방 된 시간의 공격력과 방어력을 추가, 제거 카운터의 수 공격력과 방어력 X / X와 추방 생물을 반환합니다. 엘리 시안 필드에 적어도 하나의 엘리시움 카운터가 회전 당 경우에만 다시이 기능을 사용할 수 있습니다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{0}: Удалите все счетчики Elysium, от Елисейских полей, вернуться на поле боя в изгнании существо с силой и прочностью X / X, где Х число счетчиков удаленных, добавленных в силы и выносливости во время, когда он был сослан. Вы можете использовать эту способность один раз за ход и только тогда, когда по крайней мере один Элизиум счетчик на Елисейские поля.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{0}: Remova todos os contadores de Elysium, de Campos Elíseos, retornar ao campo de batalha a criatura exilado com o poder ea resistência X / X, onde X é o número de balcões removidos adicionados ao poder ea resistência no momento em que ele foi exilado. Você pode usar esta habilidade uma vez por turno e somente se houver pelo menos um contador de Elysium nos Campos Elíseos.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[{0}: 卸下所有極樂世界計數器,從極樂世界,重返戰場流亡的生物力量與防禦力X / X,其中X是去掉專櫃添加到力量與防禦力的時候,當它被流放的數量。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[{0}: 卸下所有極樂世界計數器,從極樂世界,重返戰場流亡的生物力量與防禦力X / X,其中X是去掉專櫃添加到力量與防禦力的時候,當它被流放的數量。]]></LOCALISED_TEXT>
<COUNTER_REGISTRATION name="Elysium" proliferate="11" />
<COST mana_cost="{0}" type="Mana" />
<AVAILABILITY>
local count = Object():CountCounters(MTG():GetCountersType("Elysium"))
if count > 0 then
return true
else
return false
end
</AVAILABILITY>
<AVAILABILITY per_turn_limit="1" />
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil and LinkedDC():Int_Get(0) == 2 then
local counters = EffectSource():CountCounters(MTG():GetCountersType("Elysium"))
if counters > 0 then
LinkedDC():Int_Set(1,counters)
EffectSource():RemoveCounters( MTG():GetCountersType("Elysium"), counters)
end
LinkedDC():Int_Set(0,0)
MTG():FireTrigger( TRIGGER_ACTIVATED_ABILITY_PLAYED, EffectSource() )
end
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
<TRIGGERED_ABILITY resource_id="1" linked_ability_group="1" forced_skip="1" >
<TRIGGER value="ACTIVATED_ABILITY_PLAYED">
return LinkedDC():Int_Get(0) == 0
</TRIGGER>
<CLEANUP fire_once="1" />
<PLAY_TIME_ACTION>
local target = EffectDC():Get_CardPtr(0)
if target ~= nil then
target:PutOntoBattlefield()
local power = LinkedDC():Int_Get(5)
local toughness = LinkedDC():Int_Get(6)
local Bonus = LinkedDC():Int_Get(1)
local NewPower = power + Bonus
local NewToughness = toughness + Bonus
EffectDC():Set_Int(5,NewPower)
EffectDC():Set_Int(6,NewToughness)
end
LinkedDC():Int_Set(0,1)
LinkedDC():Int_Set(1,0)
</PLAY_TIME_ACTION>
<CONTINUOUS_ACTION layer="7B">
local target = EffectDC():Get_CardPtr(0)
local oToughness= EffectDC():Get_Int(6)
local oPower= EffectDC():Get_Int(5)
if target ~= nil then
local characteristics = target:GetCurrentCharacteristics()
characteristics:Power_Set( oPower )
characteristics:Toughness_Set( oToughness )
end
</CONTINUOUS_ACTION>
<DURATION>
return EffectController() == nil
</DURATION>
</TRIGGERED_ABILITY>
</CARD_V2>

Second Ability :

My questions :
1. First issues is about AVAILABILITY block, i know i cannot retrieve LinkedDC values from these blocks, i would know if someone have a solution to work around the problem.
2. Is possible to retrieve any information about the card that is NailOnTo another one? I mean after i have used nailonto on a card there is an inverse function to know if a card is nail on to another one??
3. To implement this card i have used a TRIGGER value="ACTIVATED_ABILITY_PLAYED" but it doesn't trigger so i had to force it with FireTrigger, now it works but i would understand why this trigger is not automatically working ?
4. As i coded the card the values permanently change, until the card changes zone. If i would keep these values changed also in other zones? For Example : a 3/3 creature is powered up by Elysian Fields and now it is 5/5, a spell make it to return in my hand , as it is coded it returns to a 3/3 status, if I would keep the powered status, which will be the better solution?
I already tried with 2 delayed triggers, granted by Elysian Fields when the card is powered up, but i had some problems, one of this issues was that the card has a conflict if is exiled again under Elysian fields, and the second power up, is overrided by the delayed dc.
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Formal Request Thread
by RiiakShiNal » 04 Dec 2013, 01:26
This will not work and is not correct. The second ability (choosing a color as it enters the battlefield) is not a mana ability so it should not have RSN_MarkManaAbilityStart() (you can simply remove that entire PLAY_TIME_ACTION block as it should not be there).drleg3nd wrote:thx for the help guys on Tariel and Utopia Sprawl..here is my 2nd try for Utopia, hopefully im on right track.
- Utopia Sprawl | Open
- Code: Select all
<SPELL_ABILITY attach_definition="0">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchant Forest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanter : forêt]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Encantar bosque.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Waldverzauberung]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Incanta Foresta]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャント(森)]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchant Forest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Зачаровать Лес]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Encantar Floresta]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_FOREST_TO_ENCHANT" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_SUBTYPE, OP_IS, LAND_TYPE_FOREST )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if (target ~= nil and EffectSource() ~= nil) then
EffectSource():Attach( target )
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY replacement_query="1" linked_ability_group="1" active_zone="ZONE_TRANSITION">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Utopia Sprawl enters the battlefield, choose a color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Au moment où l’Étendue de l’utopie arrive en jeu, choisissez une couleur.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[En cuanto la Expansión utópica entre en juego, elige un color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sowie die Utopia-Ausbreitung ins Spiel kommt, bestimme eine Farbe.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mentre la Propagazione dell’Utopia entra nel campo di battaglia, scegli un colore.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[楽園の拡散が場に出るに際し、色を1色選ぶ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As Utopia Sprawl enters the battlefield, choose a color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда Утопический рост вступает в игру, выберите цвет.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conforme Propagação da Utopia entra em jogo, escolha uma cor.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
<PLAY_TIME_ACTION>
RSN_MarkManaAbilityStart()
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
-- Need to choose a colour first.
EffectController():ChooseColour( "CARD_QUERY_CHOOSE_COLOUR", true )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
-- Get the chosen colour.
local nColour = GetChosenColour()
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que la forêt enchantée est engagée pour du mana, son contrôleur ajoute un mana de la couleur choisie à sa réserve.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que el bosque encantado se gire para obtener maná, su controlador agrega un maná del color elegido a su reserva de maná.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn der verzauberte Wald für Mana getappt wird, erhöht sein Beherrscher seinen Manavorrat um ein zusätzliches Mana der bestimmten Farbe.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta la Foresta incantata è TAPpata per attingere mana, il suo controllore aggiunge un mana del colore scelto alla sua riserva di mana.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャントされている森がマナを引き出す目的でタップされるたび、それのコントローラーは選ばれた色のマナ1点を自分のマナ・プールに加える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда зачарованный Лес поворачивается для получения маны, контролирующий его игрок добавляет одну ману выбранного цвета в свой запас маны.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que a floresta encantada é virada para gerar mana, seu controlador adiciona um mana da cor escolhida à sua própria reserva de mana.]]></LOCALISED_TEXT>
<TRIGGER value="BECAME_TAPPED_FOR_MANA">
local oCard = TriggerObject()
if (oCard ~= nil) then
if (oCard:GetCardType():Test( CARD_TYPE_LAND )) then
if (RSN_UsedManaAbility( oCard )) then
return true
end
end
end
return false
</TRIGGERED_ABILITY>
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_B" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_C" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_G" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_R" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_U" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_W" />
</CARD_V2>
The TRIGGER in the 3rd ability is incomplete (invalid XML syntax due to not closing the tag) and it is wrong; it should test for EffectSource():GetParent() is not nil and that it equals TriggerObject(). Also since you don't have a RESOLUTION_TIME_ACTION block to produce the chosen colour of mana (using RSN_ProduceNoTrigger()) it can't produce anything. Since you have the player choose a colour it will never be able to produce colourless mana so the TOKEN_REGISTRATION for RSN_TOKEN_MANA_C is extraneous.
An easy way would be to use my ObjectDC functions, though you could roll your own solution using the DuelDataChest() for keeping track of whether a creature is exiled or not.NeoAnderson wrote:My questions :
1. First issues is about AVAILABILITY block, i know i cannot retrieve LinkedDC values from these blocks, i would know if someone have a solution to work around the problem.
I do not know of any such function.NeoAnderson wrote:2. Is possible to retrieve any information about the card that is NailOnTo another one? I mean after i have used nailonto on a card there is an inverse function to know if a card is nail on to another one??
It does fire, but you haven't set the LinkedDC() variable for the delayed trigger to fire at that point, you probably want ABILITY_RESOLVED which occurs after the ability resolves instead of before.NeoAnderson wrote:3. To implement this card i have used a TRIGGER value="ACTIVATED_ABILITY_PLAYED" but it doesn't trigger so i had to force it with FireTrigger, now it works but i would understand why this trigger is not automatically working ?
It should always return to the printed P/T when not on the battlefield as according to MtG rules if a creature leaves the battlefield then is brought back to the battlefield it should be treated as a new instance of the creature instead of as the same creature.NeoAnderson wrote:4. As i coded the card the values permanently change, until the card changes zone. If i would keep these values changed also in other zones? For Example : a 3/3 creature is powered up by Elysian Fields and now it is 5/5, a spell make it to return in my hand , as it is coded it returns to a 3/3 status, if I would keep the powered status, which will be the better solution?
I already tried with 2 delayed triggers, granted by Elysian Fields when the card is powered up, but i had some problems, one of this issues was that the card has a conflict if is exiled again under Elysian fields, and the second power up, is overrided by the delayed dc.
So this is something that you really shouldn't do (on top of being very difficult).
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Formal Request Thread
by drleg3nd » 04 Dec 2013, 02:13
ok 3rd attempt on Utopia Sprawl
- | Open
- Code: Select all
<SPELL_ABILITY attach_definition="0">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchant Forest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanter : forêt]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Encantar bosque.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Waldverzauberung]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Incanta Foresta]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャント(森)]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchant Forest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Зачаровать Лес]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Encantar Floresta]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_FOREST_TO_ENCHANT" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_SUBTYPE, OP_IS, LAND_TYPE_FOREST )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if (target ~= nil and EffectSource() ~= nil) then
EffectSource():Attach( target )
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY replacement_query="1" linked_ability_group="1" active_zone="ZONE_TRANSITION">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Utopia Sprawl enters the battlefield, choose a color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Au moment où l’Étendue de l’utopie arrive en jeu, choisissez une couleur.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[En cuanto la Expansión utópica entre en juego, elige un color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sowie die Utopia-Ausbreitung ins Spiel kommt, bestimme eine Farbe.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mentre la Propagazione dell’Utopia entra nel campo di battaglia, scegli un colore.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[楽園の拡散が場に出るに際し、色を1色選ぶ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As Utopia Sprawl enters the battlefield, choose a color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда Утопический рост вступает в игру, выберите цвет.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conforme Propagação da Utopia entra em jogo, escolha uma cor.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
<RESOLUTION_TIME_ACTION>
-- Need to choose a colour first.
EffectController():ChooseColour( "CARD_QUERY_CHOOSE_COLOUR", true )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
-- Get the chosen colour.
local nColour = GetChosenColour()
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que la forêt enchantée est engagée pour du mana, son contrôleur ajoute un mana de la couleur choisie à sa réserve.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que el bosque encantado se gire para obtener maná, su controlador agrega un maná del color elegido a su reserva de maná.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn der verzauberte Wald für Mana getappt wird, erhöht sein Beherrscher seinen Manavorrat um ein zusätzliches Mana der bestimmten Farbe.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta la Foresta incantata è TAPpata per attingere mana, il suo controllore aggiunge un mana del colore scelto alla sua riserva di mana.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャントされている森がマナを引き出す目的でタップされるたび、それのコントローラーは選ばれた色のマナ1点を自分のマナ・プールに加える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда зачарованный Лес поворачивается для получения маны, контролирующий его игрок добавляет одну ману выбранного цвета в свой запас маны.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que a floresta encantada é virada para gerar mana, seu controlador adiciona um mana da cor escolhida à sua própria reserva de mana.]]></LOCALISED_TEXT>
<TRIGGER value="BECAME_TAPPED_FOR_MANA">
EffectSource():GetParent() is not nil = TriggerObject()
if (oCard ~= nil) then
if (oCard:GetCardType():Test( CARD_TYPE_LAND )) then
if (RSN_UsedManaAbility( oCard )) then
return true
end
end
end
return false
<RESOLUTION_TIME_ACTION>
EffectDC():Int_Set( 1, -1 )
local oCard = TriggerObjectLKI()
if (oCard ~= nil) then
local nCount = RSN_CountProducedColours( oCard )
if (nCount == 0) then
-- Do nothing because no mana was produced.
elseif (nCount == 1) then
EffectDC():Int_Set( 1, RSN_GetProducedColourByIndex( oCard, 0 ) )
else
local oPlayer = oCard:GetPlayer()
if (oPlayer ~= nil) then
oPlayer:BeginNewMultipleChoice()
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_C", (RSN_CheckProducedColour( oCard, COLOUR_COLOURLESS ) > 0) )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_W", (RSN_CheckProducedColour( oCard, COLOUR_WHITE ) > 0) )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_U", (RSN_CheckProducedColour( oCard, COLOUR_BLUE ) > 0) )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_B", (RSN_CheckProducedColour( oCard, COLOUR_BLACK ) > 0) )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_R", (RSN_CheckProducedColour( oCard, COLOUR_RED ) > 0) )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_G", (RSN_CheckProducedColour( oCard, COLOUR_GREEN ) > 0) )
oPlayer:AskMultipleChoiceQuestion( "MODE_CHOOSE_ONE", oCard )
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local oCard = TriggerObjectLKI()
if (oCard ~= nil) then
local oPlayer = oCard:GetPlayer()
if (oPlayer ~= nil) then
local nCount = RSN_CountProducedColours( oCard )
if (nCount > 1) then
EffectDC():Int_Set( 1, oPlayer:GetMultipleChoiceResult() )
end
if (nCount > 0) then
local nColour = EffectDC():Int_Get( 1 )
if (nColour == COLOUR_COLOURLESS) then
RSN_ProduceForPlayerNoTrigger( "{1}", 1, oPlayer )
elseif (nColour == COLOUR_BLACK) then
RSN_ProduceForPlayerNoTrigger( "{B}", 1, oPlayer )
elseif (nColour == COLOUR_BLUE) then
RSN_ProduceForPlayerNoTrigger( "{U}", 1, oPlayer )
elseif (nColour == COLOUR_GREEN) then
RSN_ProduceForPlayerNoTrigger( "{G}", 1, oPlayer )
elseif (nColour == COLOUR_RED) then
RSN_ProduceForPlayerNoTrigger( "{R}", 1, oPlayer )
elseif (nColour == COLOUR_WHITE) then
RSN_ProduceForPlayerNoTrigger( "{W}", 1, oPlayer )
end
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
RSN_EliminateExtraManaTokens()
</RESOLUTION_TIME_ACTION>
<AUTO_SKIP always="1" />
</TRIGGERED_ABILITY>
</CARD_V2>
Re: Formal Request Thread
by NeoAnderson » 04 Dec 2013, 02:23
Ok I think the time is come for me to better check your ObjectDC functions, i need to see some examples to understand how to implement it, i read something on your wiki page about it, if i remember you have implemented it using DuelDataChest function..RiiakShiNal wrote:An easy way would be to use my ObjectDC functions, though you could roll your own solution using the DuelDataChest() for keeping track of whether a creature is exiled or not.NeoAnderson wrote:My questions :
1. First issues is about AVAILABILITY block, i know i cannot retrieve LinkedDC values from these blocks, i would know if someone have a solution to work around the problem.
B. About DuelDataChest values i am worried to encounter problems, if more players play the same spell...so problably it need more code to check this occurrance.
OK thanks anyway was just an idea to set the Availability, i thought something like if there is a card nailonto EffectSource then return false...but i think i will work around with your ObjectDC function.RiiakShiNal wrote:I do not know of any such function.NeoAnderson wrote:2. Is possible to retrieve any information about the card that is NailOnTo another one? I mean after i have used nailonto on a card there is an inverse function to know if a card is nail on to another one??

OK thanks Riiak i tried to find something with this trigger but the forum search need some improvementsRiiakShiNal wrote:It does fire, but you haven't set the LinkedDC() variable for the delayed trigger to fire at that point, you probably want ABILITY_RESOLVED which occurs after the ability resolves instead of before.NeoAnderson wrote:3. To implement this card i have used a TRIGGER value="ACTIVATED_ABILITY_PLAYED" but it doesn't trigger so i had to force it with FireTrigger, now it works but i would understand why this trigger is not automatically working ?


I am sorry for these question but i am just trying to find something different to make with new cards, so sometimes my fantasy can override the MTG rulesRiiakShiNal wrote:It should always return to the printed P/T when not on the battlefield as according to MtG rules if a creature leaves the battlefield then is brought back to the battlefield it should be treated as a new instance of the creature instead of as the same creature.NeoAnderson wrote:4. As i coded the card the values permanently change, until the card changes zone. If i would keep these values changed also in other zones? For Example : a 3/3 creature is powered up by Elysian Fields and now it is 5/5, a spell make it to return in my hand , as it is coded it returns to a 3/3 status, if I would keep the powered status, which will be the better solution?
I already tried with 2 delayed triggers, granted by Elysian Fields when the card is powered up, but i had some problems, one of this issues was that the card has a conflict if is exiled again under Elysian fields, and the second power up, is overrided by the delayed dc.
So this is something that you really shouldn't do (on top of being very difficult).

EDIT :
Riiak i tried your RSN_ObjectDC function but i am not sure if i used it correctly, the main problem is I still have the same problem of LinkedDC. I revised some parts of the card code so now is just an hybrid version with LinkedDC and RSN_ObjectDC but the worst thing is that AVAILABILITY BLOCK still gives the same error: [lua] ?:0: attempt to index a nil value.
I have initialized the RSN_Object when the card comes into battlefield
- Code: Select all
<TRIGGERED_ABILITY linked_ability_group="1" forced_skip="1">
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
local oDC = RSN_GetObjectDC( EffectSource(), true )
oDC:Int_Set( 4857, 1 )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
When i read the value i use the follow syntax ( I have use false value because the Chest should be already created):
- Code: Select all
<AVAILABILITY>
local filter = ClearFilter()
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_IS_TOKEN, false )
local count = filter:Count()
if count > 0 then
local oDC = RSN_GetObjectDC( EffectSource(), false )
if oDC:Int_Get( 4857 ) == 1 then
return true
else
return false
end
else
return false
end
</AVAILABILITY>
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Formal Request Thread
by MC Brodie » 04 Dec 2013, 04:55
Would it work if you moved the code in the availability block to the prerequisite block in a generic cost that does nothing? I can only remember seeing "return true" in the prerequitsite block but who knows maybe it will work. Try something lke this:
- Code: Select all
<COST type="generic">
<PREREQUISITE>
local filter = ClearFilter()
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_IS_TOKEN, false )
local count = filter:Count()
if count > 0 then
return true
else
return false
end
</PREREQUISITE>
</COST>
-----------------------------------------------------------------------
Song of the Day: 46 and 2 (cover)
Song of the Day: 46 and 2 (cover)
Re: Formal Request Thread
by NeoAnderson » 04 Dec 2013, 05:39
Thanks you MC Brodie,MC Brodie wrote:Would it work if you moved the code in the availability block to the prerequisite block in a generic cost that does nothing? I can only remember seeing "return true" in the prerequitsite block but who knows maybe it will work. Try something lke this:
- Code: Select all
<COST type="generic">
<PREREQUISITE>
local filter = ClearFilter()
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_IS_TOKEN, false )
local count = filter:Count()
if count > 0 then
return true
else
return false
end
</PREREQUISITE>
</COST>
But the problem is not about the filter:Count() function it works also into AVAILABILITY block, i need to make work the reading of a Chest value like LinkedDC, or RSN_ObjectDC.
I tried this solution already with LinkedDC but it doesn't work also as PREREQUISITE.
Thanks anyway.
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Formal Request Thread
by RiiakShiNal » 04 Dec 2013, 14:33
Well, you didn't really fix the TRIGGER at all; it should be like this:drleg3nd wrote:ok 3rd attempt on Utopia SprawlI have to admit, these mana ability cards confuse me, it feels way over my head when I see all that zig zag of words.
- | Open
- Code: Select all
<SPELL_ABILITY attach_definition="0">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchant Forest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanter : forêt]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Encantar bosque.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Waldverzauberung]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Incanta Foresta]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャント(森)]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchant Forest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Зачаровать Лес]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Encantar Floresta]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_FOREST_TO_ENCHANT" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_SUBTYPE, OP_IS, LAND_TYPE_FOREST )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if (target ~= nil and EffectSource() ~= nil) then
EffectSource():Attach( target )
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY replacement_query="1" linked_ability_group="1" active_zone="ZONE_TRANSITION">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Utopia Sprawl enters the battlefield, choose a color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Au moment où l’Étendue de l’utopie arrive en jeu, choisissez une couleur.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[En cuanto la Expansión utópica entre en juego, elige un color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sowie die Utopia-Ausbreitung ins Spiel kommt, bestimme eine Farbe.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mentre la Propagazione dell’Utopia entra nel campo di battaglia, scegli un colore.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[楽園の拡散が場に出るに際し、色を1色選ぶ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As Utopia Sprawl enters the battlefield, choose a color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда Утопический рост вступает в игру, выберите цвет.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conforme Propagação da Utopia entra em jogo, escolha uma cor.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
<RESOLUTION_TIME_ACTION>
-- Need to choose a colour first.
EffectController():ChooseColour( "CARD_QUERY_CHOOSE_COLOUR", true )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
-- Get the chosen colour.
local nColour = GetChosenColour()
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que la forêt enchantée est engagée pour du mana, son contrôleur ajoute un mana de la couleur choisie à sa réserve.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que el bosque encantado se gire para obtener maná, su controlador agrega un maná del color elegido a su reserva de maná.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn der verzauberte Wald für Mana getappt wird, erhöht sein Beherrscher seinen Manavorrat um ein zusätzliches Mana der bestimmten Farbe.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta la Foresta incantata è TAPpata per attingere mana, il suo controllore aggiunge un mana del colore scelto alla sua riserva di mana.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャントされている森がマナを引き出す目的でタップされるたび、それのコントローラーは選ばれた色のマナ1点を自分のマナ・プールに加える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда зачарованный Лес поворачивается для получения маны, контролирующий его игрок добавляет одну ману выбранного цвета в свой запас маны.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que a floresta encantada é virada para gerar mana, seu controlador adiciona um mana da cor escolhida à sua própria reserva de mana.]]></LOCALISED_TEXT>
<TRIGGER value="BECAME_TAPPED_FOR_MANA">
EffectSource():GetParent() is not nil = TriggerObject()
if (oCard ~= nil) then
if (oCard:GetCardType():Test( CARD_TYPE_LAND )) then
if (RSN_UsedManaAbility( oCard )) then
return true
end
end
end
return false
<RESOLUTION_TIME_ACTION>
EffectDC():Int_Set( 1, -1 )
local oCard = TriggerObjectLKI()
if (oCard ~= nil) then
local nCount = RSN_CountProducedColours( oCard )
if (nCount == 0) then
-- Do nothing because no mana was produced.
elseif (nCount == 1) then
EffectDC():Int_Set( 1, RSN_GetProducedColourByIndex( oCard, 0 ) )
else
local oPlayer = oCard:GetPlayer()
if (oPlayer ~= nil) then
oPlayer:BeginNewMultipleChoice()
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_C", (RSN_CheckProducedColour( oCard, COLOUR_COLOURLESS ) > 0) )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_W", (RSN_CheckProducedColour( oCard, COLOUR_WHITE ) > 0) )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_U", (RSN_CheckProducedColour( oCard, COLOUR_BLUE ) > 0) )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_B", (RSN_CheckProducedColour( oCard, COLOUR_BLACK ) > 0) )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_R", (RSN_CheckProducedColour( oCard, COLOUR_RED ) > 0) )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_G", (RSN_CheckProducedColour( oCard, COLOUR_GREEN ) > 0) )
oPlayer:AskMultipleChoiceQuestion( "MODE_CHOOSE_ONE", oCard )
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local oCard = TriggerObjectLKI()
if (oCard ~= nil) then
local oPlayer = oCard:GetPlayer()
if (oPlayer ~= nil) then
local nCount = RSN_CountProducedColours( oCard )
if (nCount > 1) then
EffectDC():Int_Set( 1, oPlayer:GetMultipleChoiceResult() )
end
if (nCount > 0) then
local nColour = EffectDC():Int_Get( 1 )
if (nColour == COLOUR_COLOURLESS) then
RSN_ProduceForPlayerNoTrigger( "{1}", 1, oPlayer )
elseif (nColour == COLOUR_BLACK) then
RSN_ProduceForPlayerNoTrigger( "{B}", 1, oPlayer )
elseif (nColour == COLOUR_BLUE) then
RSN_ProduceForPlayerNoTrigger( "{U}", 1, oPlayer )
elseif (nColour == COLOUR_GREEN) then
RSN_ProduceForPlayerNoTrigger( "{G}", 1, oPlayer )
elseif (nColour == COLOUR_RED) then
RSN_ProduceForPlayerNoTrigger( "{R}", 1, oPlayer )
elseif (nColour == COLOUR_WHITE) then
RSN_ProduceForPlayerNoTrigger( "{W}", 1, oPlayer )
end
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
RSN_EliminateExtraManaTokens()
</RESOLUTION_TIME_ACTION>
<AUTO_SKIP always="1" />
</TRIGGERED_ABILITY>
</CARD_V2>
- Code: Select all
<TRIGGER value="BECAME_TAPPED_FOR_MANA">
return EffectSource():GetParent() ~= nil and EffectSource():GetParent() == TriggerObject()
</TRIGGER>
- Code: Select all
<RESOLUTION_TIME_ACTION>
-- Get the chosen colour.
LinkedDC():Int_Set(0, GetChosenColour())
</RESOLUTION_TIME_ACTION>
- Code: Select all
<RESOLUTION_TIME_ACTION>
local nColour = LinkedDC():Int_Get(0)
local oPlayer = EffectSourceLKI():GetParent() ~= nil and EffectSourceLKI():GetParent():GetController()
if (nColour == COLOUR_BLACK) then
RSN_ProduceForPlayerNoTrigger( "{B}", 1, oPlayer )
elseif (nColour == COLOUR_BLUE) then
RSN_ProduceForPlayerNoTrigger( "{U}", 1, oPlayer )
elseif (nColour == COLOUR_GREEN) then
RSN_ProduceForPlayerNoTrigger( "{G}", 1, oPlayer )
elseif (nColour == COLOUR_RED) then
RSN_ProduceForPlayerNoTrigger( "{R}", 1, oPlayer )
else
RSN_ProduceForPlayerNoTrigger( "{W}", 1, oPlayer )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
RSN_EliminateExtraManaTokens()
</RESOLUTION_TIME_ACTION>
I designed my ObjectDC functions to key off the instance of a card, thus if there are multiple copies in a deck (or multiple decks), a card is copied, or is re-cast from another zone that it will always have its own unique ObjectDC chest. So if you are using my ObjectDC functions you should not have to worry about such problems.NeoAnderson wrote:Ok I think the time is come for me to better check your ObjectDC functions, i need to see some examples to understand how to implement it, i read something on your wiki page about it, if i remember you have implemented it using DuelDataChest function..
B. About DuelDataChest values i am worried to encounter problems, if more players play the same spell...so problably it need more code to check this occurrance.
For a card to access another card's ObjectDC it has to have that object's instance to access it. For example if we wanted to access CardB's ObjectDC from CardA then CardA would have to access it like:
- Code: Select all
local oBCardDC = RSN_GetObjectDC( oCardB, false )
For any card to access its own ObjectDC it only has to call RSN_ObjectDC() as that will automatically use EffectSource() to link the ObjectDC.
Given that we can't get Effect objects in current DotP versions it should give you the correct TriggerObject(). As for how the trigger works it should fire just after an ability resolves (at which point your LinkedDC() value should be set). If you need a trigger that fires after an ability is played, but before it resolves (between PLAY_TIME_ACTIONs and RESOLUTION_TIME_ACTIONs) then try ABILITY_ABOUT_TO_RESOLVE.NeoAnderson wrote:OK thanks Riiak i tried to find something with this trigger but the forum search need some improvementsand i was not sure how this trigger works
I will try to revise with ABILITY_RESOLVED hoping that TriggerObject is the Object who generate the trigger.
EffectSource() is not always available in AVAILABILITY blocks so instead try using Object() which should always be available for linking the ObjectDC. Also if you are just going to call RSN_GetObjectDC() with EffectSource() you could just as easily use RSN_ObjectDC() which uses EffectSource() without you having to type it.NeoAnderson wrote:EDIT :
Riiak i tried your RSN_ObjectDC function but i am not sure if i used it correctly, the main problem is I still have the same problem of LinkedDC. I revised some parts of the card code so now is just an hybrid version with LinkedDC and RSN_ObjectDC but the worst thing is that AVAILABILITY BLOCK still gives the same error: [lua] ?:0: attempt to index a nil value.
I have initialized the RSN_Object when the card comes into battlefield
- Code: Select all
<TRIGGERED_ABILITY linked_ability_group="1" forced_skip="1">
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
local oDC = RSN_GetObjectDC( EffectSource(), true )
oDC:Int_Set( 4857, 1 )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
When i read the value i use the follow syntax ( I have use false value because the Chest should be already created):What's wrong??
- Code: Select all
<AVAILABILITY>
local filter = ClearFilter()
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_IS_TOKEN, false )
local count = filter:Count()
if count > 0 then
local oDC = RSN_GetObjectDC( EffectSource(), false )
if oDC:Int_Get( 4857 ) == 1 then
return true
else
return false
end
else
return false
end
</AVAILABILITY>
Also when you use a false parameter on RSN_GetObjectDC() you need to add a check for the possibility that the ObjectDC is nil. For example if you initialize the ObjectDC in a TRIGGERED_ABILITY on an Artifact or Enchantment then try to access it in an ACTIVATED_ABILITY on the same card then if the player uses the ACTIVATED_ABILITY before the TRIGGERED_ABILITY has resolved then the ObjectDC will be nil because it hasn't been initialized yet. The same situation arises with AVAILABILITY blocks as they are checked during state-based effects to see if the ability can be activated and this will occur before ETB TRIGGERED_ABILITYs finish resolving as such the ObjectDC won't be initialized yet.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Formal Request Thread
by drleg3nd » 04 Dec 2013, 22:39
hey thx for help riiak but I guess I messed up somewhere lol
- Utopia Sprawl | Open
- Code: Select all
<SPELL_ABILITY attach_definition="0">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchant Forest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanter : forêt]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Encantar bosque.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Waldverzauberung]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Incanta Foresta]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャント(森)]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchant Forest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Зачаровать Лес]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Encantar Floresta]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_FOREST_TO_ENCHANT" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_SUBTYPE, OP_IS, LAND_TYPE_FOREST )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if (target ~= nil and EffectSource() ~= nil) then
EffectSource():Attach( target )
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY replacement_query="1" linked_ability_group="1" active_zone="ZONE_TRANSITION">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Utopia Sprawl enters the battlefield, choose a color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Au moment où l’Étendue de l’utopie arrive en jeu, choisissez une couleur.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[En cuanto la Expansión utópica entre en juego, elige un color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sowie die Utopia-Ausbreitung ins Spiel kommt, bestimme eine Farbe.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mentre la Propagazione dell’Utopia entra nel campo di battaglia, scegli un colore.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[楽園の拡散が場に出るに際し、色を1色選ぶ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As Utopia Sprawl enters the battlefield, choose a color.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда Утопический рост вступает в игру, выберите цвет.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conforme Propagação da Utopia entra em jogo, escolha uma cor.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
<RESOLUTION_TIME_ACTION>
-- Get the chosen colour.
LinkedDC():Int_Set(0, GetChosenColour())
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que la forêt enchantée est engagée pour du mana, son contrôleur ajoute un mana de la couleur choisie à sa réserve.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que el bosque encantado se gire para obtener maná, su controlador agrega un maná del color elegido a su reserva de maná.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn der verzauberte Wald für Mana getappt wird, erhöht sein Beherrscher seinen Manavorrat um ein zusätzliches Mana der bestimmten Farbe.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta la Foresta incantata è TAPpata per attingere mana, il suo controllore aggiunge un mana del colore scelto alla sua riserva di mana.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャントされている森がマナを引き出す目的でタップされるたび、それのコントローラーは選ばれた色のマナ1点を自分のマナ・プールに加える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда зачарованный Лес поворачивается для получения маны, контролирующий его игрок добавляет одну ману выбранного цвета в свой запас маны.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que a floresta encantada é virada para gerar mana, seu controlador adiciona um mana da cor escolhida à sua própria reserva de mana.]]></LOCALISED_TEXT>
<TRIGGER value="BECAME_TAPPED_FOR_MANA">
return EffectSource():GetParent() ~= nil and EffectSource():GetParent() == TriggerObject()
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local nColour = LinkedDC():Int_Get(0)
local oPlayer = EffectSourceLKI():GetParent() ~= nil and EffectSourceLKI():GetParent():GetController()
if (nColour == COLOUR_BLACK) then
RSN_ProduceForPlayerNoTrigger( "{B}", 1, oPlayer )
elseif (nColour == COLOUR_BLUE) then
RSN_ProduceForPlayerNoTrigger( "{U}", 1, oPlayer )
elseif (nColour == COLOUR_GREEN) then
RSN_ProduceForPlayerNoTrigger( "{G}", 1, oPlayer )
elseif (nColour == COLOUR_RED) then
RSN_ProduceForPlayerNoTrigger( "{R}", 1, oPlayer )
else
RSN_ProduceForPlayerNoTrigger( "{W}", 1, oPlayer )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
RSN_EliminateExtraManaTokens()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
</CARD_V2>
- Error | Open
- Code: Select all
[lua] [string "UTOPIA_SPRAWL_812107569_TITLE (RESOLUTION_TIME_ACTION)~0x0000043c"]:2: attempt to index a nil value
Re: Formal Request Thread
by drleg3nd » 04 Dec 2013, 22:45
is Joraga Treespeaker floating around some where ? otherwise i'll attempt to make if Tfm or someone made level up ability
Who is online
Users browsing this forum: No registered users and 6 guests