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 BloodReyvyn » 21 Jul 2013, 14:51
Since there was very nothing about it after thefiremind's post, I used his code for the Morbid ability and it works.

- Skirsdag High Priest (Tested) | Open
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="SKIRSDAG_HIGH_PRIEST_230794" />
<CARDNAME text="SKIRSDAG_HIGH_PRIEST" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Skirsdag High Priest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Grand prêtre de Skirsdag]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Gran sacerdote Skirsdag]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Skirsdag-Hohepriester]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Sommo Sacerdote Skirsdag]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[スカースダグの高僧]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Skirsdag High Priest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Верховный Жрец Скирдага]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Alto Sacerdote Skirsdag]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="230794" />
<ARTID value="230794" />
<ARTIST name="Jason A. Engle" />
<CASTING_COST cost="{1}{B}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“Thraben’s pleas fall on deaf ears. Ours do not.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Les supplications de Thraben sont vaines. Pas les nôtres. »]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“Las súplicas de Thraben caen en oídos sordos. Las nuestras, no.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Thrabens Flehen stößt auf taube Ohren. Unseres nicht.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Le preghiere di Thraben rimangono inascoltate. Ma non le nostre.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[「スレイベンの嘆願は、聞こえぬ耳には届かぬ。 我々のは届く。」]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“Thraben’s pleas fall on deaf ears. Ours do not.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[«Мольбы Трейбена остаются неуслышанными. В отличие от наших».]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“As súplicas de Thraben atingem apenas ouvidos surdos. As nossas não.”]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Human" />
<SUB_TYPE metaname="Cleric" />
<EXPANSION value="ISD" />
<RARITY metaname="R" />
<POWER value="1" />
<TOUGHNESS value="2" />
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Morbid — {T}, Tap two untapped creatures you control: Put a 5/5 black Demon creature token with flying onto the battlefield. Activate this ability only if a creature died this turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Morbidité — {T}, engagez deux créatures dégagées que vous contrôlez : Mettez sur le champ de bataille un jeton de créature 5/5 noire Démon avec le vol. N’activez cette capacité que si une créature est morte ce tour-ci.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Necrario — {T}, girar dos criaturas enderezadas que controlas: Pon en el campo de batalla una ficha de criatura Demonio negra 5/5 con la habilidad de volar. Activa esta habilidad sólo si una criatura murió este turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Morbide — {T}, tappe zwei ungetappte Kreaturen, die du kontrollierst: Bringe einen 5/5 schwarzen Dämon-Kreaturenspielstein mit Flugfähigkeit ins Spiel. Aktiviere diese Fähigkeit nur, falls in diesem Zug eine Kreatur gestorben ist.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Morboso — {T}, TAPpa due creature STAPpate che controlli: Metti sul campo di battaglia una pedina creatura Demone 5/5 nera con volare. Attiva questa abilità solo se è morta una creatura in questo turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[陰鬱 ― {T}, あなたがコントロールするアンタップ状態のクリーチャーを2体タップする:飛行を持つ黒の5/5のデーモン・クリーチャー・トークンを1体戦場に出す。 この能力は、このターンいずれかのクリーチャーが死亡していた場合にのみ起動できる。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Morbid — {T}, Tap two untapped creatures you control: Put a 5/5 black Demon creature token with flying onto the battlefield. Activate this ability only if a creature died this turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Болезненность — {T}, поверните два неповернутых существа под вашим контролем: положите на поле битвы одну фишку существа 5/5 черный Демон с Полетом. Активируйте эту способность, только если в этом ходу умерло существо.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Mórbido — {T}, Vire duas criaturas desviradas que você controla: Coloque no campo de batalha uma ficha de criatura preta 5/5 do tipo Demônio com voar. Ative esta habilidade somente se uma criatura tiver morrido neste turno.]]></LOCALISED_TEXT>
<COST type="TapSelf" />
<COST type="Tap" definition="0" compartment="1" query_tag="CARD_QUERY_CHOOSE_CREATURE_TAP" />
<COST_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
filter:Add( FE_IS_TAPPED, false )
</COST_DEFINITION>
<COST type="Tap" definition="1" compartment="2" query_tag="CARD_QUERY_CHOOSE_CREATURE_TAP" />
<COST_DEFINITION id="1">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
filter:Add( FE_IS_TAPPED, false )
</COST_DEFINITION>
<AVAILABILITY>
local interrogation = MTG():ClearInterrogationQuery()
interrogation:SetFromZone( ZONE_BATTLEFIELD )
interrogation:SetToZone( ZONE_GRAVEYARD )
interrogation:SetType( CARD_TYPE_CREATURE )
if interrogation:Count( INTERROGATE_CARDS_MOVED_ZONE, INTERROGATE_THIS_TURN, 1 ) == 1 then
return true
else
return false
end
</AVAILABILITY>
<RESOLUTION_TIME_ACTION>
MTG():PutTokensOntoBattlefield( "TOKEN_DEMON_55F_972016", 1, EffectController() )
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
<TOKEN_REGISTRATION reservation="1" type="TOKEN_DEMON_55F_972016" />
<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>

"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
-
BloodReyvyn - Posts: 421
- Joined: 19 May 2013, 13:29
- Has thanked: 53 times
- Been thanked: 40 times
Re: Formal Request Thread
by thefiremind » 21 Jul 2013, 15:03
Italian and Spanish usually put multiple sub-types in reverse order comparing to the other languages because it feels more natural to read them that way (for example, in English you wouldn't like to read "Wizard Zombie" because "Zombie Wizard" sounds better). In previous DotP games the sub-type ordering was decided on each card through those tags. DotP2014 uses some TXT files in the core that assign to each sub-type a sort of "priority", possibly different for each language. This is better when you need to add sub-types to cards because they will be ordered just like the original sub-types, but on the other hand it's worse because of the developers' lazyness: those TXT files only include the sub-types used by the official cards, and adding all missing sub-types would be a gigantic work.Xander9009 wrote:Ah, I'd never seen anything regarding ordering of tags.
Well, if you made DotP2014 cards you actually used that information, maybe without knowing it in detail...Xander9009 wrote:I also didn't know that about tests, good to know.

That's good to know, but what I'd like to know is ifBloodReyvyn wrote:Since there was very nothing about it after thefiremind's post, I used his code for the Morbid ability and it works.
- Code: Select all
interrogation:Count( WHATEVER, WHATEVER_ELSE, 1 ) == 1
- Code: Select all
interrogation:Test( WHATEVER, WHATEVER_ELSE )
< 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 ChaoticInstinct » 21 Jul 2013, 21:44
]Zhur-Taa Druid[/size][/b]
My Fury. My Freedom. My Guild.
- ChaoticInstinct
- Posts: 1
- Joined: 21 Jul 2013, 21:34
- Has thanked: 0 time
- Been thanked: 0 time
Re: Formal Request Thread
by gorem2k » 21 Jul 2013, 23:08
I don't know if Master of Cruelties is possible in 2014. I made a raw sketch for it. I'm just looking for some ideas with STEP_DECLARE_ATTACKERS. Haven't found any card that uses this. Should I give up or try another way? Also, I've tried to display a message to see WHEN the 1st trigger would happen but it didn't work so I've "--" every lines. Anyway, I don't think I will be able to figure it out myself.
- Master of Cruelties v0 | Open
- Code: Select all
-- <TRIGGERED_ABILITY>
-- <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Master of Cruelties can only attack alone.]]></LOCALISED_TEXT>
-- <TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
-- return MTG():GetStep() == STEP_DECLARE_ATTACKERS
-- </TRIGGER>
-- <RESOLUTION_TIME_ACTION>
-- if EffectSource() ~= nil then
-- EffectController():DisplayMessage( "STEP_DECLARE_ATTACKERS has triggered!" )
-- end
-- </RESOLUTION_TIME_ACTION>
-- </TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Master of Cruelties attacks a player and isn’t blocked, that player’s life total becomes 1. Master of Cruelties assigns no combat damage this combat.]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKING_AND_ISNT_BLOCKED" simple_qualifier="self" />
<RESOLUTION_TIME_ACTION>
local player = SecondaryPlayer() -- no SecondaryPlayer returned.....
if player ~= nil then
player:SetLifeTotal(1)
end
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="8">
if EffectSource() ~= nil then
local characteristics = EffectSource():GetCurrentCharacteristics()
characteristics:Bool_Set( CHARACTERISTIC_DOESNT_DEAL_COMBAT_DAMAGE, 1 )
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
</TRIGGERED_ABILITY>
Re: Formal Request Thread
by thefiremind » 21 Jul 2013, 23:21
DisplayMessage and MessageAllPlayers are probably only leftovers from DotP2013: I tried to use them too, with no success.
The ATTACKING_AND_ISNT_BLOCKED trigger probably doesn't carry a SecondaryPlayer(). You can try with TriggerPlayer(), or be 100% sure with EffectSourceLKI():GetPlayerAttacked().
About the first part, first of all, STEP_DECLARE_ATTACKERS is too late: the time window called STEP_DECLARE_ATTACKERS is the one after attackers are declared and before blockers are declared: what you need here is STEP_BEGIN_COMBAT.
Then, there are lots of things to take into account: if the Master's controller controls untapped creatures with CHARACTERISTIC_MUST_ATTACK or CHARACTERISTIC_MUST_ATTACK_EACH_TURN that didn't attack in that turn yet, you shouldn't even ask, and give CHARACTERISTIC_CANT_ATTACK to the Master until the end of combat. Otherwise, you can ask the player if he wants to attack with the Master, and if so, give CHARACTERISTIC_MUST_ATTACK to the Master and CHARACTERISTIC_CANT_ATTACK to each other creature that player controls, until the end of combat. All of this would work by itself (probably), but there's a problem: after the trigger there's still time for things to happen, for example an opponent could give CHARACTERISTIC_MUST_ATTACK to another creature that player controls, and it would be too late to undo the decision.
There are other little problems in your code (the duration of the "no combat damage" effect should last until end of combat, not until next turn, it matters if you have Aurelia for example, and I think that CHARACTERISTIC_DOESNT_DEAL_COMBAT_DAMAGE is actually considered as damage prevention since it's used on Fog, so it wouldn't be compatible with "damage can't be prevented" cards), but they are marginal.
The ATTACKING_AND_ISNT_BLOCKED trigger probably doesn't carry a SecondaryPlayer(). You can try with TriggerPlayer(), or be 100% sure with EffectSourceLKI():GetPlayerAttacked().
About the first part, first of all, STEP_DECLARE_ATTACKERS is too late: the time window called STEP_DECLARE_ATTACKERS is the one after attackers are declared and before blockers are declared: what you need here is STEP_BEGIN_COMBAT.
Then, there are lots of things to take into account: if the Master's controller controls untapped creatures with CHARACTERISTIC_MUST_ATTACK or CHARACTERISTIC_MUST_ATTACK_EACH_TURN that didn't attack in that turn yet, you shouldn't even ask, and give CHARACTERISTIC_CANT_ATTACK to the Master until the end of combat. Otherwise, you can ask the player if he wants to attack with the Master, and if so, give CHARACTERISTIC_MUST_ATTACK to the Master and CHARACTERISTIC_CANT_ATTACK to each other creature that player controls, until the end of combat. All of this would work by itself (probably), but there's a problem: after the trigger there's still time for things to happen, for example an opponent could give CHARACTERISTIC_MUST_ATTACK to another creature that player controls, and it would be too late to undo the decision.
There are other little problems in your code (the duration of the "no combat damage" effect should last until end of combat, not until next turn, it matters if you have Aurelia for example, and I think that CHARACTERISTIC_DOESNT_DEAL_COMBAT_DAMAGE is actually considered as damage prevention since it's used on Fog, so it wouldn't be compatible with "damage can't be prevented" cards), but they are marginal.
Last edited by thefiremind on 21 Jul 2013, 23:25, edited 2 times in total.
< 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 RiiakShiNal » 21 Jul 2013, 23:23
Though you may be able to use the CANT_ATTACK_TEST trigger.
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 thefiremind » 21 Jul 2013, 23:27
Maybe I'm just pessimistic, but if that trigger acts before attackers are actually declared (which is very likely), you can't see how many attackers you declared inside the trigger condition, because you haven't declared any of them yet.RiiakShiNal wrote:Though you may be able to use the CANT_ATTACK_TEST trigger.
< 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 RiiakShiNal » 21 Jul 2013, 23:52
I don't know for certain one way or the other I was just throwing out a possibility.thefiremind wrote:Maybe I'm just pessimistic, but if that trigger acts before attackers are actually declared (which is very likely), you can't see how many attackers you declared inside the trigger condition, because you haven't declared any of them yet.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Formal Request Thread
by gorem2k » 22 Jul 2013, 00:31
DisplayMessage normally works. I know for sure, because when I was trying millions of tests with some mana PRODUCES thingy, I could 'concatenate' a string using ".." then display the variable on screen. though <MANA_ABILITY> is unrelated here. 
my idea was to get the right moment just before I click the Attack button to automatically check if he's alone and if not, remove it from combat and let the rest as is. but yeah, I think it's 99% impossible to make, so I will abort this project.

my idea was to get the right moment just before I click the Attack button to automatically check if he's alone and if not, remove it from combat and let the rest as is. but yeah, I think it's 99% impossible to make, so I will abort this project.
Re: Formal Request Thread
by Master Necro » 22 Jul 2013, 14:20
I need some help with a few codes I don't know why they don't work:
The first ability of Rakdos Guildmage does not give -2/-2:
The first ability of Rakdos Guildmage does not give -2/-2:
- Code: Select all
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{3}{B} , Discard a card: Target creature gets -2/-2 until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{3}{B} , Discard a card: Target creature gets -2/-2 until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{3}{B} , Discard a card: Target creature gets -2/-2 until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{3}{B} , Discard a card: Target creature gets -2/-2 until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{3}{B} , Discard a card: Target creature gets -2/-2 until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{3}{B} , Discard a card: Target creature gets -2/-2 until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{3}{B} , Discard a card: Target creature gets -2/-2 until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{3}{B} , Discard a card: Target creature gets -2/-2 until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{3}{B} , Discard a card: Target creature gets -2/-2 until end of turn.]]></LOCALISED_TEXT>
<SFX text="TARGET_PESTS_PLAY" />
<AVAILABILITY sorcery_time="1" />
<COST mana_cost="{3}{B}" type="Mana" />
<COST type="Discard" definition="0" compartment="1" query_tag="CARD_QUERY_CHOOSE_CARD_TO_DISCARD" item_count="1" />
<COST_DEFINITION id="0">
local filter = ClearFilter()
filter:SetZone( ZONE_HAND, EffectController() )
</COST_DEFINITION>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_LOSE_2_2" definition="1" compartment="1" count="1" />
<TARGET_DEFINITION id="1">
local first_card = EffectDC():Get_Targets(0):Get_CardPtr(0)
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
if first_card ~= nil then
filter:Add( FE_CARD_INSTANCE, OP_NOT, first_card )
end
</TARGET_DEFINITION>
<CONTINUOUS_ACTION layer="7C">
local target = EffectDC():Get_Targets(1):Get_CardPtr(0)
if target2 ~= nil then
local characteristics = target2:GetCurrentCharacteristics()
characteristics:Power_Add( -2 )
characteristics:Toughness_Add( -2 )
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
</ACTIVATED_ABILITY>
- Code: Select all
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{B}{R} , {T}: Each player discards a card. Activate this ability only any time you could cast a sorcery.]]></LOCALISED_TEXT>
<COST mana_cost="{1}{B}{R}" type="Mana" />
<COST type="TapSelf" />
<FILTER filter_id="0">
local filter = ClearFilter()
filter:SetFilterType( FILTER_TYPE_PLAYERS )
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="0">
if FilteredPlayer() ~= nil then
local filter = ClearFilter()
filter:SetZone( ZONE_HAND, FilteredPlayer() )
FilteredPlayer():SetItemCount( 1 )
FilteredPlayer():SetItemPrompt ( "CARD_QUERY_CHOOSE_CARD_TO_DISCARD" )
end
FilteredPlayer():ChooseItems( EffectDC():Make_Targets(1) )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target_card = EffectDC():Get_Targets(1):Get_CardPtr(0)
if target_card ~= nil then
target_card:Discard()
end
</RESOLUTION_TIME_ACTION>
<AVAILABILITY sorcery_time="1" />
</ACTIVATED_ABILITY>
-
Master Necro - Posts: 259
- Joined: 24 Apr 2013, 18:25
- Has thanked: 83 times
- Been thanked: 21 times
Re: Formal Request Thread
by thefiremind » 22 Jul 2013, 14:37
The matching between target/cost compartment/definition is quite messed up, in the CONTINUOUS_ACTION you declare a "target" variable but then read a "target2" variable that you never declared, and I can't see why you want the discarded to be an invalid target for the ability (it wouldn't even be possible to do that because you choose targets first and pay costs after). Here's the cleaned code:Master Necro wrote:The first ability of Rakdos Guildmage does not give -2/-2:
- Code: Select all
<COST type="Discard" definition="0" compartment="1" query_tag="CARD_QUERY_CHOOSE_CARD_TO_DISCARD" item_count="1" />
<COST_DEFINITION id="0">
local filter = ClearFilter()
filter:SetZone( ZONE_HAND, EffectController() )
</COST_DEFINITION>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_LOSE_2_2" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</TARGET_DEFINITION>
<CONTINUOUS_ACTION layer="7C">
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local characteristics = target:GetCurrentCharacteristics()
characteristics:Power_Add( -2 )
characteristics:Toughness_Add( -2 )
end
</CONTINUOUS_ACTION>

The problem here is that all players use the same target chest, but enumerating things with a FILTER block is uselessly complex: delete your RESOLUTION_TIME_ACTIONs, substitute them with the second RESOLUTION_TIME_ACTION of Death Cloud (the one with the discard query) and change GetEffectX() with 1.Master Necro wrote:The second ability of Rix Maadi, Dungeon Palace does not work:
< 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 Master Necro » 22 Jul 2013, 15:02
Thanks!thefiremind wrote:The matching between target/cost compartment/definition is quite messed up, in the CONTINUOUS_ACTION you declare a "target" variable but then read a "target2" variable that you never declared, and I can't see why you want the discarded to be an invalid target for the ability (it wouldn't even be possible to do that because you choose targets first and pay costs after). Here's the cleaned code:Master Necro wrote:The first ability of Rakdos Guildmage does not give -2/-2:By the way, you are allowed to repeat definition IDs if one is a target definition and the other one is a cost definition. I wasn't 100% sure, but Grim Lavamancer does that, so now I am.
- Code: Select all
<COST type="Discard" definition="0" compartment="1" query_tag="CARD_QUERY_CHOOSE_CARD_TO_DISCARD" item_count="1" />
<COST_DEFINITION id="0">
local filter = ClearFilter()
filter:SetZone( ZONE_HAND, EffectController() )
</COST_DEFINITION>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_LOSE_2_2" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</TARGET_DEFINITION>
<CONTINUOUS_ACTION layer="7C">
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local characteristics = target:GetCurrentCharacteristics()
characteristics:Power_Add( -2 )
characteristics:Toughness_Add( -2 )
end
</CONTINUOUS_ACTION>Compartments, on the contrary, decide the register number, so they should never be repeated.
The problem here is that all players use the same target chest, but enumerating things with a FILTER block is uselessly complex: delete your RESOLUTION_TIME_ACTIONs, substitute them with the second RESOLUTION_TIME_ACTION of Death Cloud (the one with the discard query) and change GetEffectX() with 1.Master Necro wrote:The second ability of Rix Maadi, Dungeon Palace does not work:

Just one more my Siege of Towers doesn't work it doesn't make my mountain card in too a 3/1 creature:
- Code: Select all
<SPELL_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Target Mountain becomes a 3/1 creature. It's still a land.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Target Mountain becomes a 3/1 creature. It's still a land.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Target Mountain becomes a 3/1 creature. It's still a land.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Target Mountain becomes a 3/1 creature. It's still a land.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Target Mountain becomes a 3/1 creature. It's still a land.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Target Mountain becomes a 3/1 creature. It's still a land.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Target Mountain becomes a 3/1 creature. It's still a land.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Target Mountain becomes a 3/1 creature. It's still a land.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Target Mountain becomes a 3/1 creature. It's still a land.]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_LAND_MOUNTAIN" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add(FE_SUBTYPE, OP_IS, LAND_TYPE_MOUNTAIN)
</TARGET_DEFINITION>
<CONTINUOUS_ACTION layer="4">
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local characteristics = target:GetCurrentCharacteristics()
local card_type = characteristics:CardType_GetWritable()
card_type:Add(CARD_TYPE_CREATURE)
end
</CONTINUOUS_ACTION>
<CONTINUOUS_ACTION layer="7B">
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local characteristics = target:GetCurrentCharacteristics()
characteristics:Power_Set( 3 )
characteristics:Toughness_Set( 1 )
end
</CONTINUOUS_ACTION>
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ALLIED_ONLY" />
</SPELL_ABILITY>
-
Master Necro - Posts: 259
- Joined: 24 Apr 2013, 18:25
- Has thanked: 83 times
- Been thanked: 21 times
Re: Formal Request Thread
by thefiremind » 22 Jul 2013, 15:09
You are missing the DURATION block. I guess that the default duration is "a brief moment" if you don't specify it.
- Code: Select all
<DURATION>
return EffectDC():Get_Targets(0):Get_CardPtr(0) == nil
</DURATION>
< 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 Master Necro » 22 Jul 2013, 15:17
Ouu didn't know that thanks!thefiremind wrote:You are missing the DURATION block. I guess that the default duration is "a brief moment" if you don't specify it.
- Code: Select all
<DURATION>
return EffectDC():Get_Targets(0):Get_CardPtr(0) == nil
</DURATION>

-
Master Necro - Posts: 259
- Joined: 24 Apr 2013, 18:25
- Has thanked: 83 times
- Been thanked: 21 times
Re: Formal Request Thread
by thefiremind » 22 Jul 2013, 15:24
To be honest, I didn't know either, you made me discover that. But I have always included DURATION blocks on effects that last indefinitely, because even those effects have a duration: when the cards that they affect change zone, they stop doing anything that matters, and keeping useless effects "lingering" on the board would be a waste.Master Necro wrote:Ouu didn't know that thanks!

< 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
Who is online
Users browsing this forum: No registered users and 11 guests