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 MC Brodie » 16 Jul 2013, 22:07
Yes, thats exactly what I was looking for thank you. I found examples for SetCardPtr and the integer one but I couldn't find the player equivalent (probably should have done some better searching). I haven't downloaded the nostalgia decks yet either but I guess I should get on top of that. Thanks.BloodReyvyn wrote:I'm not fully wrapping my head around that... ^
What card are you trying to make specifically?
I assume since it is just a Data Chest, it could be used to store any pointer you want.
EDIT:
An example of storing a player in a linked Data Chest can be found in the Nostalgia pack (I am pretty sure that is what "DATA_DECKS_50000.wad" is from) with the code for The Rack:
- Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="THE_RACK_109725" />
<CARDNAME text="THE_RACK" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[The Rack]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Chevalet de torture]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El potro]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Streckbank]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La Griglia]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[拷問台]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[The Rack]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Дыба]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[O Ecúleo]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="109725" />
<ARTID value="109725" />
<ARTIST name="Richard Thomas" />
<CASTING_COST cost="{1}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Invented in Mishra’s earlier days, the rack was once his most feared creation.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Inventé pendant la jeunesse de Mishra, le chevalet de torture fut alors sa création la plus redoutée.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El potro, inventado en los primeros días de Mishra, fue en tiempos su creación más temida.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Mishra erfand diese Streckbank in seinen jungen Jahren. Sie war einst seine gefürchtetste Schöpfung.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Inventato durante la giovinezza da Mishra, questo artefatto fu una delle sue invenzioni più temute.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[拷問台は若き日のミシュラが発明したもので、かつては彼の偉業の中でもっとも恐れられていた。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Invented in Mishra’s earlier days, the rack was once his most feared creation.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Дыба, изобретенная в ранние годы Мишры, когда-то была самым страшным его творением.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Inventado nos primórdios de Mishra, o ecúleo já foi sua criação mais temida.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Artifact" />
<EXPANSION value="TSB" />
<RARITY metaname="R" />
<TRIGGERED_ABILITY linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As The Rack enters the battlefield, choose an opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Au moment où le Chevalet de torture arrive en jeu, choisissez un adversaire.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[En cuanto El potro entre en juego, elige un oponente.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sowie die Streckbank ins Spiel kommt, bestimme einen Gegner.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mentre la Griglia entra nel campo di battaglia, scegli un avversario.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[拷問台が場に出るに際し、対戦相手を1人選ぶ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As The Rack enters the battlefield, choose an opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[При входе Дыбы в игру выберите оппонента. ]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conforme O Ecúleo entra em jogo, escolha um oponente]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
<TARGET tag="CARD_QUERY_CHOOSE_PLAYER" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:SetFilterType( FILTER_TYPE_PLAYERS )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if player ~= nil then
LinkedDC():Set_PlayerPtr(0, player)
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of the chosen player’s upkeep, The Rack deals X damage to that player, where X is 3 minus the number of cards in his or her hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Au début de l’entretien du joueur choisi, le Chevalet de torture inflige X blessures à ce joueur, X étant 3 moins le nombre de cartes dans sa main.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Al comienzo del mantenimiento del jugador elegido, El potro hace X puntos de daño a ese jugador, donde X es 3 menos la cantidad de cartas en su mano.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Zu Beginn des Versorgungssegments dieses Gegners fügt die Streckbank diesem Spieler X Schadenspunkte zu, wobei X gleich 3 minus der Anzahl an Karten auf seiner Hand ist.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[All’inizio del mantenimento del giocatore scelto, La Griglia infligge X danni a quel giocatore, dove X è 3 meno il numero di carte nella sua mano.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[選ばれたプレイヤーのアップキープの開始時に、拷問台はそのプレイヤーにX点のダメージを与える。Xは3からそのプレイヤーの手札のカードの枚数を引いた値に等しい。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of the chosen player’s upkeep, The Rack deals X damage to that player, where X is 3 minus the number of cards in his or her hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[В начале шага поддержки выбранного игрока Дыба наносит Х повреждений этому игроку, где Х равен 3 минус количество карт в его или ее руке.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[No início da manutenção do jogador escolhido, O Ecúleo causa X pontos de dano àquele jogador, sendo X igual a 3 menos o número de cards na mão dele.]]></LOCALISED_TEXT>
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP">
return MTG():GetStep() == STEP_UPKEEP and TriggerPlayer() == LinkedDC():Get_PlayerPtr(0)
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local target = LinkedDC():Get_PlayerPtr(0)
if target ~= nil then
local number = target:Hand_Count()
if EffectSourceLKI() ~= nil then
EffectSourceLKI():DealDamageTo( 3-number, target )
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
</CARD_V2>
-----------------------------------------------------------------------
Song of the Day: 46 and 2 (cover)
Song of the Day: 46 and 2 (cover)
Re: Formal Request Thread
by thefiremind » 16 Jul 2013, 22:38
There was a card that gave us lots of headaches
in DotP2013 and made us discover that limitation about mana abilities: a card granting a mana ability without having any active for itself was crashing the game. Well, DotP2014 is free from this limitation, and so it is now possible to code... Life and Limb! It will be featured in a deck of my mod in the future, but for now, here's how I coded its ability:

- Life and Limb ability | Open
- Code: Select all
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[All Forests and all Saprolings are 1/1 green Saproling creatures and Forest lands in addition to their other types.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Toutes les forêts et tous les saprobiontes sont des créatures 1/1 vertes Saprobionte et des terrains de forêt en plus de leurs autres types.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Todos los bosques y todos los Saprolines son criaturas Saprolín verde 1/1 y tierras bosque además de sus otros tipos.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Alle Wälder und alle Saprolinge sind 1/1 grüne Saprolinge und Wälder zusätzlich zu ihren anderen Typen.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Tutte le Foreste e tutti i Saprolingi sono creature Saprolingio 1/1 verdi e terre Foresta in aggiunta ai loro altri tipi.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[すべての森とすべての苗木は、他のタイプに加えて緑の1/1の苗木クリーチャーであるととともに森土地でもある。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[All Forests and all Saprolings are 1/1 green Saproling creatures and Forest lands in addition to their other types.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Все Леса и все Сапролинги являются 1/1 зелеными существами Сапролинг и землями Лес в дополнение к своим другим типам.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Todas as Florestas e todos os Saprófitas são criaturas verdes 1/1 do tipo Saprófita e terrenos de Floresta, além de seus outros tipos.]]></LOCALISED_TEXT>
<FILTER filter_id="0">
local filter = ClearFilter()
local subFilter = filter:AddSubFilter_Or()
subFilter:Add(FE_SUBTYPE, OP_IS, CREATURE_TYPE_SAPROLING)
subFilter:Add(FE_SUBTYPE, OP_IS, LAND_TYPE_FOREST)
</FILTER>
<CONTINUOUS_ACTION layer="4" filter_id="0">
if FilteredCard() ~= nil then
local characteristics = FilteredCard():GetCurrentCharacteristics()
local card_type = characteristics:CardType_GetWritable()
local sub_type = characteristics:SubType_GetWritable()
card_type:Add(CARD_TYPE_CREATURE)
card_type:Add(CARD_TYPE_LAND)
sub_type:Add(CREATURE_TYPE_SAPROLING)
sub_type:Add(LAND_TYPE_FOREST)
end
</CONTINUOUS_ACTION>
<CONTINUOUS_ACTION layer="5" filter_id="0">
if FilteredCard() ~= nil then
FilteredCard():GetColour():Add(COLOUR_GREEN)
end
</CONTINUOUS_ACTION>
<CONTINUOUS_ACTION layer="7B" filter_id="0">
if FilteredCard() ~= nil then
local characteristics = FilteredCard():GetCurrentCharacteristics()
characteristics:Power_Set(1)
characteristics:Toughness_Set(1)
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<STATIC_ABILITY>
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add(FE_SUBTYPE, OP_IS, LAND_TYPE_FOREST)
filter:Add(FE_SUPERTYPE, OP_NOT, SUPERTYPE_BASIC)
</FILTER>
<CONTINUOUS_ACTION layer="6" filter_id="0">
if FilteredCard() ~= nil then
local source = EffectSource()
if source ~= nil then
-- Only 1 Life and Limb should give the mana ability to nonbasic Forests.
-- NOTE: this will be incompatible with other cards that do the same!
local filter = ClearFilter()
filter:Add(FE_CARD_NAME, OP_IS, source)
filter:EvaluateObjects()
if source == filter:GetNthEvaluatedObject(0) then
FilteredCard():GetCurrentCharacteristics():GrantAbility(5)
end
end
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<MANA_ABILITY resource_id="5">
<COST type="TapSelf" />
<PRODUCES amount="{G}" />
</MANA_ABILITY>
< 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 BloodReyvyn » 16 Jul 2013, 23:40
Hey, thefiremind, you were saying that Stormtide Leviathan wasn't possible to code. Is that because adding another instance of the
mana ability would make them bugged?
I started tinkering with Urborg, Tomb of Yawgmoth again and came up with this:
So, second time I had it set up a little differently, where it would only consider non-swamps for the ability, which it would give the land type, but would not grant either the mana ability itself or allow the land to be tapped for black by auto-tapping.
Third time, I tweaked it a bit more and it would give the mana ability, but not the land type.
This was the last setup I came up with and it seems to work, except the land type is given to all lands, but the mana ability is being given to everything that isn't a swamp, including enchantments, creatures, and artifacts.
However, through these experiments, I am fairly sure someone with a little more skill could probably figure out a way to make it work.
Anyway, thanks for the time, just thought I'd share.

I started tinkering with Urborg, Tomb of Yawgmoth again and came up with this:
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="URBORG_TOMB_OF_YAWGMOTH_287330" />
<CARDNAME text="URBORG_TOMB_OF_YAWGMOTH" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Urborg, Tomb of Yawgmoth]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Urborg, Tomb of Yawgmoth]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Urborg, Tomb of Yawgmoth]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Urborg, Tomb of Yawgmoth]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Urborg, Tomb of Yawgmoth]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Urborg, Tomb of Yawgmoth]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Urborg, Tomb of Yawgmoth]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Urborg, Tomb of Yawgmoth]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Urborg, Tomb of Yawgmoth]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="287330" />
<ARTID value="287330" />
<ARTIST name="John Avon" />
<CASTING_COST cost="" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“Yawgmoth’s corpse is a wound in the universe. His foul blood seeps out, infecting the land with his final curse.”
—Lord Windgrace]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[“Yawgmoth’s corpse is a wound in the universe. His foul blood seeps out, infecting the land with his final curse.”
—Lord Windgrace]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“Yawgmoth’s corpse is a wound in the universe. His foul blood seeps out, infecting the land with his final curse.”
—Lord Windgrace]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[“Yawgmoth’s corpse is a wound in the universe. His foul blood seeps out, infecting the land with his final curse.”
—Lord Windgrace]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Yawgmoth’s corpse is a wound in the universe. His foul blood seeps out, infecting the land with his final curse.”
—Lord Windgrace]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[“Yawgmoth’s corpse is a wound in the universe. His foul blood seeps out, infecting the land with his final curse.”
—Lord Windgrace]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“Yawgmoth’s corpse is a wound in the universe. His foul blood seeps out, infecting the land with his final curse.”
—Lord Windgrace]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[“Yawgmoth’s corpse is a wound in the universe. His foul blood seeps out, infecting the land with his final curse.”
—Lord Windgrace]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“Yawgmoth’s corpse is a wound in the universe. His foul blood seeps out, infecting the land with his final curse.”
—Lord Windgrace]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<SUPERTYPE metaname="Legendary" />
<TYPE metaname="Land" />
<EXPANSION value="V12" />
<RARITY metaname="M" />
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Each land is a Swamp in addition to its other land types.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Each land is a Swamp in addition to its other land types.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Each land is a Swamp in addition to its other land types.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Each land is a Swamp in addition to its other land types.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogni terra è una Palude in aggiunta ai suoi altri tipi di terra.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Each land is a Swamp in addition to its other land types.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Each land is a Swamp in addition to its other land types.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Each land is a Swamp in addition to its other land types.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Each land is a Swamp in addition to its other land types.]]></LOCALISED_TEXT>
<FILTER filter_id="0">
local filter = ClearFilter()
filter:SetZone( ZONE_IN_PLAY + GRAVEYARD + ZONE_HAND + ZONE_LIBRARY )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
local subfilter = filter:AddSubFilter_Or()
subfilter:Add(FE_SUBTYPE, OP_NOT, LAND_TYPE_SWAMP )
</FILTER>
<CONTINUOUS_ACTION layer="6" filter_id="0">
if FilteredCard() ~= nil then
FilteredCard():GetCurrentCharacteristics():GrantAbility(1)
FilteredCard():GetCurrentCharacteristics():GrantAbility(2)
FilteredCard():GetCurrentCharacteristics():GrantAbility(3)
end
</CONTINUOUS_ACTION>
<CONTINUOUS_ACTION layer="4" filter_id="0">
if FilteredCard() ~= nil then
local characteristics = FilteredCard():GetCurrentCharacteristics()
local subtype = characteristics:SubType_GetWritable()
subtype:Add( LAND_TYPE_SWAMP )
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<ACTIVATED_ABILITY resource_id="1" forced_skip="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Add {B} to your mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T} : Ajoutez {B} à votre réserve.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: Agrega {B} a tu reserva de maná.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Erhöhe deinen Manavorrat um {B}.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Aggiungi {B} alla tua riserva di mana.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:あなたのマナ・プールに{B}を加える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: {B}를 당신의 마나풀에 담는다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: добавьте {B} в ваше хранилище маны.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Adicione {B} à sua reserva de mana.]]></LOCALISED_TEXT>
<COST type="TapSelf" />
<PLAY_TIME_ACTION>
RSN_MarkManaAbilityStart()
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
RSN_Produce( "{B}", 1 )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
RSN_EliminateExtraManaTokens()
RSN_MarkManaAbilityEnd()
</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" />
</ACTIVATED_ABILITY>
<STATIC_ABILITY resource_id="2" >
<CONTINUOUS_ACTION layer="0">
RSN_ClearCanProduceMana()
RSN_MarkCanProduceMana( "{B}" )
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY resource_id="3" forced_skip="1" replacement_effect="1">
<TRIGGER value="BEGINNING_OF_STEP" pre_trigger="1" />
<RESOLUTION_TIME_ACTION>
RSN_ClearProducedMana()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_B" />
</CARD_V2>
So, second time I had it set up a little differently, where it would only consider non-swamps for the ability, which it would give the land type, but would not grant either the mana ability itself or allow the land to be tapped for black by auto-tapping.
Third time, I tweaked it a bit more and it would give the mana ability, but not the land type.
This was the last setup I came up with and it seems to work, except the land type is given to all lands, but the mana ability is being given to everything that isn't a swamp, including enchantments, creatures, and artifacts.
However, through these experiments, I am fairly sure someone with a little more skill could probably figure out a way to make it work.
Anyway, thanks for the time, just thought I'd share.

"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
-
BloodReyvyn - Posts: 421
- Joined: 19 May 2013, 13:29
- Has thanked: 53 times
- Been thanked: 40 times
Re: Formal Request Thread
by thefiremind » 17 Jul 2013, 00:03
I won't be that one because I'm sure enough that there's no way to make it work properly. Also, you said you were giving the mana ability but not the land type... what about cards like Mutilate?BloodReyvyn wrote:However, through these experiments, I am fairly sure someone with a little more skill could probably figure out a way to make it work.
What's that filter:SetZone where you are adding constants?


< 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 BloodReyvyn » 17 Jul 2013, 00:11
Oh lol, I put those there just to see if cards in my hand, graveyard, whatever would be changed so I could pop in and out of the game faster. Obviously, it didn't work and I hadn't removed those lines just yet (got tired and went to bed
), but whatever.
Also, I am giving the land type as well. The problem with ONLY giving the land type was that it would not let, say, an Island tap for black, either by manual tapping or by auto-tapping (ie - having 2 islands, Urborg, and a swamp would not let me play Korlash, Heir to Blackblade). The problem only actually happened when a land had 2 basic land types.
And Mutilate works just fine, as does Korlash, Nightmare, and Tendrils of Corruption.

Also, I am giving the land type as well. The problem with ONLY giving the land type was that it would not let, say, an Island tap for black, either by manual tapping or by auto-tapping (ie - having 2 islands, Urborg, and a swamp would not let me play Korlash, Heir to Blackblade). The problem only actually happened when a land had 2 basic land types.
And Mutilate works just fine, as does Korlash, Nightmare, and Tendrils of Corruption.
"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
-
BloodReyvyn - Posts: 421
- Joined: 19 May 2013, 13:29
- Has thanked: 53 times
- Been thanked: 40 times
Re: Formal Request Thread
by Master Necro » 17 Jul 2013, 05:34
It puts the counters on a creature now but it doesn't give me the option to move one counter when another creature enters the battlefield.RiiakShiNal wrote:That would be because you missed part of the ability. This whole block:
- Code: Select all
<TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
-- change the amount of counters here for Graft 2, 3, etc.
EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
-
Master Necro - Posts: 259
- Joined: 24 Apr 2013, 18:25
- Has thanked: 83 times
- Been thanked: 21 times
Re: Formal Request Thread
by thefiremind » 17 Jul 2013, 09:23
Re-copy both abilities from my CODE snippet, I'm sure enough that they work.Master Necro wrote:It puts the counters on a creature now but it doesn't give me the option to move one counter when another creature enters the battlefield.
On an unrelated note, I can't remember if this is the topic where I wrote the difference between BEGINNING_OF_STEP and BEGINNING_OF_PLAYERS_STEP, anyway, I was partially wrong. BEGINNING_OF_PLAYERS_STEP isn't a shortcut for BEGINNING_OF_STEP with TriggerPlayer():MyTurn() == true, because BEGINNING_OF_STEP now works differently from DotP2013: it doesn't bring any TriggerPlayer() information, and it triggers only once per step, not once for each player per step. This means that if we write BEGINNING_OF_STEP simple_qualifier="controller" as we used to do in DotP2013, that trigger will never happen because TriggerPlayer() is nil and will never be equal to EffectController().
< 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 Scion of Darkness » 17 Jul 2013, 10:22
Thanks for that fire =), you are a life saver =), i dont recall it well since i dont have the xmls with me, but i only need one ability to finish all the slivers needed, the "sliver can only be blocked by slivers" can this be achieved in dotp2014? didnt find any info on wiki pages
-
Scion of Darkness - Posts: 235
- Joined: 27 Aug 2012, 13:14
- Has thanked: 17 times
- Been thanked: 23 times
Re: Formal Request Thread
by thefiremind » 17 Jul 2013, 11:25
There are no examples on DotP2014, but blocking restrictions have always been coded with the EVASION_TEST triggers in the previous games.Scion of Darkness wrote:the "sliver can only be blocked by slivers" can this be achieved in dotp2014?
- Code: Select all
<TRIGGERED_ABILITY replacement_effect="1">
-- Localised text omitted
<TRIGGER value="EVASION_TEST" pre_trigger="1">
return TriggerObject():GetSubType():Test(CREATURE_TYPE_SLIVER) and SecondaryObject():GetSubType():Test(CREATURE_TYPE_SLIVER) == false
</TRIGGER>
</TRIGGERED_ABILITY>
EDIT: I'd like to inform everyone that I inserted a new implementation of totem armor in my web generator. The new implementation lets the enchanted creature's controller choose which aura with totem armor should be destroyed when there's more than one.
< 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 MC Brodie » 17 Jul 2013, 12:55
Is there a way to reverse this somehow to help with the "creature A must block creature B" thing? For instance, could we give creature B some kind of hidden ability or subtype. Then have Creature A only able to block a creature with that hidden ability or subtype and give it "must block this turn if able?"
On a side note, what does replacement_effect="1" and pre_trigger="1" actually do?
On a side note, what does replacement_effect="1" and pre_trigger="1" actually do?
-----------------------------------------------------------------------
Song of the Day: 46 and 2 (cover)
Song of the Day: 46 and 2 (cover)
Re: Formal Request Thread
by thefiremind » 17 Jul 2013, 13:11
It wouldn't work because the "creature A must block creature B" should be ignored if creature A cannot block creature B. So, if creature B has flying and creature A doesn't have flying nor reach, it wouldn't be able to block anything in that turn, which would be wrong. Flying and reach are characteristics that can be checked, but what about more complicated restrictions, like Champion of Lambholt?MC Brodie wrote:Is there a way to reverse this somehow to help with the "creature A must block creature B" thing? For instance, could we give creature B some kind of hidden ability or subtype. Then have Creature A only able to block a creature with that hidden ability or subtype and give it "must block this turn if able?"
replacement_effect="1" and replacement_query="1" are the same as internal="1" in DotP2013: they make the ability transparent to the players (no glow) and with immediate resolution (no response time). You need to use replacement_query instead of replacement_effect if you are planning to ask something to a player inside the ability, otherwise it won't work.MC Brodie wrote:On a side note, what does replacement_effect="1" and pre_trigger="1" actually do?
pre_trigger="1" means that the triggered ability will start a moment before the triggering event has actually happened, allowing you to override that event or change something about it.
< 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 MC Brodie » 17 Jul 2013, 13:40
Oh ok maybe I'm misunderstanding. So say creature B has fear and creature A is blue. Creature A would still have to block creature B even though it normally couldn't?
And thanks for the description on the other stuff. It helps.
And thanks for the description on the other stuff. It helps.
-----------------------------------------------------------------------
Song of the Day: 46 and 2 (cover)
Song of the Day: 46 and 2 (cover)
Re: Formal Request Thread
by thefiremind » 17 Jul 2013, 13:46
No, and that's the point: if we implement the mechanic as you said, creature A could only block creature B, but since it can't, it wouldn't be able to block anything. Rules say that it should be able to block normally (anything its controller wants, if possible) in that scenario.MC Brodie wrote:Oh ok maybe I'm misunderstanding. So say creature B has fear and creature A is blue. Creature A would still have to block creature B even though it normally couldn't?
< 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 » 17 Jul 2013, 17:25
can someone help me with this code ?
- Code: Select all
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Each other creature you control with a +1/+1 counter on it has haste.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Chaque autre créature que vous contrôlez avec un marqueur +1/+1 sur elle a la célérité.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cada otra criatura que controlas con un contador +1/+1 sobre ella tiene la habilidad de prisa.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Jede andere Kreatur, die du kontrollierst und auf der mindestens eine +1/+1-Marke liegt, hat Eile.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogni altra creatura con un segnalino +1/+1 che controlli ha rapidità.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたがコントロールする+1/+1カウンターが置かれている他の各クリーチャーは速攻を持つ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[당신이 조종하는 다른 생물 중 +1/+1 카운터를 가진 각 생물은 신속 능력을 가진다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Each other creature you control with a +1/+1 counter on it has haste.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Each other creature you control with a +1/+1 counter on it has haste.]]></LOCALISED_TEXT>
</STATIC_ABILITY>
Re: Formal Request Thread
by drleg3nd » 17 Jul 2013, 17:40
could use some help on this one also.thx
- Code: Select all
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Remove two +1/+1 counters from Experiment One: Regenerate Experiment One.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Retirez deux marqueurs +1/+1 de l’Expérience Un : Régénérez l’Expérience Un.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Remover dos contadores +1/+1 del Experimento Uno: Regenera el Experimento Uno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Entferne zwei +1/+1-Marken von Experiment Eins: Regeneriere Experiment Eins.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Rimuovi due segnalini +1/+1 dal Primo Esperimento: Rigenera il Primo Esperimento.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Remove two +1/+1 counters from Experiment One: Regenerate Experiment One.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[실험체 1호에서 +1/+1 카운터 두 개를 제거한다: 실험체 1호를 재생한다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Удалите два жетона +1/+1 с Первого Эксперимента: регенерируйте Первый Эксперимент.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Remove two +1/+1 counters from Experiment One: Regenerate Experiment One.]]></LOCALISED_TEXT>
</ACTIVATED_ABILITY>
Who is online
Users browsing this forum: No registered users and 6 guests