Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk
Skullblakka's questions (of a noob)
Moderator: CCGHQ Admins
23 posts
• Page 1 of 2 • 1, 2
Skullblakka's questions (of a noob)
by skullblakka » 15 Oct 2012, 21:52
Hi!
first i'm noob so be cool
i coded only few cards like Darksteel Myr, Myr Galvanizer, Myr Turbine and more... nothing so hard to do but...
i have some troubles with this one Lodestone Myr
i am on it for few hours an i don't know why i can target tapped artifact even if i get them out of the filter.
i think it's because it don't exist but what must i do to fix that two problems?
first i'm noob so be cool
i coded only few cards like Darksteel Myr, Myr Galvanizer, Myr Turbine and more... nothing so hard to do but...
i have some troubles with this one Lodestone Myr
i am on it for few hours an i don't know why i can target tapped artifact even if i get them out of the filter.
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="LODESTONE_MYR_205291" />
<CARDNAME text="LODESTONE_MYR" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Lodestone Myr]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Myr di Magnetite]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Magneteisenmyr]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Myr de magnétite]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Myr de piedraimán]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[磁石マイア]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Lodestone Myr]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Lodestone Myr]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Myr de Magnetita]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="205291" />
<ARTID value="A205291" />
<ARTIST name="Greg Staples" />
<CASTING_COST cost="{4}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When necessary, myr can override and control any artificial object, as can their creator.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quando è necessario, i myr possono prendere il controllo di qualsiasi oggetto artificiale, così come possono farlo i loro creatori.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls notwendig, können sich Myr über sämtliche künstlichen Objekte hinwegsetzen und sie kontrollieren, genau wie ihr Erschaffer.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Tout comme leur créateur, les myrs peuvent, en cas de besoin, prendre le contrôle des objets.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Los myr pueden sobrecargar y controlar cualquier objeto artificial, tal como lo puede hacer su creador.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[必要とあらば、マイアはあらゆる人工物を、その製作者のように操ることができる。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When necessary, myr can override and control any artificial object, as can their creator.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[When necessary, myr can override and control any artificial object, as can their creator.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Quando necessário, os myr podem suprimir e controlar qualquer objeto, tal qual seu criador.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Artifact" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Myr" order_de-DE="0" order_es-ES="0" order_fr-FR="0" order_it-IT="0" order_jp-JA="0" order_ko-KR="0" order_pt-BR="0" order_ru-RU="0" />
<EXPANSION value="DPG" />
<RARITY metaname="R" />
<POWER value="2" />
<TOUGHNESS value="2" />
<STATIC_ABILITY filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Trample]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Travolgere]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Verursacht Trampelschaden]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Piétinement]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Arrolla.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[トランプル]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Trample]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Trample]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Atropelar]]></LOCALISED_TEXT>
<CONTINUOUS_ACTION>
local characteristics = Object():GetCurrentCharacteristics()
characteristics:Characteristic_Set( CHARACTERISTIC_TRAMPLE, 1 )
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<ACTIVATED_ABILITY filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Tap an untapped artifact you control: Lodestone Myr gets +1/+1 until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[TAPpa un artefatto STAPpato che controlli: Il Myr di Magnetite prende +1/+1 fino alla fine del turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Tappe ein ungetapptes Artefakt, das du kontrollierst: Der Magneteisenmyr erhält +1/+1 bis zum Ende des Zuges.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Engagez un artefact dégagé que vous contrôlez : Le Myr de magnétite gagne +1/+1 jusqu'à la fin du tour.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Girar un artefacto enderezado que controles: El Myr de piedraimán obtiene +1/+1 hasta el final del turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたがコントロールするアンタップ状態のアーティファクト1個をタップする:磁石マイアはターン終了時まで+1/+1の修正を受ける。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Tap an untapped artifact you control: Lodestone Myr gets +1/+1 until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Tap an untapped artifact you control: Lodestone Myr gets +1/+1 until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Vire um artefato desvirado que você controla: Myr de Magnetita recebe +1/+1 até o final do turno.]]></LOCALISED_TEXT>
<COST type="tap">
<TARGET_DEFINITION id="6">
local filter = Object():GetFilter()
filter:Clear()
filter:NotTargetted()
filter:SetZone( ZONE_IN_PLAY )
filter:AddCardType( CARD_TYPE_ARTIFACT )
filter:SetController( EffectController() )
filter:AddExtra( FILTER_EXTRA_ARTIFACT_UNTAPPED )
filter:SetHint( HINT_ENEMY, EffectController() )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(6)
</TARGET_DETERMINATION>
<PLAYTIME>
EffectController():ChooseTarget( 6, "CARD_QUERY_TAP_AN_UNTAPPED_ARTIFACT_YOU_CONTROL", EffectDC():Make_Targets(0) )
</PLAYTIME>
</COST>
<CONTINUOUS_ACTION layer="7C">
if EffectSource() ~= nil then
local characteristics = EffectSource():GetCurrentCharacteristics()
characteristics:Power_Add( 1 )
characteristics:Toughness_Add( 1 )
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
</ACTIVATED_ABILITY>
</CARD_V2>
i think it's because it don't exist but what must i do to fix that two problems?
Last edited by skullblakka on 06 Nov 2012, 15:49, edited 1 time in total.
apology my so bad english speaking 
-

skullblakka - Posts: 71
- Joined: 31 Jul 2012, 20:16
- Has thanked: 16 times
- Been thanked: 17 times
Re: Lodestone Myr
by RiiakShiNal » 15 Oct 2012, 23:22
You need to change this:
To make CARD_QUERY_TAP_AN_UNTAPPED_ARTIFACT_YOU_CONTROL display the correct text you will need to define it and the text for it in a XML file that is placed in the TEXT_PERMANENT directory (It is easier to modify an existing XML file in that directory and simply add the entries than to create a new one).
For example:
- Code: Select all
filter:AddExtra( FILTER_EXTRA_ARTIFACT_UNTAPPED )
- Code: Select all
filter:AddExtra( FILTER_EXTRA_CREATURE_UNTAPPED )
To make CARD_QUERY_TAP_AN_UNTAPPED_ARTIFACT_YOU_CONTROL display the correct text you will need to define it and the text for it in a XML file that is placed in the TEXT_PERMANENT directory (It is easier to modify an existing XML file in that directory and simply add the entries than to create a new one).
For example:
- Code: Select all
<Row>
<Cell><Data ss:Type="String">CARD_QUERY_TAP_AN_UNTAPPED_ARTIFACT_YOU_CONTROL</Data></Cell>
<Cell ss:Index="3"><Data ss:Type="String">Select an untapped artifact you control to tap.</Data></Cell>
<Cell><Data ss:Type="String">Select an untapped artifact you control to tap.</Data></Cell>
<Cell><Data ss:Type="String">Select an untapped artifact you control to tap.</Data></Cell>
<Cell><Data ss:Type="String">Select an untapped artifact you control to tap.</Data></Cell>
<Cell><Data ss:Type="String">Select an untapped artifact you control to tap.</Data></Cell>
<Cell ss:Index="9"><Data ss:Type="String">Select an untapped artifact you control to tap.</Data></Cell>
<Cell><Data ss:Type="String">Select an untapped artifact you control to tap.</Data></Cell>
<Cell><Data ss:Type="String">Select an untapped artifact you control to tap.</Data></Cell>
<Cell><Data ss:Type="String">Select an untapped artifact you control to tap.</Data></Cell>
</Row>
- String name
- English text
- French text
- Spanish text
- German text
- Italian text
- Japanese text
- Korean text
- Russian text
- Portuguese (Brazil) text
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: 2189
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Lodestone Myr
by skullblakka » 16 Oct 2012, 05:08
ok i didn't know that and can be usefullRiiakShiNal wrote:FILTER_EXTRA_CREATURE_UNTAPPED actually works for all card types
i now understand why my Myr Turbine works and this one don't
thx to for the cell
apology my so bad english speaking 
-

skullblakka - Posts: 71
- Joined: 31 Jul 2012, 20:16
- Has thanked: 16 times
- Been thanked: 17 times
Re: Lodestone Myr
by skullblakka » 17 Oct 2012, 20:16
i am on the last card of my deck and again i'm stuck with Myr Battlesphere
i tryed many things for the 2nd trigger but i fail to find a working one
so i surched on this forum and i found that post
viewtopic.php?f=63&t=6643&p=84992&hilit=myr+battlesphere#p84992
that was for DOTP2012 so it don't work...
now i am here and stuck...
when i attack the trigger begins but i can't tap any myr
if someone can help me plz do
i tryed many things for the 2nd trigger but i fail to find a working one
so i surched on this forum and i found that post
viewtopic.php?f=63&t=6643&p=84992&hilit=myr+battlesphere#p84992
that was for DOTP2012 so it don't work...
now i am here and stuck...
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="MYR_BATTLESPHERE_209717" />
<CARDNAME text="MYR_BATTLESPHERE" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Myr Battlesphere]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Sfera da Battaglia Myr]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Myr-Kampfkugel]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Sphère de bataille myr]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Esfera de batalla myr]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[マイアの戦闘球]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Myr Battlesphere]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Боевой Шар Миэров]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Esfera de Batalha Myr]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="209717" />
<ARTID value="209717" />
<ARTIST name="Franz Vohwinkel" />
<CASTING_COST cost="{7}" />
<TYPE metaname="Artifact" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Myr" order_de-DE="0" order_es-ES="0" order_fr-FR="0" order_it-IT="0" order_jp-JA="0" order_ko-KR="0" order_pt-BR="0" order_ru-RU="0" />
<SUB_TYPE metaname="Construct" order_de-DE="1" order_es-ES="1" order_fr-FR="1" order_it-IT="1" order_jp-JA="1" order_ko-KR="1" order_pt-BR="1" order_ru-RU="1" />
<EXPANSION value="DPG" />
<RARITY metaname="R" />
<POWER value="4" />
<TOUGHNESS value="7" />
<TOKEN_REGISTRATION reservation="4" type="TOKEN_MYR_1_1_6548987" />
<TRIGGERED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Myr Battlesphere enters the battlefield, put four 1/1 colorless Myr artifact creature tokens onto the battlefield.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quando la Sfera da Battaglia Myr entra nel campo di battaglia, metti sul campo di battaglia quattro pedine creatura artefatto Myr 1/1 incolori.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wenn die Myr-Kampfkugel ins Spiel kommt, bringe vier 1/1 farblose Myr-Artefaktkreaturenspielsteine ins Spiel.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quand la Sphère de bataille myr arrive sur le champ de bataille, mettez sur le champ de bataille quatre jetons de créature-artefact 1/1 incolore Myr.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cuando la Esfera de batalla myr entre al campo de batalla, pon en el campo de batalla cuatro fichas de criatura artefacto Myr incoloras 1/1.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[マイアの戦闘球が戦場に出たとき、無色の1/1のマイア・アーティファクト・クリーチャー・トークンを4体戦場に出す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When Myr Battlesphere enters the battlefield, put four 1/1 colorless Myr artifact creature tokens onto the battlefield.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда Боевой Шар Миэров выходит на поле битвы, положите на поле битвы четыре фишки артефактного существа 1/1 бесцветный Миэр.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Quando Esfera de Batalha Myr entrar no campo de batalha, coloque no campo de batalha quatro fichas de criatura artefato incolores 1/1 do tipo Myr.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
<RESOLUTION_TIME_ACTION>
local token_count = 4
if token_count > 0 then
MTG():PutTokensIntoPlay( "TOKEN_MYR_1_1_6548987", token_count, EffectController() )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Myr Battlesphere attacks, you may tap X untapped Myr you control. If you do, Myr Battlesphere gets +X/+0 until end of turn and deals X damage to defending player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta la Sfera da Battaglia Myr attacca, puoi TAPpare X Myr STAPpati che controlli. Se lo fai, la Sfera da Battaglia Myr prende +X/+0 fino alla fine del turno e infligge X danni al giocatore in difesa.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn die Myr-Kampfkugel angreift, kannst du X ungetappte Myr, die du kontrollierst, tappen. Falls du dies tust, erhält die Myr-Kampfkugel +X/+0 bis zum Ende des Zuges und fügt dem verteidigenden Spieler X Schadenspunkte zu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que la Sphère de bataille myr attaque, vous pouvez engager X myrs dégagés que vous contrôlez. Si vous faites ainsi, la Sphère de bataille myr gagne +X/+0 jusqu'à la fin du tour et inflige X blessures au joueur défenseur.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que la Esfera de batalla myr ataque, puedes girar X Myr enderezados que controles. Si lo haces, la Esfera de batalla myr obtiene +X/+0 hasta el final del turno y hace X puntos de daño al jugador defensor.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[マイアの戦闘球が攻撃するたび、あなたはあなたがコントロールするアンタップ状態のマイアをX体タップしてもよい。 そうした場合、マイアの戦闘球はターン終了時まで+X/+0の修整を受けるとともに、防御プレイヤーにX点のダメージを与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever Myr Battlesphere attacks, you may tap X untapped Myr you control. If you do, Myr Battlesphere gets +X/+0 until end of turn and deals X damage to defending player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз когда Боевой Шар Миэров атакует, вы можете повернуть X неповернутых Миэров под вашим контролем. Если вы это делаете, Боевой Шар Миэров получает +X/+0 до конца хода и наносит X повреждений защищующемуся игроку.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que Esfera de Batalha Myr ataca, você pode virar X Myr desvirados que você controla. Se fizer isso, Esfera de Batalha Myr recebe +X/+0 até o final do turno e causa X pontos de dano ao jogador defensor.]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKING" simple_qualifier="self" />
<RESOLUTION_TIME_ACTION>
MTG():EffectDataChest():Set_Int(1, 0)
local filter = Object():GetFilter()
local player = Object():GetPlayer()
filter:Clear()
filter:NotTargetted()
filter:SetPlayer( player )
filter:SetZone( ZONE_IN_PLAY )
filter:AddCardType( CARD_TYPE_CREATURE )
filter:AddSubType( CREATURE_TYPE_MYR )
filter:AddExtra( FILTER_EXTRA_CREATURE_UNTAPPED )
filter:May()
filter:AIMay()
local max_myrs = filter:Count()
if max_myrs > 0 then
player:SetTargetCount(max_myrs)
for i=0,max_myrs-1 do
player:SetTargetPrompt( i, "CARD_QUERY_TAP_AN_UNTAPPED_MYR_YOU_CONTROL" )
end
player:ChooseTargetsDC( MTG():EffectDataChest():Make_Targets(0) )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local filter = Object():GetFilter()
local player = Object():GetPlayer()
filter:Clear()
filter:NotTargetted()
filter:SetPlayer( player )
filter:SetZone( ZONE_IN_PLAY )
filter:AddCardType( CARD_TYPE_CREATURE )
filter:AddSubType( CREATURE_TYPE_MYR )
filter:AddExtra( FILTER_EXTRA_CREATURE_UNTAPPED )
local max_myrs = filter:Count()
local targetDC = MTG():EffectDataChest():Get_Targets(0)
local num_tapped = 0
local to_tap_array = {}
if max_myrs > 0 and targetDC ~= nil then
for i=0,max_myrs-1 do
local target_card = targetDC:Get_NthCardPtr(i)
if target_card ~= nil then
to_tap_array[num_tapped] = target_card
num_tapped = num_tapped + 1
end
end
if num_tapped > 0 then
for i=0,num_tapped-1 do
if to_tap_array[i] ~= nil then
to_tap_array[i]:Tap()
end
end
end
MTG():EffectDataChest():Set_Int(1, num_tapped)
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local tap_count = MTG():EffectDataChest():Get_Int(1)
local defending_player = Object():GetPlayerAttacked()
if tap_count > 0 and defending_player ~= nil then
defending_player:DealDamage(tap_count, Object())
end
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION>
local tap_count = MTG():EffectDataChest():Get_Int(1)
if tap_count >0 and Object():GetZone() == ZONE_IN_PLAY then
Object():GetCurrentCharacteristics():Power_Add( tap_count )
end
</CONTINUOUS_ACTION>
<DURATION>
return (MTG():GetStep() == STEP_CLEANUP)
</DURATION>
</TRIGGERED_ABILITY>
<SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
when i attack the trigger begins but i can't tap any myr
if someone can help me plz do
apology my so bad english speaking 
-

skullblakka - Posts: 71
- Joined: 31 Jul 2012, 20:16
- Has thanked: 16 times
- Been thanked: 17 times
Re: Lodestone Myr
by RiiakShiNal » 18 Oct 2012, 01:43
Try the below code (based on yours).
List of changes:
List of changes:
- Changed MTG():EffectDataChest() to EffectDC() because it's easier and is more normal for people coding cards.
- Uses ChooseTargets instead of ChooseTargetsDC (which had the incorrect number of parameters).
- Saves max_myrs into EffectDC() index 1 (so we don't have to count them twice)
- Changed tap_count to index 2 (because I used 1 for max_myrs)
- Set the layer on the continuous action to 7c as that is the layer on which it needs to run.
- Changed duration to use simple_duration because it looks nicer.
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="MYR_BATTLESPHERE_209717" />
<CARDNAME text="MYR_BATTLESPHERE" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Myr Battlesphere]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Sfera da Battaglia Myr]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Myr-Kampfkugel]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Sphère de bataille myr]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Esfera de batalla myr]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[マイアの戦闘球]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Myr Battlesphere]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Боевой Шар Миэров]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Esfera de Batalha Myr]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="209717" />
<ARTID value="209717" />
<ARTIST name="Franz Vohwinkel" />
<CASTING_COST cost="{7}" />
<TYPE metaname="Artifact" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Myr" order_de-DE="0" order_es-ES="0" order_fr-FR="0" order_it-IT="0" order_jp-JA="0" order_ko-KR="0" order_pt-BR="0" order_ru-RU="0" />
<SUB_TYPE metaname="Construct" order_de-DE="1" order_es-ES="1" order_fr-FR="1" order_it-IT="1" order_jp-JA="1" order_ko-KR="1" order_pt-BR="1" order_ru-RU="1" />
<EXPANSION value="DPG" />
<RARITY metaname="R" />
<POWER value="4" />
<TOUGHNESS value="7" />
<TOKEN_REGISTRATION reservation="4" type="TOKEN_MYR_1_1_6548987" />
<TRIGGERED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Myr Battlesphere enters the battlefield, put four 1/1 colorless Myr artifact creature tokens onto the battlefield.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quando la Sfera da Battaglia Myr entra nel campo di battaglia, metti sul campo di battaglia quattro pedine creatura artefatto Myr 1/1 incolori.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wenn die Myr-Kampfkugel ins Spiel kommt, bringe vier 1/1 farblose Myr-Artefaktkreaturenspielsteine ins Spiel.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quand la Sphère de bataille myr arrive sur le champ de bataille, mettez sur le champ de bataille quatre jetons de créature-artefact 1/1 incolore Myr.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cuando la Esfera de batalla myr entre al campo de batalla, pon en el campo de batalla cuatro fichas de criatura artefacto Myr incoloras 1/1.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[マイアの戦闘球が戦場に出たとき、無色の1/1のマイア・アーティファクト・クリーチャー・トークンを4体戦場に出す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When Myr Battlesphere enters the battlefield, put four 1/1 colorless Myr artifact creature tokens onto the battlefield.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда Боевой Шар Миэров выходит на поле битвы, положите на поле битвы четыре фишки артефактного существа 1/1 бесцветный Миэр.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Quando Esfera de Batalha Myr entrar no campo de batalha, coloque no campo de batalha quatro fichas de criatura artefato incolores 1/1 do tipo Myr.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
<RESOLUTION_TIME_ACTION>
local token_count = 4
if token_count > 0 then
MTG():PutTokensIntoPlay( "TOKEN_MYR_1_1_6548987", token_count, EffectController() )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Myr Battlesphere attacks, you may tap X untapped Myr you control. If you do, Myr Battlesphere gets +X/+0 until end of turn and deals X damage to defending player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta la Sfera da Battaglia Myr attacca, puoi TAPpare X Myr STAPpati che controlli. Se lo fai, la Sfera da Battaglia Myr prende +X/+0 fino alla fine del turno e infligge X danni al giocatore in difesa.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn die Myr-Kampfkugel angreift, kannst du X ungetappte Myr, die du kontrollierst, tappen. Falls du dies tust, erhält die Myr-Kampfkugel +X/+0 bis zum Ende des Zuges und fügt dem verteidigenden Spieler X Schadenspunkte zu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que la Sphère de bataille myr attaque, vous pouvez engager X myrs dégagés que vous contrôlez. Si vous faites ainsi, la Sphère de bataille myr gagne +X/+0 jusqu'à la fin du tour et inflige X blessures au joueur défenseur.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que la Esfera de batalla myr ataque, puedes girar X Myr enderezados que controles. Si lo haces, la Esfera de batalla myr obtiene +X/+0 hasta el final del turno y hace X puntos de daño al jugador defensor.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[マイアの戦闘球が攻撃するたび、あなたはあなたがコントロールするアンタップ状態のマイアをX体タップしてもよい。 そうした場合、マイアの戦闘球はターン終了時まで+X/+0の修整を受けるとともに、防御プレイヤーにX点のダメージを与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever Myr Battlesphere attacks, you may tap X untapped Myr you control. If you do, Myr Battlesphere gets +X/+0 until end of turn and deals X damage to defending player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз когда Боевой Шар Миэров атакует, вы можете повернуть X неповернутых Миэров под вашим контролем. Если вы это делаете, Боевой Шар Миэров получает +X/+0 до конца хода и наносит X повреждений защищующемуся игроку.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que Esfera de Batalha Myr ataca, você pode virar X Myr desvirados que você controla. Se fizer isso, Esfera de Batalha Myr recebe +X/+0 até o final do turno e causa X pontos de dano ao jogador defensor.]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKING" simple_qualifier="self" />
<RESOLUTION_TIME_ACTION>
MTG():EffectDataChest():Set_Int(1, 0)
local filter = Object():GetFilter()
local player = Object():GetPlayer()
filter:Clear()
filter:NotTargetted()
filter:SetPlayer( player )
filter:SetZone( ZONE_IN_PLAY )
filter:AddCardType( CARD_TYPE_CREATURE )
filter:AddSubType( CREATURE_TYPE_MYR )
filter:AddExtra( FILTER_EXTRA_CREATURE_UNTAPPED )
filter:May()
filter:AIMay()
local max_myrs = filter:Count()
if max_myrs > 0 then
player:SetTargetCount(max_myrs)
for i=0,max_myrs-1 do
player:SetTargetPrompt( i, "CARD_QUERY_TAP_AN_UNTAPPED_MYR_YOU_CONTROL" )
end
player:ChooseTargets( 0, EffectDC():Make_Targets(0) )
EffectDC():Int_Set( 1, max_myrs )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local max_myrs = EffectDC():Int_Get( 1 )
local targetDC = EffectDC():Get_Targets(0)
local num_tapped = 0
local to_tap_array = {}
if max_myrs > 0 and targetDC ~= nil then
for i=0,max_myrs-1 do
local target_card = targetDC:Get_NthCardPtr(i)
if target_card ~= nil then
to_tap_array[num_tapped] = target_card
num_tapped = num_tapped + 1
end
end
if num_tapped > 0 then
for i=0,num_tapped-1 do
if to_tap_array[i] ~= nil then
to_tap_array[i]:Tap()
end
end
end
EffectDC():Set_Int(2, num_tapped)
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local tap_count = EffectDC():Get_Int(2)
local defending_player = Object():GetPlayerAttacked()
if tap_count > 0 and defending_player ~= nil then
defending_player:DealDamage(tap_count, Object())
end
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="7C">
local tap_count = EffectDC():Get_Int(2)
if tap_count >0 and Object():GetZone() == ZONE_IN_PLAY then
Object():GetCurrentCharacteristics():Power_Add( tap_count )
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
</TRIGGERED_ABILITY>
<SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
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: 2189
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Lodestone Myr
by skullblakka » 18 Oct 2012, 16:08
yeah it works
tanks a lot again
i have to practice
tanks a lot again
i have to practice
apology my so bad english speaking 
-

skullblakka - Posts: 71
- Joined: 31 Jul 2012, 20:16
- Has thanked: 16 times
- Been thanked: 17 times
Re: Lodestone Myr
by skullblakka » 24 Oct 2012, 22:03
hi!
i'm still posting here to not create an other post for each card i need help
so i'm making an other deck and i'm stuck on this card -> Prototype Portal
i didn't found anywhere an other card that use the converted manacost of an exiled card as a cost for an ability
i'm now here (it isn't complete) and i don't know the things i did are good and what i have to do to finish this card
i'm still posting here to not create an other post for each card i need help
so i'm making an other deck and i'm stuck on this card -> Prototype Portal
i didn't found anywhere an other card that use the converted manacost of an exiled card as a cost for an ability
i'm now here (it isn't complete) and i don't know the things i did are good and what i have to do to finish this card
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="PROTOTYPE_PORTAL_209009" />
<CARDNAME text="PROTOTYPE_PORTAL" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Prototype Portal]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Portale Prototipo]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Prototyp-Portal]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Portail prototype]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Portal prototipo]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[試作品の扉]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Prototype Portal]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Портал Прототипов]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Portal de Protótipos]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="209009" />
<ARTID value="A209009" />
<ARTIST name="Drew Baker" />
<CASTING_COST cost="{4}" />
<TYPE metaname="Artifact" />
<EXPANSION value="DPG" />
<RARITY metaname="R" />
<TRIGGERED_ABILITY dangerous="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Imprint — When Prototype Portal enters the battlefield, you may exile an artifact card from your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Imprimere — Quando il Portale Prototipo entra nel campo di battaglia, puoi esiliare una carta artefatto dalla tua mano.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Einprägen — Wenn das Prototyp-Portal ins Spiel kommt, kannst du eine Artefaktkarte aus deiner Hand ins Exil schicken.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Empreinte — Quand le Portail prototype arrive sur le champ de bataille, vous pouvez exiler une carte d'artefact de votre main.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Estampa — Cuando el Portal prototipo entre al campo de batalla, puedes exiliar una carta de artefacto de tu mano.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[刻印 ― 試作品の扉が戦場に出たとき、あなたはあなたの手札にあるアーティファクト・カードを1枚追放してもよい。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Imprint — When Prototype Portal enters the battlefield, you may exile an artifact card from your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Отпечаток — Когда Портал Прототипов выходит на поле битвы, вы можете изгнать карту артефакта из вашей руки.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Estampar — Quando Portal de Protótipos entra no campo de batalha, você pode exilar um card de artefato da sua mão.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:SetPlayer( player )
filter:SetOwner( EffectController() )
filter:SetZone( ZONE_HAND )
filter:AddCardType( CARD_TYPE_ACTIFACT )
filter:NotTargetted()
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION target_choosing="1">
EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_PLAYER", EffectDC():Make_Targets(0) )
</PLAY_TIME_ACTION>
player:ChooseTarget( NO_VALIDATION, "CARD_QUERY_CHOOSE_CARD_TO_EXILE", EffectDC():Make_Targets(0) )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
local count = ObjectDC():Get_Int(0)
local chest = ObjectDC():Get_Chest(1)
if target ~= nil then
target:RemoveFromGame()
target:NailOnto( Object() )
if chest == nil then
chest = ObjectDC():Make_Chest(1)
end
chest:Set_CardPtr(count, target)
count = count+1
ObjectDC():Set_Int(0, count)
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{X}, {T}: Put a token that's a copy of the exiled card onto the battlefield. X is the converted mana cost of that card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{X}, {T}: Metti sul campo di battaglia una pedina che è una copia della carta esiliata. X è il costo di mana convertito di quella carta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{X}, {T}: Bringe einen Spielstein ins Spiel, der eine Kopie der ins Exil geschickten Karte ist. X sind die umgewandelten Manakosten dieser Karte.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{X}, {T} : Mettez sur le champ de bataille un jeton qui est une copie de la carte exilée. X est le coût converti de mana de cette carte.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{X}, {T}: Pon en el campo de batalla una ficha que es una copia de la carta exiliada. X es el coste de maná convertido de esa carta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{X}, {T}:その追放されているカードのコピーであるトークンを1つ戦場に出す。 Xはそのカードの点数で見たマナ・コストに等しい。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{X}, {T}: Put a token that's a copy of the exiled card onto the battlefield. X is the converted mana cost of that card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{X}, {T}: положите на поле битвы фишку, которая является копией изгнанной карты. X — это конвертированная мана-стоимость той карты.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{X}, {T}: Coloque no campo de batalha uma ficha que seja uma cópia do card exilado. X é o custo de mana convertido daquele card.]]></LOCALISED_TEXT>
</TRIGGERED_ABILITY>
</CARD_V2>
apology my so bad english speaking 
-

skullblakka - Posts: 71
- Joined: 31 Jul 2012, 20:16
- Has thanked: 16 times
- Been thanked: 17 times
Re: Lodestone Myr
by thefiremind » 25 Oct 2012, 08:33
I guess you'll have to do everything manually, with CanAfford for checking the availability of the activated ability, and TapLand for tapping the necessary mana. You'll have the usual TapLand problem that won't let you select the color combination, but we all live with 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: Lodestone Myr
by skullblakka » 25 Oct 2012, 14:59
yeah i tryed but my knowledge isn't enough, for now i just copy and past some parts of some cards witch does the same (or almost) thing, and try to tranform it to make the card i want.thefiremind wrote:I guess you'll have to do everything manually, with CanAfford for checking the availability of the activated ability, and TapLand for tapping the necessary mana. You'll have the usual TapLand problem that won't let you select the color combination, but we all live with it.
but sometimes like now i can't
I don't understand what means the "CanAfford" and how to use it
my problem isn't on tapping the lands i want, i know DOTP13 sucks for that but i don't understood how to save the converted mana cost of the exiled card and use it on the activated ability as the cost of it (so use TapLand).
apology my so bad english speaking 
-

skullblakka - Posts: 71
- Joined: 31 Jul 2012, 20:16
- Has thanked: 16 times
- Been thanked: 17 times
Re: Lodestone Myr
by RiiakShiNal » 25 Oct 2012, 17:09
When you imprint the card you can store the converted mana cost in the ObjectDC which you can then access later from the activated ability.
Example of saving the CMC:
Example of saving the CMC:
- Code: Select all
ObjectDC():Int_Set( 0, oImprintCard:GetConvertedManaCost() )
- Code: Select all
local nCMC = ObjectDC():Int_Get( 0 )
- Code: Select all
local nHaveEnough = oPlayer:CanAfford("{"..nCMC.."}")
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: 2189
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Lodestone Myr
by skullblakka » 25 Oct 2012, 21:35
ok thanks to both of you!
with some hours of work (yeah i'm so bad!)i'm now here
i can choose an artifact on my hand and copy it but Prototype Portal doesn't care about the CMC and so i copy cards for free :/
can someone say me what's wrong?
with some hours of work (yeah i'm so bad!)i'm now here
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="PROTOTYPE_PORTAL_209009" />
<CARDNAME text="PROTOTYPE_PORTAL" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Prototype Portal]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Portale Prototipo]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Prototyp-Portal]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Portail prototype]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Portal prototipo]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[試作品の扉]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Prototype Portal]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Портал Прототипов]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Portal de Protótipos]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="209009" />
<ARTID value="209009" />
<ARTIST name="Drew Baker" />
<CASTING_COST cost="{4}" />
<TYPE metaname="Artifact" />
<EXPANSION value="DPG" />
<RARITY metaname="R" />
<TRIGGERED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Imprint — When Prototype Portal enters the battlefield, you may exile an artifact card from your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Imprimere — Quando il Portale Prototipo entra nel campo di battaglia, puoi esiliare una carta artefatto dalla tua mano.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Einprägen — Wenn das Prototyp-Portal ins Spiel kommt, kannst du eine Artefaktkarte aus deiner Hand ins Exil schicken.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Empreinte — Quand le Portail prototype arrive sur le champ de bataille, vous pouvez exiler une carte d'artefact de votre main.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Estampa — Cuando el Portal prototipo entre al campo de batalla, puedes exiliar una carta de artefacto de tu mano.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[刻印 ― 試作品の扉が戦場に出たとき、あなたはあなたの手札にあるアーティファクト・カードを1枚追放してもよい。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Imprint — When Prototype Portal enters the battlefield, you may exile an artifact card from your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Отпечаток — Когда Портал Прототипов выходит на поле битвы, вы можете изгнать карту артефакта из вашей руки.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Estampar — Quando Portal de Protótipos entra no campo de batalha, você pode exilar um card de artefato da sua mão.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
<RESOLUTION_TIME_ACTION>
local filter = Object():GetFilter()
local effectController = EffectController()
filter:Clear()
filter:SetZone( ZONE_HAND )
filter:AddCardType( CARD_TYPE_ARTIFACT )
filter:SetHint( HINT_ALLIED_ONLY, EffectController() )
filter:NotTargetted()
filter:May()
filter:SetPlayer( effectController )
effectController:ChooseTarget( NO_VALIDATION, "CARD_QUERY_CHOOSE_CARD_TO_EXILE", EffectDC():Make_Targets(0) )
ObjectDC():Int_Set( 0, oImprintCard:GetConvertedManaCost() )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
local count = ObjectDC():Get_Int(0)
local chest = ObjectDC():Get_Chest(1)
if target ~= nil then
target:RemoveFromGame()
target:NailOnto( Object() )
if chest == nil then
chest = ObjectDC():Make_Chest(1)
end
chest:Set_CardPtr(0, target)
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<ACTIVATED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{X}, {T}: Put a token that's a copy of the exiled card onto the battlefield. X is the converted mana cost of that card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{X}, {T}: Metti sul campo di battaglia una pedina che è una copia della carta esiliata. X è il costo di mana convertito di quella carta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{X}, {T}: Bringe einen Spielstein ins Spiel, der eine Kopie der ins Exil geschickten Karte ist. X sind die umgewandelten Manakosten dieser Karte.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{X}, {T} : Mettez sur le champ de bataille un jeton qui est une copie de la carte exilée. X est le coût converti de mana de cette carte.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{X}, {T}: Pon en el campo de batalla una ficha que es una copia de la carta exiliada. X es el coste de maná convertido de esa carta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{X}, {T}:その追放されているカードのコピーであるトークンを1つ戦場に出す。 Xはそのカードの点数で見たマナ・コストに等しい。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{X}, {T}: Put a token that's a copy of the exiled card onto the battlefield. X is the converted mana cost of that card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{X}, {T}: положите на поле битвы фишку, которая является копией изгнанной карты. X — это конвертированная мана-стоимость той карты.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{X}, {T}: Coloque no campo de batalha uma ficha que seja uma cópia do card exilado. X é o custo de mana convertido daquele card.]]></LOCALISED_TEXT>
<COST type="TapSelf" />
<PLAY_TIME_ACTION>
local player = EffectController()
local nCMC = ObjectDC():Int_Get( 0 )
local nHaveEnough = oPlayer:CanAfford("{"..nCMC.."}")
if player:CanAfford("{"..nCMC.."}") then
player:TapLand(nCMC)
end
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target_DC = ObjectDC():Get_Chest(1)
if target_DC ~= nil then
EffectController():ChooseTargetFromDCWithFlags( NO_VALIDATION, "CARD_QUERY_CHOOSE_SPELL_TO_COPY", target_DC, EffectDC():Make_Targets(0), QUERY_FLAG_CAN_BE_FINISHED_EARLY)
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local chest = EffectDC():Get_Targets(0)
if chest ~= nil then
local spell = chest:Get_CardPtr(0)
local player = EffectController()
if player ~= nil then
if spell ~= nil then
player:CopySpellAndCastIt( spell )
end
end
end
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
</CARD_V2>
i can choose an artifact on my hand and copy it but Prototype Portal doesn't care about the CMC and so i copy cards for free :/
can someone say me what's wrong?
apology my so bad english speaking 
-

skullblakka - Posts: 71
- Joined: 31 Jul 2012, 20:16
- Has thanked: 16 times
- Been thanked: 17 times
Re: Lodestone Myr
by thefiremind » 26 Oct 2012, 08:35
CanAfford must be compared with 0 or 1 as most other functions, otherwise you are basically asking if the result of that function exists (which would be always true):
- Code: Select all
if player:CanAfford("{"..nCMC.."}") == 1 then
- Code: Select all
player:TapLand("{"..nCMC.."}")
- Code: Select all
<AVAILABILITY>
local player = EffectController()
local nCMC = ObjectDC():Int_Get( 0 )
local nHaveEnough = oPlayer:CanAfford("{"..nCMC.."}")
return player:CanAfford("{"..nCMC.."}") == 1
</AVAILABILITY>
< 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: Lodestone Myr
by skullblakka » 26 Oct 2012, 16:22
thx! the activated ability is now never available
(joke)
so i think the avaibility is good but i didn't use the save of the CMC as well.
maybe isn't on the right slot?
well i'm bored of thoose 3 last days i tryed to make this card so can you please finish to code it then i can compare what's wrong?
so i think the avaibility is good but i didn't use the save of the CMC as well.
maybe isn't on the right slot?
well i'm bored of thoose 3 last days i tryed to make this card so can you please finish to code it then i can compare what's wrong?
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="PROTOTYPE_PORTAL_209009" />
<CARDNAME text="PROTOTYPE_PORTAL" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Prototype Portal]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Portale Prototipo]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Prototyp-Portal]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Portail prototype]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Portal prototipo]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[試作品の扉]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Prototype Portal]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Портал Прототипов]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Portal de Protótipos]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="209009" />
<ARTID value="209009" />
<ARTIST name="Drew Baker" />
<CASTING_COST cost="{4}" />
<TYPE metaname="Artifact" />
<EXPANSION value="DPG" />
<RARITY metaname="R" />
<TRIGGERED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Imprint — When Prototype Portal enters the battlefield, you may exile an artifact card from your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Imprimere — Quando il Portale Prototipo entra nel campo di battaglia, puoi esiliare una carta artefatto dalla tua mano.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Einprägen — Wenn das Prototyp-Portal ins Spiel kommt, kannst du eine Artefaktkarte aus deiner Hand ins Exil schicken.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Empreinte — Quand le Portail prototype arrive sur le champ de bataille, vous pouvez exiler une carte d'artefact de votre main.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Estampa — Cuando el Portal prototipo entre al campo de batalla, puedes exiliar una carta de artefacto de tu mano.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[刻印 ― 試作品の扉が戦場に出たとき、あなたはあなたの手札にあるアーティファクト・カードを1枚追放してもよい。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Imprint — When Prototype Portal enters the battlefield, you may exile an artifact card from your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Отпечаток — Когда Портал Прототипов выходит на поле битвы, вы можете изгнать карту артефакта из вашей руки.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Estampar — Quando Portal de Protótipos entra no campo de batalha, você pode exilar um card de artefato da sua mão.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
<RESOLUTION_TIME_ACTION>
local filter = Object():GetFilter()
local effectController = EffectController()
filter:Clear()
filter:SetZone( ZONE_HAND )
filter:AddCardType( CARD_TYPE_ARTIFACT )
filter:SetHint( HINT_ALLIED_ONLY, EffectController() )
filter:NotTargetted()
filter:May()
filter:SetPlayer( effectController )
effectController:ChooseTarget( NO_VALIDATION, "CARD_QUERY_CHOOSE_CARD_TO_EXILE", EffectDC():Make_Targets(0) )
ObjectDC():Int_Set( 0, oImprintCard:GetConvertedManaCost() )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
local count = ObjectDC():Get_Int(0)
local chest = ObjectDC():Get_Chest(1)
if target ~= nil then
target:RemoveFromGame()
target:NailOnto( Object() )
if chest == nil then
chest = ObjectDC():Make_Chest(1)
end
chest:Set_CardPtr(0, target)
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<ACTIVATED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{X}, {T}: Put a token that's a copy of the exiled card onto the battlefield. X is the converted mana cost of that card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{X}, {T}: Metti sul campo di battaglia una pedina che è una copia della carta esiliata. X è il costo di mana convertito di quella carta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{X}, {T}: Bringe einen Spielstein ins Spiel, der eine Kopie der ins Exil geschickten Karte ist. X sind die umgewandelten Manakosten dieser Karte.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{X}, {T}: Mettez sur le champ de bataille un jeton qui est une copie de la carte exilée. X est le coût converti de mana de cette carte.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{X}, {T}: Pon en el campo de batalla una ficha que es una copia de la carta exiliada. X es el coste de maná convertido de esa carta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{X}, {T}:その追放されているカードのコピーであるトークンを1つ戦場に出す。 Xはそのカードの点数で見たマナ・コストに等しい。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{X}, {T}: Put a token that's a copy of the exiled card onto the battlefield. X is the converted mana cost of that card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{X}, {T}: положите на поле битвы фишку, которая является копией изгнанной карты. X — это конвертированная мана-стоимость той карты.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{X}, {T}: Coloque no campo de batalha uma ficha que seja uma cópia do card exilado. X é o custo de mana convertido daquele card.]]></LOCALISED_TEXT>
<COST type="TapSelf" />
<AVAILABILITY>
local player = Object():GetController()
local nCMC = ObjectDC():Int_Get( 0 )
local nHaveEnough = Player:CanAfford("{"..nCMC.."}")
return oplayer:CanAfford("{"..nCMC.."}") == 1
</AVAILABILITY>
<PLAY_TIME_ACTION>
local player = EffectController()
local nCMC = ObjectDC():Int_Get( 0 )
local nHaveEnough = oPlayer:CanAfford("{"..nCMC.."}")
if player:CanAfford("{"..nCMC.."}") == 1 then
player:TapLand("{"..nCMC.."}")
end
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target_DC = ObjectDC():Get_Chest(1)
if target_DC ~= nil then
EffectController():ChooseTargetFromDCWithFlags( NO_VALIDATION, "CARD_QUERY_CHOOSE_SPELL_TO_COPY", target_DC, EffectDC():Make_Targets(0), QUERY_FLAG_CAN_BE_FINISHED_EARLY)
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local chest = EffectDC():Get_Targets(0)
if chest ~= nil then
local spell = chest:Get_CardPtr(0)
local player = EffectController()
if player ~= nil then
if spell ~= nil then
player:CopySpellAndCastIt( spell )
end
end
end
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
</CARD_V2>
apology my so bad english speaking 
-

skullblakka - Posts: 71
- Joined: 31 Jul 2012, 20:16
- Has thanked: 16 times
- Been thanked: 17 times
Re: Lodestone Myr
by thefiremind » 26 Oct 2012, 16:40
In your availability block you are using player, Player and oplayer... decide one name for the variable and use it.
To be honest, I didn't notice that the "nHaveEnough" variable is useless there, you can remove the line that defines it.
EDIT: About the CMC, I wouldn't save it in a register... you can always read it from the exiled card, if there is an exiled card. Summing it up, I think that the code needs a cleanup, I'll see if I can do something later.
EDIT: About the CMC, I wouldn't save it in a register... you can always read it from the exiled card, if there is an exiled card. Summing it up, I think that the code needs a cleanup, I'll see if I can do something later.
< 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: Lodestone Myr
by skullblakka » 26 Oct 2012, 17:48
yeah i think i tryed to inspire me from too much differents cards
thanks to take your time for me that allways pleased
thanks to take your time for me that allways pleased
apology my so bad english speaking 
-

skullblakka - Posts: 71
- Joined: 31 Jul 2012, 20:16
- Has thanked: 16 times
- Been thanked: 17 times
23 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 2 guests