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 NeoAnderson » 09 Jan 2014, 15:26
There is a possibility to make heroic recognize Bestow as it is coded.MC Brodie wrote:Is there a way we could hack a workaround so heroic recognizes bestow? For example have the bestow cards grant heroic cards an ability that fires the appropriate trigger for heroic when targeted by a bestow creature.
Also, if you are still looking for heroic cards Neo you can definitely find them in thefiremind's mod. There may be some in sumomole's mod or drlegends. Though I didn't notice any heroic cards in sumo's card list from the quick glance I took.
I made some tests with :
A. Firemind card Fabled Hero (Works with a modify)
B. Sumomole card Tormented Hero (Works with a modify)
The main problem we have is always the same, Bestow doesn't target the card before to be played. So the trigger SPELL_PLAYED fires before we have targeted the creature. For this reason cards with heroic as coded wouldn't trigger.
There is a secondary problem, Sumomole uses a different approach he uses 2 combined trigger "SPELL_PLAYED" and "BECOME_TARGET_OF_SPELL", how i coded Bestow the targetting action is made into Trigger ability, so when it targets a creature it is a target of an ability.
To make sumomole version working with this Bestow we can add another trigger "BECOME_TARGET_OF_ABILITY" and copy the effect into this trigger.
Now we only needs to be sure it will works only with creature with Bestow, i haven't tried but i think we can use a player datachest to set a value to recognize the card with bestow.
I have reolved this problem but this means that if we want to use thi Bestow we need to code Heroic cards considering this implementation!
FIRST OF ALL I HAVE RESIVED THE CARD WITH BESTOW ADDING A VALUE INTO A PLAYER DATA CHEST.
- Celestial Archon REV 5.0 | Open
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="CELESTIAL_ARCHON_373503" />
<CARDNAME text="CELESTIAL_ARCHON" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Celestial Archon]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Archonte céleste]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Arconte celestial]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Himmlischer Archon]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Arconte Celeste]]></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[Arconte Celestial]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="373503" />
<ARTID value="373503" />
<ARTIST name="Matt Stewart" />
<CASTING_COST cost="{3}{W}{W}" />
<TYPE metaname="Enchantment" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Archon" />
<EXPANSION value="THS" />
<RARITY metaname="R" />
<POWER value="4" />
<TOUGHNESS value="4" />
<UTILITY_ABILITY qualifier="Alternate" active_zone="ZONE_HAND">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Bestow {5}{W}{W}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Grâce {5}{W}{W}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Concesión {5}{W}{W}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Göttergabe {5}{W}{W}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Conferire {5}{W}{W}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[授与 {5}{W}{W} (このカードを授与コストで唱えた場合、これはエンチャント]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[권능 {5}{W}{W}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Дар {5}{W}{W}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Agraciar {5}{W}{W}]]></LOCALISED_TEXT>
<ABILITY_TEXT tag="CARD_QUERY_OPTION_BESTOW_CELESTIAL_ARCHON" />
<COST mana_cost="{5}{W}{W}" type="Mana" />
<COST type="Generic">
<PREREQUISITE>
MTG():ClearFilterMark()
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
filter:SetZone( ZONE_BATTLEFIELD )
local filter_count = filter:EvaluateObjects()
local characteristics = Object():GetCurrentCharacteristics()
local card_type = characteristics:CardType_GetWritable()
local sub_type = characteristics:SubType_GetWritable()
sub_type:ClearAllOfType( CARD_TYPE_CREATURE )
card_type:Clear()
card_type:Add( CARD_TYPE_ENCHANTMENT )
sub_type:Add( ENCHANTMENT_TYPE_AURA )
for i=0,filter_count-1 do
local permanent = filter:GetNthEvaluatedObject(i)
if permanent:GetCurrentCharacteristics():Bool_Get( CHARACTERISTIC_SHROUD ) == false then
if Object():CanAttachTo(permanent) then
permanent:MarkForFilter()
end
end
end
filter:SetMarkedObjectsOnly()
local count = filter:Count()
if count > 0 then
return true
else
return false
end
</PREREQUISITE>
<RESOLUTION_TIME_ACTION>
if Object() ~= nil then
local refplayer = Object():GetPlayer()
local Chest_Id = Object():GetRef()
local chest = refplayer:PlayerDataChest():Make_Chest(Chest_Id)
chest:Set_CardPtr(1, Object())
local delayDC = EffectDC():Make_Chest(1)
delayDC:Set_CardPtr(0, Object())
delayDC:Protect_CardPtr(0)
MTG():CreateDelayedTrigger(1, delayDC)
end
</RESOLUTION_TIME_ACTION>
</COST>
</UTILITY_ABILITY>
<TRIGGERED_ABILITY resource_id="1" linked_ability_group="1">
<TRIGGER value="SPELL_PLAYED" simple_qualifier="self" />
<CLEANUP fire_once="1"/>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_ENCHANT" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</TARGET_DEFINITION>
<PLAY_TIME_ACTION>
if Object() ~= nil then
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local characteristics = Object():GetCurrentCharacteristics()
local card_type = characteristics:CardType_GetWritable()
local sub_type = characteristics:SubType_GetWritable()
sub_type:ClearAllOfType( CARD_TYPE_CREATURE )
card_type:Clear()
card_type:Add( CARD_TYPE_ENCHANTMENT )
sub_type:Add( ENCHANTMENT_TYPE_AURA )
local delayDC = EffectDC():Make_Chest(1)
delayDC:Set_CardPtr(0, target)
--local refplayer = target:GetPlayer()
--local chest = refplayer:PlayerDataChest():Make_Chest(6000)
--chest:Set_Int(1,1)
MTG():CreateDelayedTrigger(2, delayDC)
end
end
</PLAY_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id="2" linked_ability_group="1" replacement_query="1" active_zone="ZONE_TRANSITION">
<TRIGGER value="ZONECHANGE_CONSIDERED" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" pre_trigger="1" />
<CLEANUP fire_once="1"/>
<PLAY_TIME_ACTION>
if Object() ~= nil then
local target = EffectDC():Get_CardPtr(0)
if target ~= nil then
LinkedDC():Set_Int(0,1)
local delayDC = EffectDC():Make_Chest(1)
delayDC:Set_CardPtr(0, target)
MTG():CreateDelayedTrigger(3, delayDC)
end
end
</PLAY_TIME_ACTION>
<CONTINUOUS_ACTION layer="4">
local target = EffectDC():Get_CardPtr(0)
if target ~= nil then
local characteristics = Object():GetCurrentCharacteristics()
local card_type = characteristics:CardType_GetWritable()
local sub_type = characteristics:SubType_GetWritable()
sub_type:ClearAllOfType( CARD_TYPE_CREATURE )
card_type:Clear()
card_type:Add( CARD_TYPE_ENCHANTMENT )
sub_type:Add( ENCHANTMENT_TYPE_AURA )
Object():Attach(target)
end
</CONTINUOUS_ACTION>
<DURATION>
local target = EffectDC():Get_CardPtr(0)
if (target == nil) or (target:GetCardType():Test(CARD_TYPE_CREATURE) == false) or (Object() == nil) or (LinkedDC():Get_Int(0) == 2) or (Object():GetZone() == ZONE_GRAVEYARD) or (Object():GetZone() == ZONE_HAND) or (Object():GetZone() == ZONE_EXILE) or (Object():GetZone() == ZONE_LIBRARY) then
return true
end
</DURATION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id="3" linked_ability_group="1" replacement_effect="1">
<TRIGGER value="UNATTACHED_FROM_CREATURE" simple_qualifier="self" pre_trigger="1"/>
<CLEANUP fire_once="1" />
<RESOLUTION_TIME_ACTION>
LinkedDC():Set_Int(0,2)
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="4">
local characteristics = Object():GetCurrentCharacteristics()
local card_type = characteristics:CardType_GetWritable()
local sub_type = characteristics:SubType_GetWritable()
sub_type:ClearAllOfType( CARD_TYPE_ENCHANTMENT )
card_type:Clear()
card_type:Add( CARD_TYPE_CREATURE )
card_type:Add( CARD_TYPE_ENCHANTMENT )
sub_type:Add( CREATURE_TYPE_ARCHON )
</CONTINUOUS_ACTION>
<DURATION>
return (Object == nil)
</DURATION>
</TRIGGERED_ABILITY>
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flying, first strike]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vol, initiative]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Vuela, daña primero.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fliegend, Erstschlag]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Volare, attacco improvviso]]></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[Voar, iniciativa]]></LOCALISED_TEXT>
<INTRINSIC characteristic="CHARACTERISTIC_FLYING" />
<INTRINSIC characteristic="CHARACTERISTIC_FIRST_STRIKE" />
</STATIC_ABILITY>
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchanted creature gets +4/+4 and has flying and first strike.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[La créature enchantée gagne +4/+4 et a le vol et l’initiative.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[La criatura encantada obtiene +4/+4 y tiene las habilidades de volar y dañar primero.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Die verzauberte Kreatur erhält +4/+4 und hat Flugfähigkeit und Erstschlag.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La creatura incantata prende +4/+4 e ha volare e attacco improvviso.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャントされているクリーチャーは、+4/+4の修整を受けるとともに飛行と先制攻撃を持つ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[부여된 생물은 +4/+4를 받고 비행 능력과 선제공격 능력을 가진다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Зачарованное существо получает +4/+4 и имеет Полет и Первый удар.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[A criatura encantada recebe +4/+4 e tem voar e iniciativa.]]></LOCALISED_TEXT>
<CONTINUOUS_ACTION layer="7C">
local parent = Object():GetParent()
if parent ~= nil then
parent:GetCurrentCharacteristics():Power_Add( 4 )
parent:GetCurrentCharacteristics():Toughness_Add( 4 )
end
</CONTINUOUS_ACTION>
<CONTINUOUS_ACTION layer="6">
local parent = Object():GetParent()
if parent ~= nil then
parent:GetCurrentCharacteristics():Bool_Set( CHARACTERISTIC_FLYING, 1 )
parent:GetCurrentCharacteristics():Bool_Set( CHARACTERISTIC_FIRST_STRIKE, 1 )
end
</CONTINUOUS_ACTION>
</STATIC_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>
Example card with Heroic by Sumomole :
- Tormented Hero | Open
- Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="TORMENTED_HERO_627360" />
<CARDNAME text="TORMENTED_HERO" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Tormented Hero]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Héros tourmenté]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Héroe atormentado]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Gepeinigter Held]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Eroe Tormentato]]></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[Herói Atormentado]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[落难英雄]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[落難英雄]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="627360" />
<ARTID value="627360" />
<ARTIST name="Winona Nelson" />
<CASTING_COST cost="{B}" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Human" />
<SUB_TYPE metaname="Warrior" />
<EXPANSION value="DPI" />
<RARITY metaname="U" />
<POWER value="2" />
<TOUGHNESS value="1" />
<TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Tormented Hero enters the battlefield tapped.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Le Héros tourmenté arrive sur le champ de bataille engagé.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El Héroe atormentado entra al campo de batalla girado.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Der Gepeinigte Held kommt getappt ins Spiel.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[L’Eroe Tormentato entra nel campo di battaglia TAPpato.]]></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[Herói Atormentado entra no campo de batalha virado.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[落难英雄须横置进战场。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[落難英雄須橫置進戰場。]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" pre_trigger="1" />
<RESOLUTION_TIME_ACTION>
if TriggerObject() ~= nil then
TriggerObject():Tap()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[|Heroic| — Whenever you cast a spell that targets Tormented Hero, each opponent loses 1 life. You gain life equal to the life lost this way.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[|Héroïque| — À chaque fois que vous lancez un sort qui cible le Héros tourmenté, chaque adversaire perd 1 point de vie. Vous gagnez autant de points de vie que ceux perdus de cette manière.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[|Heroísmo| — Siempre que lances un hechizo que haga objetivo al Héroe atormentado, cada oponente pierde 1 vida. Ganas vidas igual a la cantidad de vidas perdidas de esta manera.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[|Heroisch| — Immer wenn du einen Zauberspruch wirkst, der den Gepeinigten Helden als Ziel hat, verliert jeder Gegner 1 Lebenspunkt. Du erhältst so viele Lebenspunkte dazu, wie auf diese Weise Lebenspunkte verloren wurden.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[|Eroismo| — Ogniqualvolta lanci una magia che bersaglia l’Eroe Tormentato, ogni avversario perde 1 punto vita. Guadagni tanti punti vita quanti sono i punti vita persi in questo modo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[|英雄的| ― あなたが苛まれし英雄を対象とする呪文を1つ唱えるたび、各対戦相手はそれぞれ1点のライフを失う。あなたはこれにより失われたライフに等しい点数のライフを得る。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[|영웅| — 당신이 괴로워하는 영웅을 목표로 주문을 발동할 때마다, 각 상대는 생명 1점을 잃는다. 당신은 이렇게 잃은 생명점의 합만큼의 생명점을 얻는다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[|Героизм| — Каждый раз, когда вы разыгрываете заклинание, целью которого является Измученный Герой, каждый оппонент теряет 1 жизнь. Вы получаете столько жизней, сколько их было потеряно таким образом.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[|Heroico| — Toda vez que você conjura uma mágica cujo alvo é Herói Atormentado, cada oponente perde 1 ponto de vida. Você ganha uma quantidade de pontos de vida igual ao total de pontos de vida perdidos dessa maneira.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[|勇行|~每当你施放一个以落难英雄为目标的咒语时,每位对手各失去1点生命。你获得若干生命,其数量等同于以此法失去的生命总和。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[|勇行|~每當你施放一個以落難英雄為目標的咒語時,每位對手各失去1點生命。你獲得若干生命,其數量等同於以此法失去的生命總和。]]></LOCALISED_TEXT>
<TRIGGER value="SPELL_PLAYED" simple_qualifier="objectyoucontrol">
if LinkedDC():Get_Int(0) == 1 then
LinkedDC():Set_Int(0, 0)
return true
end
return false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local total = 0
local number = MTG():GetNumberOfPlayers()
for i = 0, (number-1) do
local player = MTG():GetNthPlayer(i)
if player:GetTeam() ~= EffectController():GetTeam() then
player:LoseLife( 1 )
total = total + 1
end
end
EffectController():GainLife( total )
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY linked_ability_group="1" replacement_effect="1">
<TRIGGER value="BECAME_TARGET_OF_SPELL" simple_qualifier="self">
if SecondaryPlayer() == EffectController() and SecondaryObject():WasCast() then
LinkedDC():Set_Int(0, 1)
end
return false
</TRIGGER>
</TRIGGERED_ABILITY>
<SFX text="COMBAT_BLADE_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_BLADE_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
<AI_BASE_SCORE score="600" zone="ZONE_BATTLEFIELD" />
</CARD_V2>
Example card with Heroic modified by Neo :
- Tormented Hero | Open
- Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="TORMENTED_HERO_62736" />
<CARDNAME text="TORMENTED_HERO" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Tormented Hero]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Héros tourmenté]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Héroe atormentado]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Gepeinigter Held]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Eroe Tormentato]]></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[Herói Atormentado]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[落难英雄]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[落難英雄]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="627360" />
<ARTID value="627360" />
<ARTIST name="Winona Nelson" />
<CASTING_COST cost="{B}" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Human" />
<SUB_TYPE metaname="Warrior" />
<EXPANSION value="DPI" />
<RARITY metaname="U" />
<POWER value="2" />
<TOUGHNESS value="1" />
<TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Tormented Hero enters the battlefield tapped.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Le Héros tourmenté arrive sur le champ de bataille engagé.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El Héroe atormentado entra al campo de batalla girado.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Der Gepeinigte Held kommt getappt ins Spiel.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[L’Eroe Tormentato entra nel campo di battaglia TAPpato.]]></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[Herói Atormentado entra no campo de batalha virado.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[落难英雄须横置进战场。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[落難英雄須橫置進戰場。]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" pre_trigger="1" />
<RESOLUTION_TIME_ACTION>
if TriggerObject() ~= nil then
TriggerObject():Tap()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[|Heroic| — Whenever you cast a spell that targets Tormented Hero, each opponent loses 1 life. You gain life equal to the life lost this way.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[|Héroïque| — À chaque fois que vous lancez un sort qui cible le Héros tourmenté, chaque adversaire perd 1 point de vie. Vous gagnez autant de points de vie que ceux perdus de cette manière.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[|Heroísmo| — Siempre que lances un hechizo que haga objetivo al Héroe atormentado, cada oponente pierde 1 vida. Ganas vidas igual a la cantidad de vidas perdidas de esta manera.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[|Heroisch| — Immer wenn du einen Zauberspruch wirkst, der den Gepeinigten Helden als Ziel hat, verliert jeder Gegner 1 Lebenspunkt. Du erhältst so viele Lebenspunkte dazu, wie auf diese Weise Lebenspunkte verloren wurden.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[|Eroismo| — Ogniqualvolta lanci una magia che bersaglia l’Eroe Tormentato, ogni avversario perde 1 punto vita. Guadagni tanti punti vita quanti sono i punti vita persi in questo modo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[|英雄的| ― あなたが苛まれし英雄を対象とする呪文を1つ唱えるたび、各対戦相手はそれぞれ1点のライフを失う。あなたはこれにより失われたライフに等しい点数のライフを得る。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[|영웅| — 당신이 괴로워하는 영웅을 목표로 주문을 발동할 때마다, 각 상대는 생명 1점을 잃는다. 당신은 이렇게 잃은 생명점의 합만큼의 생명점을 얻는다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[|Героизм| — Каждый раз, когда вы разыгрываете заклинание, целью которого является Измученный Герой, каждый оппонент теряет 1 жизнь. Вы получаете столько жизней, сколько их было потеряно таким образом.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[|Heroico| — Toda vez que você conjura uma mágica cujo alvo é Herói Atormentado, cada oponente perde 1 ponto de vida. Você ganha uma quantidade de pontos de vida igual ao total de pontos de vida perdidos dessa maneira.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[|勇行|~每当你施放一个以落难英雄为目标的咒语时,每位对手各失去1点生命。你获得若干生命,其数量等同于以此法失去的生命总和。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[|勇行|~每當你施放一個以落難英雄為目標的咒語時,每位對手各失去1點生命。你獲得若干生命,其數量等同於以此法失去的生命總和。]]></LOCALISED_TEXT>
<TRIGGER value="SPELL_PLAYED" simple_qualifier="objectyoucontrol">
if LinkedDC():Get_Int(0) == 1 then
LinkedDC():Set_Int(0, 0)
return true
end
return false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local total = 0
local number = MTG():GetNumberOfPlayers()
for i = 0, (number-1) do
local player = MTG():GetNthPlayer(i)
if player:GetTeam() ~= EffectController():GetTeam() then
player:LoseLife( 1 )
total = total + 1
end
end
EffectController():GainLife( total )
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY linked_ability_group="1" replacement_effect="1">
<TRIGGER value="BECAME_TARGET_OF_SPELL" simple_qualifier="self">
if SecondaryPlayer() == EffectController() and SecondaryObject():WasCast() then
LinkedDC():Set_Int(0, 1)
end
return false
</TRIGGER>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<TRIGGER value="BECAME_TARGET_OF_ABILITY" simple_qualifier="self">
if SecondaryPlayer() == EffectController() and SecondaryObject():WasCast() then
local refplayer = SecondaryObject():GetPlayer()
local Chest_Id = SecondaryObject():GetRef()
local chest = refplayer:PlayerDataChest():Get_Chest(Chest_Id)
local card = chest:Get_CardPtr(1)
if card ~= nil then
if SecondaryObject() == card then
chest:Clear()
return true
end
end
end
return false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local total = 0
local number = MTG():GetNumberOfPlayers()
for i = 0, (number-1) do
local player = MTG():GetNthPlayer(i)
if player:GetTeam() ~= EffectController():GetTeam() then
player:LoseLife( 1 )
total = total + 1
end
end
EffectController():GainLife( total )
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<SFX text="COMBAT_BLADE_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_BLADE_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
<AI_BASE_SCORE score="600" zone="ZONE_BATTLEFIELD" />
</CARD_V2>
The same can be done with the card made by TheFireMind.
THIS CARD WILL NOT TRIGGER WITH BESTOW
Example card with Heroic by TheFireMind :
- Fabled Hero | Open
- Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="FABLED_HERO_199373606" />
<CARDNAME text="FABLED_HERO" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Fabled Hero]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Héros illustre]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Héroe de leyendas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sagenhafter Held]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Eroe Epico]]></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[Herói Fabuloso]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="199373606" />
<ARTID value="199373606" />
<ARTIST name="Aaron Miller" />
<CASTING_COST cost="{1}{W}{W}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“You. Poet. Be sure to write this down.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Toi. Le poète. N’oublie pas de prendre des notes. »]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“Tú. Poeta. Asegúrate de escribir esto”.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Du. Dichter. Schreib das ja auf.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Tu. Poeta. Assicurati di prendere nota.”]]></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[“Você. Poeta. Não deixe de registrar isso.”]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Human" />
<SUB_TYPE metaname="Soldier" />
<EXPANSION value="THS" />
<RARITY metaname="R" />
<POWER value="2" />
<TOUGHNESS value="2" />
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Double strike]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Double initiative]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Daña dos veces.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Doppelschlag]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Doppio attacco]]></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[Golpe duplo]]></LOCALISED_TEXT>
<INTRINSIC characteristic="CHARACTERISTIC_DOUBLE_STRIKE" />
</STATIC_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[|Heroic| — Whenever you cast a spell that targets Fabled Hero, put a +1/+1 counter on Fabled Hero.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[|Héroïque| — À chaque fois que vous lancez un sort qui cible le Héros illustre, mettez un marqueur +1/+1 sur le Héros illustre.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[|Heroísmo| — Siempre que lances un hechizo que haga objetivo al Héroe de leyendas, pon un contador +1/+1 sobre el Héroe de leyendas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[|Heroisch| — Immer wenn du einen Zauberspruch wirkst, der den Sagenhaften Helden als Ziel hat, lege eine +1/+1-Marke auf den Sagenhaften Helden.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[|Eroismo| — Ogniqualvolta lanci una magia che bersaglia l’Eroe Epico, metti un segnalino +1/+1 sull’Eroe Epico.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[英雄的 ― あなたが威名の英雄を対象とする呪文を1つ唱えるたび、威名の英雄の上に+1/+1カウンターを1個置く。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[|영웅| — 당신이 이름난 영웅을 목표로 주문을 발동할 때마다, 이름난 영웅에 +1/+1 카운터 한 개를 올려놓는다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[|Героизм| — Каждый раз, когда вы разыгрываете заклинание, целью которого является Легендарный Герой, положите один жетон +1/+1 на Легендарного Героя.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[|Heroico| — Toda vez que você conjurar uma mágica cujo alvo seja Herói Fabuloso, coloque um marcador +1/+1 em Herói Fabuloso.]]></LOCALISED_TEXT>
<TRIGGER value="SPELL_PLAYED" simple_qualifier="objectyoucontrol">
return TFM_IsTargetting( TriggerObject(), EffectSource() )
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
end
</RESOLUTION_TIME_ACTION>
<AUTO_SKIP no_effect_source="1" />
</TRIGGERED_ABILITY>
<HELP title="MORE_INFO_BADGE_TITLE_2" body="MORE_INFO_BADGE_BODY_2" zone="ZONE_ANY" />
<SFX text="COMBAT_CHOP_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_CHOP_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
<AI_BASE_SCORE score="150" zone="ZONE_BATTLEFIELD" />
</CARD_V2>
Example card with Heroic modified by Neo :
- Fabled Hero | Open
- Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="FABLED_HERO_1993736" />
<CARDNAME text="FABLED_HERO" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Fabled Hero]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Héros illustre]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Héroe de leyendas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sagenhafter Held]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Eroe Epico]]></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[Herói Fabuloso]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="1993736" />
<ARTID value="199373606" />
<ARTIST name="Aaron Miller" />
<CASTING_COST cost="{1}{W}{W}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“You. Poet. Be sure to write this down.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Toi. Le poète. N’oublie pas de prendre des notes. »]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“Tú. Poeta. Asegúrate de escribir esto”.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Du. Dichter. Schreib das ja auf.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Tu. Poeta. Assicurati di prendere nota.”]]></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[“Você. Poeta. Não deixe de registrar isso.”]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Human" />
<SUB_TYPE metaname="Soldier" />
<EXPANSION value="THS" />
<RARITY metaname="R" />
<POWER value="2" />
<TOUGHNESS value="2" />
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Double strike]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Double initiative]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Daña dos veces.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Doppelschlag]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Doppio attacco]]></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[Golpe duplo]]></LOCALISED_TEXT>
<INTRINSIC characteristic="CHARACTERISTIC_DOUBLE_STRIKE" />
</STATIC_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[|Heroic| — Whenever you cast a spell that targets Fabled Hero, put a +1/+1 counter on Fabled Hero.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[|Héroïque| — À chaque fois que vous lancez un sort qui cible le Héros illustre, mettez un marqueur +1/+1 sur le Héros illustre.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[|Heroísmo| — Siempre que lances un hechizo que haga objetivo al Héroe de leyendas, pon un contador +1/+1 sobre el Héroe de leyendas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[|Heroisch| — Immer wenn du einen Zauberspruch wirkst, der den Sagenhaften Helden als Ziel hat, lege eine +1/+1-Marke auf den Sagenhaften Helden.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[|Eroismo| — Ogniqualvolta lanci una magia che bersaglia l’Eroe Epico, metti un segnalino +1/+1 sull’Eroe Epico.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[英雄的 ― あなたが威名の英雄を対象とする呪文を1つ唱えるたび、威名の英雄の上に+1/+1カウンターを1個置く。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[|영웅| — 당신이 이름난 영웅을 목표로 주문을 발동할 때마다, 이름난 영웅에 +1/+1 카운터 한 개를 올려놓는다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[|Героизм| — Каждый раз, когда вы разыгрываете заклинание, целью которого является Легендарный Герой, положите один жетон +1/+1 на Легендарного Героя.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[|Heroico| — Toda vez que você conjurar uma mágica cujo alvo seja Herói Fabuloso, coloque um marcador +1/+1 em Herói Fabuloso.]]></LOCALISED_TEXT>
<TRIGGER value="SPELL_PLAYED" simple_qualifier="objectyoucontrol">
return TFM_IsTargetting( TriggerObject(), EffectSource() )
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
end
</RESOLUTION_TIME_ACTION>
<AUTO_SKIP no_effect_source="1" />
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<TRIGGER value="BECAME_TARGET_OF_ABILITY" simple_qualifier="self">
if SecondaryPlayer() == EffectController() and SecondaryObject():WasCast() then
local refplayer = SecondaryObject():GetPlayer()
local Chest_Id = SecondaryObject():GetRef()
local chest = refplayer:PlayerDataChest():Get_Chest(Chest_Id)
local card = chest:Get_CardPtr(1)
if card ~= nil then
if SecondaryObject() == card then
chest:Clear()
return true
end
end
end
return false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<HELP title="MORE_INFO_BADGE_TITLE_2" body="MORE_INFO_BADGE_BODY_2" zone="ZONE_ANY" />
<SFX text="COMBAT_CHOP_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_CHOP_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
<AI_BASE_SCORE score="150" zone="ZONE_BATTLEFIELD" />
</CARD_V2>
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Formal Request Thread
by RiiakShiNal » 09 Jan 2014, 19:06
Actually, this is wrong, the target is illegal by the time it resolves so in accordance with the rules it should enter the battlefield as an Enchantment Creature (Cathars' Crusade should trigger).NeoAnderson wrote:3. Target a creature, grant shroud to the target creature before the ability resolve. - It is casted as Aura and is attached. OK
6B is wrong as the cost should not be reduced as the spell should not become an aura until it is already on the stack.NeoAnderson wrote:6. Under the effect of Blood Funnel - Normal casting cost doesn't change OK
Cast with Bestow we have 2 different scenarios
A. You play the card by clicking on it without zoom on the ability, you will be asked for a multiple choice with option of normal cast or alternative cast. In this case the cost of bestow is not reduced . OK
B. You zoom on the card while it still is in your hand, launch it with Bestow by clicking on the ability row. In this case the cost is reduced. UNDEFINED BEHAVIOUR
Infinite Reflection is supposed to change the card in the transition zone, though a creature cast with Bestow should change into an Enchantment - Aura in the Stack before it transitions to the battlefield.NeoAnderson wrote:8. About Infinite Reflection i have found one version of this card but i am not sure if it works as it should work.
I mean this cards is implemented changing the cards while are into transition zone.
Anyway using this version we have a weird effect if we cast the card with bestow, it change into aura enchantment, it is attached to the creature, but it also become a copy of the creature under the effect of Infinite Reflection. UNDEFINED BEHAVIOUR
I listed those cards because those are cards that may have interaction problems with the Bestow approximation. I don't know if they have been coded or not, but most of them should be possible to code (I try not to list cards that can't be coded because if the card can't be coded listing it for interaction problems is a moot point).NeoAnderson wrote:About the cards like Teferi's Response i think Riiak named them just as example because i haven't find any of them.AngelLestat wrote:One question, all the cards that you guys named like Teferi's Response, are cards already coded or you just use them like example? (I am not making a request, just asking)
Mana tokens are not lands (they are invisible cards that are typeless). Manual tap lands create mana tokens which have to be registered to prevent crashes. When registering tokens you have to register the types of the tokens being produced. If a card produces aAngelLestat wrote:Ok that helps.. One question, all lands count also like token? Or just the lands who has the abilitie to become creature?
And if a sorcery make them creatures? This mean that all lands needs to have this line?


Additionally, there are cards that produce tokens other than mana tokens (1/1 Green Elf tokens, etc...) these cards must also register their tokens, but their register line will need to reference their tokens not the mana tokens.
Cards that produce mana but do not tap manually are not written using the manual mana functions and generally do not create tokens (thus they do not need to register tokens).AngelLestat wrote:I notice that I cant not tap manually some of my lands, this make them suspects of causing the crash?
Also there is many lands who adds 2 possible colors, but when I choose the color it does not tap, only when I play the spell it taps.
So it seems that many of these lands are not using the Riiak function.
If that is the problem, I just need to add that line? Or with some modification at _W in case generate different colors?
Oh another case to test would be to make sure that if a Bestowed creature (in other words it is currently an Enchantment - Aura) is copied by Copy Enchantment that the result is an Enchantment Creature (due to the copiable values). I don't expect this to be a problem with your implementation, but it should probably still be tested.
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 MC Brodie » 10 Jan 2014, 04:06
I'm having trouble with the 2nd option on Profane Command. This is what I'm trying but it won't let me use the 2nd option. This is what I'm trying. Can anyone help me out?
- | Open
- Code: Select all
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_RETURN_TO_BATTLEFIELD" definition="1" compartment="1" mode="2" count="1" depends_on_X="1" />
<TARGET_DEFINITION id="1">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:SetZone( ZONE_GRAVEYARD, EffectController() )
filter:Add( FE_CMC, OP_LESS_THAN_OR_EQUAL_TO, GetEffectX() )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION mode="2">
local target = EffectDC():Get_Targets(1):Get_CardPtr(0)
if target ~= nil then
EffectDC():Get_Targets(1):Protect_CardPtr(0)
target:PutOntoBattlefield( EffectController() )
end
</RESOLUTION_TIME_ACTION>
-----------------------------------------------------------------------
Song of the Day: 46 and 2 (cover)
Song of the Day: 46 and 2 (cover)
Re: Formal Request Thread
by thefiremind » 10 Jan 2014, 09:44
I can't see anything wrong (well, aside the pointer protection which is useless if you don't need to do anything else with the creature you are resurrecting, but that doesn't give problems).MC Brodie wrote:I'm having trouble with the 2nd option on Profane Command. This is what I'm trying but it won't let me use the 2nd option. This is what I'm trying. Can anyone help me out?
I have only one idea: substitute GetEffectX() with EffectSource():GetPaidX(). It probably won't make any difference, but it's worth trying.
< 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 » 10 Jan 2014, 15:40
I couldn't get it to work that way. I ended up using a workaround similar to what I came up with for Simic Manipulator. Although in this case the workaround allows the player to target an illegal card in the graveyard. The first check of the target definition is based on total mana available and the check when the spell resolves is based on the value ofthefiremind wrote:I can't see anything wrong (well, aside the pointer protection which is useless if you don't need to do anything else with the creature you are resurrecting, but that doesn't give problems).
I have only one idea: substitute GetEffectX() with EffectSource():GetPaidX(). It probably won't make any difference, but it's worth trying.


Thanks for the help.
- | Open
- Code: Select all
<PLAY_TIME_ACTION>
EffectDC():Set_Int(20, 1)
</PLAY_TIME_ACTION>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_RETURN_TO_BATTLEFIELD" definition="1" compartment="1" mode="2" count="1" depends_on_X="1" />
<TARGET_DEFINITION id="1">
local setCMC = 0
local xPaid = EffectDC():Get_Int(20)
if xPaid ~= nil and xPaid == 1 then
setCMC = EffectSource():GetPaidX()
else
setCMC = EffectController():GetTotalMana() - 2
end
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:SetZone( ZONE_GRAVEYARD, EffectController() )
filter:Add( FE_CMC, OP_LESS_THAN_OR_EQUAL_TO, setCMC )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION mode="2">
local target = EffectDC():Get_Targets(1):Get_CardPtr(0)
if target ~= nil then
target:PutOntoBattlefield( EffectController() )
end
</RESOLUTION_TIME_ACTION>
-----------------------------------------------------------------------
Song of the Day: 46 and 2 (cover)
Song of the Day: 46 and 2 (cover)
Re: Formal Request Thread
by NeoAnderson » 10 Jan 2014, 15:43
First of all thanks for your support, your analysis help me to revise the code.RiiakShiNal wrote:Actually, this is wrong, the target is illegal by the time it resolves so in accordance with the rules it should enter the battlefield as an Enchantment Creature (Cathars' Crusade should trigger).
6B is wrong as the cost should not be reduced as the spell should not become an aura until it is already on the stack.
Infinite Reflection is supposed to change the card in the transition zone, though a creature cast with Bestow should change into an Enchantment - Aura in the Stack before it transitions to the battlefield.
Oh another case to test would be to make sure that if a Bestowed creature (in other words it is currently an Enchantment - Aura) is copied by Copy Enchantment that the result is an Enchantment Creature (due to the copiable values). I don't expect this to be a problem with your implementation, but it should probably still be tested.
I want to inform you i have resolved all the points above, now it works as it is supposed to work.
I made a stand alone topic to discuss about this implemention so if you want to take a look to my new code i will be glad to receive your opinion and also some suggestions to make other tests.
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Formal Request Thread
by neuro » 10 Jan 2014, 21:47
Ok thanks for info. I added Brute Force and Stun Sniper. I got your XML for BF and I got Stun Sniper from web generator. Added abilities to stun sniper.
I dont need images right now. So I skipped the TDX part. If problem is this how can I create TDX pictures?
I found TDX converter. But what to convert?
- Code: Select all
<SFX text="TARGET_FIREBALL_PLAY" />
<COST mana_cost="{1}" type="Mana" />
<COST type="TapSelf" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</TARGET_DEFINITION>
<TARGET tag="CARD_QUERY_CHOOSE_DEAL_1_DAMAGE" definition="0" compartment="0" count="1" />
<RESOLUTION_TIME_ACTION>
local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
if ( target_creature ~= nil ) then
EffectSourceLKI():DealDamageTo( 1, target_creature )
target_creature:Tap()
end
</RESOLUTION_TIME_ACTION>
I dont need images right now. So I skipped the TDX part. If problem is this how can I create TDX pictures?
I found TDX converter. But what to convert?
- neuro
- Posts: 4
- Joined: 08 Jan 2014, 14:10
- Has thanked: 0 time
- Been thanked: 0 time
Re: Formal Request Thread
by NeoAnderson » 10 Jan 2014, 22:25
Ok the contents of the ability is ok, but you must be sure it is included into an <ACTIVATED_ABILITY> Block...neuro wrote:Ok thanks for info. I added Brute Force and Stun Sniper. I got your XML for BF and I got Stun Sniper from web generator. Added abilities to stun sniper.I saw these card in deck editor. Added to a deck. I saw the deck in the game but could not see these cards.
- card | Open
- Code: Select all
<SFX text="TARGET_FIREBALL_PLAY" />
<COST mana_cost="{1}" type="Mana" />
<COST type="TapSelf" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</TARGET_DEFINITION>
<TARGET tag="CARD_QUERY_CHOOSE_DEAL_1_DAMAGE" definition="0" compartment="0" count="1" />
<RESOLUTION_TIME_ACTION>
local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
if ( target_creature ~= nil ) then
EffectSourceLKI():DealDamageTo( 1, target_creature )
target_creature:Tap()
end
</RESOLUTION_TIME_ACTION>
I dont need images right now. So I skipped the TDX part. If problem is this how can I create TDX pictures?
I found TDX converter. But what to convert?
- Code: Select all
<ACTIVATED_ABILITY>
.......................
......................
</ACTIVATED_ABILITY>
- Stun Sniper | Open
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="STUN_SNIPER_373391" />
<CARDNAME text="STUN_SNIPER" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Stun Sniper]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Stun Sniper]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Stun Sniper]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Stun Sniper]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Stun Sniper]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[気絶の狙撃者]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Stun Sniper]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Stun Sniper]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Stun Sniper]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="373391" />
<ARTID value="373391" />
<ARTIST name="Steve Prescott" />
<CASTING_COST cost="{R}{W}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[The tips of her bolts are blunt, but her aim is deadly sharp.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[The tips of her bolts are blunt, but her aim is deadly sharp.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[The tips of her bolts are blunt, but her aim is deadly sharp.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[The tips of her bolts are blunt, but her aim is deadly sharp.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[The tips of her bolts are blunt, but her aim is deadly sharp.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[彼女の鏃の先は鈍いが、彼女の狙いは恐ろしく鋭い。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[The tips of her bolts are blunt, but her aim is deadly sharp.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[The tips of her bolts are blunt, but her aim is deadly sharp.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[The tips of her bolts are blunt, but her aim is deadly sharp.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Human" />
<SUB_TYPE metaname="Archer" />
<EXPANSION value="DDL" />
<RARITY metaname="U" />
<POWER value="1" />
<TOUGHNESS value="1" />
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}, {T}: Stun Sniper deals 1 damage to target creature. Tap that creature.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}, {T}: Stun Sniper deals 1 damage to target creature. Tap that creature.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}, {T}: Stun Sniper deals 1 damage to target creature. Tap that creature.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}, {T}: Stun Sniper deals 1 damage to target creature. Tap that creature.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}, {T}: Stun Sniper deals 1 damage to target creature. Tap that creature.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}, {T}:クリーチャー1体を対象とする。気絶の狙撃者はそれに1点のダメージを与える。そのクリーチャーをタップする。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}, {T}: Stun Sniper deals 1 damage to target creature. Tap that creature.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}, {T}: Stun Sniper deals 1 damage to target creature. Tap that creature.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}, {T}: Stun Sniper deals 1 damage to target creature. Tap that creature.]]></LOCALISED_TEXT>
<COST mana_cost="{1}" type="Mana" />
<COST type="TapSelf" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
</TARGET_DEFINITION>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_DEAL_1_DAMAGE" definition="0" compartment="0" count="1" />
<RESOLUTION_TIME_ACTION>
local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target_creature ~= nil then
EffectSourceLKI():DealDamageTo(1, target_creature)
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target_creature ~= nil then
target_creature:Tap()
end
</RESOLUTION_TIME_ACTION>
<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="end_of_turn" type="window" />
<AI_AVAILABILITY type="in_response" response_source="1" response_target="1" />
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
<SFX text="TARGET_BLUNT_PLAY" />
</ACTIVATED_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>
1.first of all you need Gibbed Tools, you can download the tools here : http://svn.gib.me/builds/duels/, download the latest updated file right now is "duels-r6_b10.zip".
2.Unzip the tools into a folder. You will find some files into this folder, the one you need to convert a Png file to TDX is Gibbed.Duels.TdxConvert.exe.
3.Now find the right image for you card, convert it to .PNG using any PhotoEditing software (Photoshop or other programs who support PNG format). The sizes of this picture must be 512x376 pixels.
4. Copy the PNG file into Gibbed Tools folder.
5. From DOS prompt execute this command : Gibbed.Duels.TdxConvert PICTURENAME.PNG
6. Rename the TDX file as like ART ID VALUE of the card.
7. Move the TDX into \DATA_DLC_DECK_BUILDER_CUSTOM\DATA_ALL_PLATFORMS\ART_ASSETS\ILLUSTRATIONS subfolder.
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Formal Request Thread
by neuro » 11 Jan 2014, 14:06
Thank you for the info. You guys very helpful.
- neuro
- Posts: 4
- Joined: 08 Jan 2014, 14:10
- Has thanked: 0 time
- Been thanked: 0 time
Tribute Mechanic of Born of the Gods
by sumomole » 13 Jan 2014, 08:11
I try to code new mechanic - Tribute, it runs well, but AI will always choose the first option, I can't fix it, I need help!

EDIT:well, so ridiculous, but I think I found where the error.
"replacement_query", right, that's it, common triggered ability supports continuous action, we can choose an opponent, then the opponent to make a choice, and then we can make a final choice, but in a replacement ability AI won't make the second step choice, so when I use EffectController():GetOpponent() instead of the choose opponent step, everything is fine.
maybe use random selection instead of manually selection is the best way, who cares what the opponent is, in fact, they are the same.
certainly, I'm still looking for a perfect solution, if you know, please tell me, thanks in advance.
and would like to thank NeoAnderson's reply!
EDIT2:The new test, and the following is only a temporary solution, it is not perfect.



EDIT:well, so ridiculous, but I think I found where the error.



certainly, I'm still looking for a perfect solution, if you know, please tell me, thanks in advance.

and would like to thank NeoAnderson's reply!

EDIT2:The new test, and the following is only a temporary solution, it is not perfect.
- Pharagax Giant Updated | Open
- Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="PHARAGAX_GIANT_123456" />
<CARDNAME text="PHARAGAX_GIANT" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Pharagax Giant]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="123456" />
<ARTID value="A123456" />
<ARTIST name="Ryan Pancoast" />
<CASTING_COST cost="{4}{R}" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Giant" />
<EXPANSION value="DPI" />
<RARITY metaname="C" />
<POWER value="3" />
<TOUGHNESS value="3" />
<TRIGGERED_ABILITY replacement_query="1" linked_ability_group="1" active_zone="ZONE_TRANSITION">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Tribute 2 |(As this creature enters the battlefield, an opponent of your choice may place two +1/+1 counters on it.)|]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
<RESOLUTION_TIME_ACTION>
local player = EffectController():GetOpponent()
if player ~= nil then
player:BeginNewMultipleChoice()
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_YES" )
player:AddMultipleChoiceAnswer( "CARD_QUERY_INTET_DO_NOT_PAY_MANA" )
player:AskMultipleChoiceQuestion( "UI_CONDITIONAL_QUESTION_BODY" )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = EffectController():GetOpponent()
if player ~= nil then
local result = player:GetMultipleChoiceResult()
if result == 0 then
EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 2 )
else
LinkedDC():Set_Int(0, 1)
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Pharagax Giant enters the battlefield, if tribute wasn’t paid, Pharagax Giant deals 5 damage to each opponent.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
<INTERVENING_IF>
return LinkedDC():Get_Int(0) == 1
</INTERVENING_IF>
<FILTER filter_id="0">
local filter = ClearFilter()
filter:SetFilterType ( FILTER_TYPE_PLAYERS )
filter:Add( FE_TEAM, OP_NOT, EffectController():GetTeam() )
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="0">
EffectSourceLKI():DealDamageTo( 5, FilteredPlayer() )
</RESOLUTION_TIME_ACTION>
</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>
Last edited by sumomole on 14 Jan 2014, 00:31, edited 4 times in total.
-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Tribute Mechanic of Born of the Gods
by NeoAnderson » 13 Jan 2014, 09:22
I have tested your code also changing the number of counters from 2 to 20 but the Ai always select the counters.sumomole wrote:I try to code new mechanic - Tribute, it runs well, but AI will always choose the first option, I can't fix it, I need help!![]()
![]()
![]()
I think the only solution is to make some functions, who assign some points to a choice, to set different priority, then select the choice with more points.
To do this we should set some base conditions for the points to assign, and probably must be studied some different functions for each kind of effect other cards with tribute will have.
For this card we could make some functions who checks :
1. The total life of the player who have to make the choice, it have to check if it can receive the damage (over 10 point assign 1 to damage choice else assign 1 to counters choice, if life is equal or less than the damage choose the counters).
2. If he controls a creature with combat damage immunity choose counters!
3. The num of creature he controls, if he controls 1 creature more than the opponent who is casting the card, assign 1 to counters choice else assign 1 to damage choice.
4. If the greatest power of the creatures he control is greater or equal than the toughness of the overpowered card then assign 1 to counters choice else assign 1 to damage choice.
..................
And some other functions can be useful to make a reasonable choice. Obviously there a many conditions we are not able to check, as for example, if he can cast instant who can kill the creature, or if can cast spell who will take the control of the creature, and so on, but also if we are not able to define an exact condition we could get an acceptable approximation instead of always the same choice.
Here you can find a starting idea to make it working, it is not perfect but it start to make resonable choices.
- Pharagax Giant | Open
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="PHARAGAX_GIANT_123456" />
<CARDNAME text="PHARAGAX_GIANT" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Pharagax Giant]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Pharagax Giant]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Pharagax Giant]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Pharagax Giant]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gigante di Faragax]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Pharagax Giant]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Pharagax Giant]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Pharagax Giant]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Pharagax Giant]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="123456" />
<ARTID value="A123456" />
<ARTIST name="Ryan Pancoast" />
<CASTING_COST cost="{4}{R}" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Giant" />
<EXPANSION value="DPI" />
<RARITY metaname="C" />
<POWER value="3" />
<TOUGHNESS value="3" />
<TRIGGERED_ABILITY replacement_query="1" active_zone="ZONE_TRANSITION">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Tribute 2 |(As this creature enters the battlefield, an opponent of your choice may place two +1/+1 counters on it.)|]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Tribute 2 |(As this creature enters the battlefield, an opponent of your choice may place two +1/+1 counters on it.)|]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Tribute 2 |(As this creature enters the battlefield, an opponent of your choice may place two +1/+1 counters on it.)|]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Tribute 2 |(As this creature enters the battlefield, an opponent of your choice may place two +1/+1 counters on it.)|]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Tribute 2 |(As this creature enters the battlefield, an opponent of your choice may place two +1/+1 counters on it.)|]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Tribute 2 |(As this creature enters the battlefield, an opponent of your choice may place two +1/+1 counters on it.)|]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Tribute 2 |(As this creature enters the battlefield, an opponent of your choice may place two +1/+1 counters on it.)|]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Tribute 2 |(As this creature enters the battlefield, an opponent of your choice may place two +1/+1 counters on it.)|]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Tribute 2 |(As this creature enters the battlefield, an opponent of your choice may place two +1/+1 counters on it.)|]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
<RESOLUTION_TIME_ACTION>
local filter = ClearFilter()
filter:SetFilterType( FILTER_TYPE_PLAYERS )
-- filter:Add( FE_TEAM, OP_NOT, EffectController():GetTeam() )
EffectController():ChooseItem( "CARD_QUERY_CHOOSE_OPPONENT", EffectDC():Make_Targets(0) )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if player ~= nil then
if player:IsAI() == false then
player:BeginNewMultipleChoice()
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_YES" )
player:AddMultipleChoiceAnswer( "CARD_QUERY_INTET_DO_NOT_PAY_MANA" )
player:AskMultipleChoiceQuestion( "UI_CONDITIONAL_QUESTION_BODY" )
else
EffectDC():Set_Int(10,0)
EffectDC():Set_Int(11,0)
if player:GetLifeTotal() > 10 then
EffectDC():Int_Inc(11)
else
EffectDC():Int_Inc(10)
end
if player:GetLifeTotal() < 6 then
EffectDC():Set_Int(10,300)
end
local Doesntreceivedamage = CheckCreaturesForCharacteristicControlledBy(CHARACTERISTIC_DOESNT_RECEIVE_DAMAGE, player)
local DoesntreceiveCombatdamage = CheckCreaturesForCharacteristicControlledBy(CHARACTERISTIC_DOESNT_RECEIVE_COMBAT_DAMAGE, player)
local Indestructible = CheckCreaturesForCharacteristicControlledBy(CHARACTERISTIC_INDESTRUCTIBLE, player)
if Doesntreceivedamage == 1 or DoesntreceiveCombatdamage == 1 or Indestructible == 1 then
EffectDC():Set_Int(10,100)
else
EffectDC():Int_Inc(11)
end
local creaturecontrolled = CountcardTypeControlledBy(CARD_TYPE_CREATURE, player, ZONE_BATTLEFIELD)
local opponent = EffectSource():GetPlayer()
local creaturecontrolledbyopponent = CountcardTypeControlledBy(CARD_TYPE_CREATURE, opponent, ZONE_BATTLEFIELD)
creaturecontrolledbyopponent = creaturecontrolledbyopponent + 1
if creaturecontrolled > creaturecontrolledbyopponent then
local value = EffectDC():Get_Int(10)
EffectDC():Set_Int(10,value + 2)
else
EffectDC():Int_Inc(11)
end
local power = EffectSource():GetCurrentCharacteristics():Power_Get()
local toughness = EffectSource():GetCurrentCharacteristics():Toughness_Get()
EffectController():DisplayMessage("Power : "..power.." Toughness : "..toughness)
power = power + 3
toughness = toughness + 2
local CreaturePOW = Check_PowerGTorEQ_CreaturesControlledBy(player, toughness)
local CreatureTOU = Check_ToughnessGTorEQ_CreaturesControlledBy(player, power)
if CreaturePOW == 1 or CreatureTOU == 1 then
local value = EffectDC():Get_Int(10)
EffectDC():Set_Int(10,value + 4)
else
EffectDC():Int_Inc(11)
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local value = EffectDC():Get_Int(10)
local value2 = EffectDC():Get_Int(11)
local result = 0
local player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if player ~= nil then
if player:IsAI() == false then
result = player:GetMultipleChoiceResult()
else
if value >= value2 then
result = 0
else
result = 1
end
end
--EffectController():DisplayMessage("scelta counters : "..value.." scelta danno : "..value2.." scelta : "..result)
if result == 0 then
EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 2 )
else
local delayDC = EffectDC():Make_Chest(1)
MTG():CreateDelayedTrigger(1, delayDC)
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Pharagax Giant enters the battlefield, if tribute wasn’t paid, Pharagax Giant deals 5 damage to each opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[When Pharagax Giant enters the battlefield, if tribute wasn’t paid, Pharagax Giant deals 5 damage to each opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[When Pharagax Giant enters the battlefield, if tribute wasn’t paid, Pharagax Giant deals 5 damage to each opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[When Pharagax Giant enters the battlefield, if tribute wasn’t paid, Pharagax Giant deals 5 damage to each opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[When Pharagax Giant enters the battlefield, if tribute wasn’t paid, Pharagax Giant deals 5 damage to each opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[When Pharagax Giant enters the battlefield, if tribute wasn’t paid, Pharagax Giant deals 5 damage to each opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When Pharagax Giant enters the battlefield, if tribute wasn’t paid, Pharagax Giant deals 5 damage to each opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[When Pharagax Giant enters the battlefield, if tribute wasn’t paid, Pharagax Giant deals 5 damage to each opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[When Pharagax Giant enters the battlefield, if tribute wasn’t paid, Pharagax Giant deals 5 damage to each opponent.]]></LOCALISED_TEXT>
<CLEANUP fire_once="1" />
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
<FILTER filter_id="0">
local filter = ClearFilter()
filter:SetFilterType ( FILTER_TYPE_PLAYERS )
filter:Add( FE_TEAM, OP_NOT, EffectController():GetTeam() )
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="0">
EffectSourceLKI():DealDamageTo( 5, FilteredPlayer() )
</RESOLUTION_TIME_ACTION>
</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>
- Functions | Open
- Code: Select all
CheckCreaturesForCharacteristicControlledBy = function(nCharacteristic, nPlayer)
-- returns 1 if there is at least one creature on battlefield controlled by nPlayer with the ability nCharacteristic.
-- else returns 0
local oFilter = ClearFilter()
oFilter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
oFilter:Add(FE_CHARACTERISTIC, OP_HAS, nCharacteristic)
oFilter:Add(FE_CONTROLLER, OP_IS, nPlayer)
if (oFilter:Count() > 0) then
return 1
end
return 0
end
CountcardTypeControlledBy = function(nType, nPlayer, nZone)
-- returns the number of card of the TYPE (nTYPE), controlled by (nPlayer), considering the zone (nZone)
-- else returns 0
local oFilter = ClearFilter()
oFilter:Add(FE_TYPE, OP_IS, nType)
oFilter:Add(FE_CONTROLLER, OP_IS, nPlayer)
oFilter:SetZone( nZone, nPlayer )
if (oFilter:Count() > 0) then
return oFilter:Count()
end
return 0
end
Check_PowerGTorEQ_CreaturesControlledBy = function(nPlayer, nPower)
-- returns 1 if nPlayer control at least 1 creature with power greater or equal to nPower
-- else returns 0
local oFilter = ClearFilter()
oFilter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
oFilter:Add(FE_POWER, OP_GREATER_THAN_OR_EQUAL_TO, nPower)
oFilter:Add(FE_CONTROLLER, OP_IS, nPlayer)
if (oFilter:Count() > 0) then
return 1
end
return 0
end
Check_ToughnessGTorEQ_CreaturesControlledBy = function(nPlayer, nToughness)
-- returns 1 if nPlayer control at least 1 creature with toughness greater or equal to nToughness
-- else returns 0
local oFilter = ClearFilter()
oFilter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
oFilter:Add(FE_TOUGHNESS, OP_GREATER_THAN_OR_EQUAL_TO, nToughness)
oFilter:Add(FE_CONTROLLER, OP_IS, nPlayer)
if (oFilter:Count() > 0) then
return 1
end
return 0
end
PHARAGAX_GIANT_123456.zip
- CARD XML + TDX + FUNCTION LOL FILE
- (539.39 KiB) Downloaded 247 times
EDIT : ooopsss i just see your updated post

B. Sumo, i would receive your opinion about my Bestow implementation, i also made and interaction with heroic cards starting from your code. Please tell me what you think about it.
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Tribute Mechanic of Born of the Gods
by NeoAnderson » 13 Jan 2014, 12:04
Are you sure that using EffectController():GetNextPlayer() the AI make reasonable choices?sumomole wrote:EDIT:well, so ridiculous, but I think I found where the error."replacement_query", right, that's it, common triggered ability supports continuous action, we can choose an opponent, then the opponent to make a choice, and then we can make a final choice, but in a replacement ability AI won't make the second step choice, so when I use EffectController():GetNextPlayer() instead of the choose opponent step(1VS1 only), everything is fine.
maybe use random selection instead of manually selection is the best way, who cares what the opponent is, in fact, they are the same.
![]()
certainly, I'm still looking for a perfect solution, if you know, please tell me, thanks in advance.![]()
and would like to thank NeoAnderson's reply!![]()
I have changed your code using this function instead of choose target player block.
I changed the counters number from 2 to 20.
So normally a reasonable choice is to take 5 damage instead of let the creature become 23/23.
The AI always choose to add counters.
- Code: Select all
...............................
<RESOLUTION_TIME_ACTION>
local player = EffectController():GetNextPlayer()
if player ~= nil then
player:BeginNewMultipleChoice()
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_YES" )
player:AddMultipleChoiceAnswer( "CARD_QUERY_INTET_DO_NOT_PAY_MANA" )
player:AskMultipleChoiceQuestion( "UI_CONDITIONAL_QUESTION_BODY" )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = EffectController():GetNextPlayer()
if player ~= nil then
local result = player:GetMultipleChoiceResult()
if result == 0 then
EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 20 )
else
local delayDC = EffectDC():Make_Chest(1)
MTG():CreateDelayedTrigger(1, delayDC)
end
end
</RESOLUTION_TIME_ACTION>
............................
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Tribute Mechanic of Born of the Gods
by sumomole » 13 Jan 2014, 13:04
I have tested and everything is fine, when the value is 2, AI will choose be dealt 10 damage rather than let the creature becomes large, when the value is 20, AI will even choose be dealt 15 deamage, if AI insist that the first creature becomes large, that usually means it has ways to cope, by the way, I now use EffectController():GetOpponent(), it ensures to an opponent, and use LinkedDC instead of Delayed Trigger.NeoAnderson wrote:Are you sure that using EffectController():GetNextPlayer() the AI make reasonable choices?
I have changed your code using this function instead of choose target player block.
I changed the counters number from 2 to 20.
So normally a reasonable choice is to take 5 damage instead of let the creature become 23/23.
The AI always choose to add counters.
-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Tribute Mechanic of Born of the Gods
by NeoAnderson » 13 Jan 2014, 13:21
Ok i have tested your new code.sumomole wrote:I have tested and everything is fine, when the value is 2, AI will choose be dealt 10 damage rather than let the creature becomes large, when the value is 20, AI will even choose be dealt 15 deamage, if AI insist that the first creature becomes large, that usually means it has ways to cope, by the way, I now use EffectController():GetOpponent(), it ensures to an opponent.NeoAnderson wrote:Are you sure that using EffectController():GetNextPlayer() the AI make reasonable choices?
I have changed your code using this function instead of choose target player block.
I changed the counters number from 2 to 20.
So normally a reasonable choice is to take 5 damage instead of let the creature become 23/23.
The AI always choose to add counters.
I think i have understand where is the problem.
If we cast the card the choice is taken with a reasonable sense.
I was using a card to putontobattlefield permanent from the deck, in that case your code doesn't work it always add counters no matter what the conditions are.
Test report : Counters value : 10 Damage : 5
Normal cast : 3 times it takes damage then let the creature receive counters.
PutOntoBattlefield : Always Add Counters.
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Tribute Mechanic of Born of the Gods
by sumomole » 13 Jan 2014, 14:09
It sounds interesting, but if you use make AI lose game rather than add counters, AI will not hesitate to choose damage, it maybe not smart, but not a fool.NeoAnderson wrote:Ok i have tested your new code.
I think i have understand where is the problem.
If we cast the card the choice is taken with a reasonable sense.
I was using a card to putontobattlefield permanent from the deck, in that case your code doesn't work it always add counters no matter what the conditions are.
Test report : Counters value : 10 Damage : 5
Normal cast : 3 times it takes damage then let the creature receive counters.
PutOntoBattlefield : Always Add Counters.

-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Who is online
Users browsing this forum: No registered users and 3 guests