Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Programming Talk
Help with Pulmonic Sliver ["May" on replacemt_effect]
Moderator: CCGHQ Admins
Help with Pulmonic Sliver ["May" on replacemt_effect]
by Zambooo » 17 Feb 2015, 15:53
so this is the ability granted to all Slivers
Any suggestion?
- | Open
- Code: Select all
<TRIGGERED_ABILITY resource_id="1" replacement_effect="1" replacement_query="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se questo permanente sta per essere messo in un cimitero, puoi invece metterlo in cima al grimorio del suo proprietario.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_CONSIDERED" to_zone="ZONE_GRAVEYARD" simple_qualifier="self" from_zone="ZONE_BATTLEFIELD" pre_trigger="1">
MTG():OverrideEvent()
if (EffectSource() ~= nil and EffectSource():IsToken() == false) then
local player = EffectController()
player:BeginNewMultipleChoice()
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_TOP_LIBRARY" )
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_GRAVEYARD" )
player:AskMultipleChoiceQuestion( "CARD_QUERY_MC_PULMONIC_SLIVER" )
end
return true
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local effectSource = EffectSource()
local player = EffectController()
local result = player:GetMultipleChoiceResult()
if effectSource ~= nil then
if result == 0 then
effectSource:PutOnTopOfLibrary()
else
effectSource:PutInGraveyard()
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
- Code: Select all
if result == 0 then
effectSource:PutInGraveyard()
else
effectSource:PutOnTopOfLibrary()
end
Any suggestion?
Re: Help with Pulmonic Sliver ["May" on replacemt_effect]
by sweetLu » 17 Feb 2015, 18:35
On a side note you can code most "may" abilities by adding a <MAY /> tag. There are also different attributes for a may tag like always prompt and custom questions that you can look up how to do. There is an issue when using a may block will not work but I always forget the exact problem. But I think it has to do with replacement querries.
Last edited by sweetLu on 19 Feb 2015, 04:28, edited 1 time in total.
Re: Help with Pulmonic Sliver ["May" on replacemt_effect]
by Zambooo » 17 Feb 2015, 20:43
there was a Bug when I had the MCQ into the RTA I can't even explain in words: there were lots of "put in graveyard" "put on top of library" choices overlapped and I couldn't continue playing. Maybe I could try moving everything into the Trigger... Or maybe I could just store the result with Set_Int..
Edit: nothing works.. I just cut off the "may" part for the moment...
Edit2: now I've tried something like this
Edit: nothing works.. I just cut off the "may" part for the moment...
Edit2: now I've tried something like this
- Code: Select all
<TRIGGERED_ABILITY resource_id="1" replacement_effect="1" >
<TRIGGER value="ZONECHANGE_CONSIDERED" to_zone="ZONE_GRAVEYARD" simple_qualifier="self" from_zone="ZONE_BATTLEFIELD" pre_trigger="1">
if ( EffectSource():IsToken() == false ) then
MTG():OverrideEvent()
return true
end
return false
</TRIGGER>
<MAY tag="PULMONIC_SLIVER_TOP_LIBRARY" always_prompt="1" />
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():PutOnTopOfLibrary()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
Re: Help with Pulmonic Sliver ["May" on replacemt_effect]
by sweetLu » 18 Feb 2015, 05:08
2) When you have a MCQ inside of a replacement effect you have to change the attribute to replacement_query.
Try this. This is the first bit of programming I've done in awhile and I cannot test it so bare with me.
- Code: Select all
<TRIGGERED_ABILITY resource_id="1" replacement_query="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se questo permanente sta per essere messo in un cimitero, puoi invece metterlo in cima al grimorio del suo proprietario.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_CONSIDERED" to_zone="ZONE_GRAVEYARD" simple_qualifier="self" from_zone="ZONE_BATTLEFIELD" pre_trigger="1">
return (EffectSource() ~= nil and EffectSource():IsToken() == false)
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if (EffectSource() ~= nil and EffectSource():IsToken() == false) then
local player = EffectController()
player:BeginNewMultipleChoice()
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_TOP_LIBRARY" )
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_GRAVEYARD" )
player:AskMultipleChoiceQuestion( "CARD_QUERY_MC_PULMONIC_SLIVER" )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local effectSource = EffectSource()
local player = EffectController()
local result = player:GetMultipleChoiceResult()
if effectSource ~= nil and result == 0 then
MTG():OverrideEvent()
effectSource:PutOnTopOfLibrary()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
Last edited by sweetLu on 19 Feb 2015, 04:28, edited 1 time in total.
Re: Help with Pulmonic Sliver ["May" on replacemt_effect]
by Zambooo » 18 Feb 2015, 12:22
just tested you code, but now no matter what I choose the sliver will end up in the graveyard..
btw I've never seen a "MTG():OverrideEvent()" in a RTA block, are you sure it is legit?
btw I've never seen a "MTG():OverrideEvent()" in a RTA block, are you sure it is legit?
Re: Help with Pulmonic Sliver ["May" on replacemt_effect]
by Xander9009 » 18 Feb 2015, 15:02
I don't know if it would work in an RTA, but I'd leave it in the trigger. Also, I'm pretty sure the Override is the reason the may tag won't work. Could be wrong, though.
Anyway, what I would try is to override the event in the trigger (like you were before). Ask whether it should go to the graveyard or the top of the library, and then use QueueZoneChange for graveyard and PutOnTopOfLibrary for library.
Anyway, what I would try is to override the event in the trigger (like you were before). Ask whether it should go to the graveyard or the top of the library, and then use QueueZoneChange for graveyard and PutOnTopOfLibrary for library.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Help with Pulmonic Sliver ["May" on replacemt_effect]
by Xander9009 » 18 Feb 2015, 15:42
Alright. It's working. Had to add in an ObjectDC Check. The trigger was looping because if the create went to teh library, that's fine, but if it went to the graveyard, then it needed to ask where it should go, ad nauseam. The trigger now checks that a certain variable is not 1 (in case it's 0 or nil) before triggering. It overrides the zonechange and triggers. During resolution, it asks where to put it, and upon choosing graveyard, it sets the variable to 1. Upon entering the graveyard successfully, the variable is set back to 0 in case it's resummoned.
Make sure you change the variable 900901 to something else if you use this card outside of the CW (especially if you release it). 9009 is my personal number prefix.
Make sure you change the variable 900901 to something else if you use this card outside of the CW (especially if you release it). 9009 is my personal number prefix.
- Pulmonic Sliver - Mostly tested | Open
- Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="PULMONIC_SLIVER_CW_113575" />
<CARDNAME text="PULMONIC_SLIVER" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Pulmonic Sliver]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Slivoïde pulmonique]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Fragmentado pulmonar]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Lungenremasuri]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Tramutante Polmonare]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[肺臓スリヴァー]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Pulmonic Sliver]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Пульмоническая Щепка]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Fractius Pulmonar]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[涨肺裂片妖]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Pulmonic Sliver]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="113575" />
<ARTID value="CW113575" />
<ARTIST name="Jeff Easley" />
<CASTING_COST cost="{3}{W}{W}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Like a great bellows it hisses, and its kin, both living and dead, are lifted to safety.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Il souffle, tel un grand soufflet, et ses frères morts ou vifs sont soulevés loin du danger.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Sisea como un gran fuelle, y sus hermanos, vivos y muertos, se elevan a un lugar seguro.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Er pumpt wie ein großer Blasebalg, um seine Artgenossen, tot wie lebendig, in Sicherheit zu bringen.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Soffia come un grosso mantice e i suoi simili, sia vivi che morti, sono sollevati al sicuro.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[それは巨大なふいごのような声を上げ、その仲間は生きているものも死んでいるものも、安全な場所まで持ち上げられる。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Like a great bellows it hisses, and its kin, both living and dead, are lifted to safety.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Подобно огромным кузнечным мехам, они раздуваются, и их родичи, и мертвые и живые, взлетают на безопасную высоту.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Como uma grande fole ele assobia, e seus semelhantes, mortos ou vivos, são elevados para a segurança.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[他发出嘶声巨响,其同伴不论死活均与之一同飞往安全地带。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Like a great bellows it hisses, and its kin, both living and dead, are lifted to safety.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Sliver" />
<EXPANSION value="TSP" />
<RARITY metaname="R" />
<POWER value="3" />
<TOUGHNESS value="3" />
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[All Sliver creatures have flying.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Tous les slivoïdes ont le vol et « Si cette créature devait être mise dans un cimetière, vous pouvez la mettre au-dessus de la bibliothèque de son propriétaire à la place. »]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Todos los Fragmentados tienen la habilidad de volar y “Si esta criatura fuera a un cementerio, en vez de eso, puedes ponerla en la parte superior de la biblioteca de su propietario”.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Alle Remasuris haben Flugfähigkeit und „Falls diese Kreatur auf einen Friedhof gelegt würde, kannst du sie stattdessen oben auf die Bibliothek ihres Besitzers legen”.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Tutti i Tramutanti hanno volare e “Se questa creatura sta per essere messa in un cimitero, puoi invece metterla in cima al grimorio del suo proprietario.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[すべてのスリヴァーは、飛行と「このクリーチャーが墓地に置かれる場合、あなたは代わりにそれをオーナーのライブラリーの一番上に置いてもよい。」の能力を持つ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[All Sliver creatures have flying.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Все Щепки обладают Полетом и способностью “Если это существо должно попасть на кладбище, вы можете вместо этого положить его наверх библиотеки владельца.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Todos os Fractius têm voar e “Se esta criatura seria colocada em um cemitério, em vez disso, você pode colocá-la no topo do grimório de seu dono.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[所有裂片妖具有飞行异能与「如果此生物将被置入坟墓场,你可以改为将它置于其拥有者的牌库顶。」]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[All Sliver creatures have flying.]]></LOCALISED_TEXT>
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add( FE_SUBTYPE, OP_IS, CREATURE_TYPE_SLIVER )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</FILTER>
<CONTINUOUS_ACTION layer="8" filter_id="0">
if FilteredCard() ~= nil then
local characteristics = FilteredCard():GetCurrentCharacteristics():Bool_Set( CHARACTERISTIC_FLYING, 1 )
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[All Slivers have “If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[All Slivers have “If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[All Slivers have “If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[All Slivers have “If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[All Slivers have “If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[All Slivers have “If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[All Slivers have “If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[All Slivers have “If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[All Slivers have “If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[All Slivers have “If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[All Slivers have “If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.”]]></LOCALISED_TEXT>
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add( FE_SUBTYPE, OP_IS, CREATURE_TYPE_SLIVER )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</FILTER>
<CONTINUOUS_ACTION layer="8" filter_id="0">
if FilteredCard() ~= nil then
local characteristics = FilteredCard():GetCurrentCharacteristics()
characteristics:GrantAbility(1)
characteristics:GrantAbility(2)
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY resource_id="1" replacement_query="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se questo permanente sta per essere messo in un cimitero, puoi invece metterlo in cima al grimorio del suo proprietario.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_CONSIDERED" to_zone="ZONE_GRAVEYARD" simple_qualifier="self" from_zone="ZONE_BATTLEFIELD" pre_trigger="1">
local ODC = RSN_ObjectDC()
if ODC ~= nil and ODC:Get_Int(900901) ~= 1 then
MTG():OverrideEvent()
return true
end
return false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if (EffectSource() ~= nil and EffectSource():IsToken() == false) then
local player = EffectController()
player:BeginNewMultipleChoice()
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_TOP_LIBRARY" )
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_GRAVEYARD" )
player:AskMultipleChoiceQuestion( "CARD_QUERY_PULMONIC_SLIVER" )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local effectSource = EffectSource()
local player = EffectController()
local result = player:GetMultipleChoiceResult()
if effectSource ~= nil then
if result == 0 then
effectSource:PutOnTopOfLibrary()
else
local ODC = RSN_ObjectDC()
if ODC ~= nil then
ODC:Set_Int(900901, 1)
effectSource:PutInGraveyard()
end
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id="2" forced_skip="1">
<TRIGGER value="ZONECHANGE_BEGIN" to_zone="ZONE_GRAVEYARD" simple_qualifier="self" from_zone="ZONE_ANY" />
<RESOLUTION_TIME_ACTION>
local ODC = RSN_ObjectDC()
if ODC ~= nil then
ODC:Set_Int(900901, 0)
end
</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" />
<AUTHOR><![CDATA[Zambooo]]></AUTHOR>
<EDITORS><![CDATA[Zambooo, Xander9009]]></EDITORS>
<DATE><![CDATA[17-02-15, 18-02-15]]></DATE>
</CARD_V2>
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Help with Pulmonic Sliver ["May" on replacemt_effect]
by Zambooo » 18 Feb 2015, 17:46
I use as prefix 283, will it be ok 28301 then? Sorry but I'm not confident at all with ODC..
edit: tested with 28301. The first time everything went smooth, but the second time I had to click like 20 times on "OPTION_TOP_LIBRARY" cause the MQA kept popping :/
edit2: my bad, I didn't granted the ability with id="2" eheh. gonna test it again
edit3: even with the granted ability 2 I had to click around 20 times the choice I wanted
edit: tested with 28301. The first time everything went smooth, but the second time I had to click like 20 times on "OPTION_TOP_LIBRARY" cause the MQA kept popping :/
edit2: my bad, I didn't granted the ability with id="2" eheh. gonna test it again
edit3: even with the granted ability 2 I had to click around 20 times the choice I wanted
Re: Help with Pulmonic Sliver ["May" on replacemt_effect]
by Xander9009 » 18 Feb 2015, 19:46
You'll have to check again. The number shouldn't be an issue unless you didn't get all instances changed. Maybe you missed one? Use ctrl-f and search for 9009. 28301 should work fine. The goal there is that you're granting the ability to a bunch of other cards, and you don't' want to use the same register as anything else. When you only use RSN_ObjectDC for effect source, the lower registers like 0, 1, 2, ... are fine. If you're using an RSN_ObjectDC on another card, you should use a prefixed number to avoid conflict with either other cards that use that register on various cards and cards that use those lower registers on themselves. An ObjectDC is accessible from any card that can get a pointer to a card. So, unlike with EffectDC, LinkedDC, and the like, ObjectDC can cause interference between cards.
I just tested it with multiple sacrifices, various choices, resurrecting the sacrificed creatures from the graveyard (into my hand, not the battlefield), and immediately redrawing the cards that I put on my library. No problems.
Did you copy paste the whole card and just change the ids or did you copy the abilities into your copy of the card? If it was the latter, you might have missed some minor change that you didn't notice.
I just tested it with multiple sacrifices, various choices, resurrecting the sacrificed creatures from the graveyard (into my hand, not the battlefield), and immediately redrawing the cards that I put on my library. No problems.
Did you copy paste the whole card and just change the ids or did you copy the abilities into your copy of the card? If it was the latter, you might have missed some minor change that you didn't notice.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Help with Pulmonic Sliver ["May" on replacemt_effect]
by Zambooo » 18 Feb 2015, 20:40
I just pasted the ability id 1 and 2 and added GrantAbility(2) I was missing. also there are no 9009 but only 283..
the ability "If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead." should be granted to all Sliver Permanents, that's why I removed
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="PULMONIC_SLIVER_283113575" />
<CARDNAME text="PULMONIC_SLIVER" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Pulmonic Sliver]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Slivoïde pulmonique]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Fragmentado pulmonar]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Lungenremasuri]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Tramutante Polmonare]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[肺臓スリヴァー]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Pulmonic Sliver]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Пульмоническая Щепка]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Fractius Pulmonar]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="283113575" />
<ARTID value="A283113575" />
<ARTIST name="Jeff Easley" />
<CASTING_COST cost="{W}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Like a great bellows it hisses, and its kin, both living and dead, are lifted to safety.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Il souffle, tel un grand soufflet, et ses frères morts ou vifs sont soulevés loin du danger.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Sisea como un gran fuelle, y sus hermanos, vivos y muertos, se elevan a un lugar seguro.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Er pumpt wie ein großer Blasebalg, um seine Artgenossen, tot wie lebendig, in Sicherheit zu bringen.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Soffia come un grosso mantice e i suoi simili, sia vivi che morti, sono sollevati al sicuro.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[それは巨大なふいごのような声を上げ、その仲間は生きているものも死んでいるものも、安全な場所まで持ち上げられる。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Like a great bellows it hisses, and its kin, both living and dead, are lifted to safety.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Подобно огромным кузнечным мехам, они раздуваются, и их родичи, и мертвые и живые, взлетают на безопасную высоту.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Como uma grande fole ele assobia, e seus semelhantes, mortos ou vivos, são elevados para a segurança.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Sliver" />
<EXPANSION value="TSP" />
<RARITY metaname="R" />
<POWER value="3" />
<TOUGHNESS value="3" />
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[All Sliver creatures have flying.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Tous les slivoïdes ont le vol et « Si cette créature devait être mise dans un cimetière, vous pouvez la mettre au-dessus de la bibliothèque de son propriétaire à la place. »]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Todos los Fragmentados tienen la habilidad de volar y “Si esta criatura fuera a un cementerio, en vez de eso, puedes ponerla en la parte superior de la biblioteca de su propietario”.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Alle Remasuris haben Flugfähigkeit und „Falls diese Kreatur auf einen Friedhof gelegt würde, kannst du sie stattdessen oben auf die Bibliothek ihres Besitzers legen”.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Tutte le creature Tramutante hanno volare.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[すべてのスリヴァーは、飛行と「このクリーチャーが墓地に置かれる場合、あなたは代わりにそれをオーナーのライブラリーの一番上に置いてもよい。」の能力を持つ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[All Sliver creatures have flying.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Все Щепки обладают Полетом и способностью “Если это существо должно попасть на кладбище, вы можете вместо этого положить его наверх библиотеки владельца.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Todos os Fractius têm voar e “Se esta criatura seria colocada em um cemitério, em vez disso, você pode colocá-la no topo do grimório de seu dono.”]]></LOCALISED_TEXT>
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add( FE_SUBTYPE, OP_IS, CREATURE_TYPE_SLIVER )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</FILTER>
<CONTINUOUS_ACTION layer="6" filter_id="0">
if FilteredCard() ~= nil then
local characteristics = FilteredCard():GetCurrentCharacteristics()
characteristics:Bool_Set( CHARACTERISTIC_FLYING, 1 )
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[All Slivers have “If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Tutti i Tramutanti hanno “Se questo permanente sta per essere messo in un cimitero, puoi invece metterlo in cima al grimorio del suo proprietario.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[All Slivers have “If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.”]]></LOCALISED_TEXT>
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add( FE_SUBTYPE, OP_IS, CREATURE_TYPE_SLIVER )
</FILTER>
<CONTINUOUS_ACTION layer="8" filter_id="0">
if FilteredCard() ~= nil then
local characteristics = FilteredCard():GetCurrentCharacteristics()
characteristics:GrantAbility(1)
characteristics:GrantAbility(2)
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY resource_id="1" replacement_query="1" >
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se questo permanente sta per essere messo in un cimitero, puoi invece metterlo in cima al grimorio del suo proprietario.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_CONSIDERED" to_zone="ZONE_GRAVEYARD" simple_qualifier="self" from_zone="ZONE_BATTLEFIELD" pre_trigger="1">
local ODC = RSN_ObjectDC()
if ODC ~= nil and ODC:Get_Int(28301) ~= 1 then
MTG():OverrideEvent()
return true
end
return false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if (EffectSource() ~= nil and EffectSource():IsToken() == false) then
local player = EffectController()
player:BeginNewMultipleChoice()
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_TOP_LIBRARY" )
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_GRAVEYARD" )
player:AskMultipleChoiceQuestion( "CARD_QUERY_PULMONIC_SLIVER" )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local effectSource = EffectSource()
local player = EffectController()
local result = player:GetMultipleChoiceResult()
if effectSource ~= nil then
if result == 0 then
effectSource:PutOnTopOfLibrary()
else
local ODC = RSN_ObjectDC()
if ODC ~= nil then
ODC:Set_Int(28301, 1)
effectSource:PutInGraveyard()
end
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id="2" forced_skip="1">
<TRIGGER value="ZONECHANGE_BEGIN" to_zone="ZONE_GRAVEYARD" simple_qualifier="self" from_zone="ZONE_ANY" />
<RESOLUTION_TIME_ACTION>
local ODC = RSN_ObjectDC()
if ODC ~= nil then
ODC:Set_Int(28301, 0)
end
</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>
the ability "If this permanent would be put into a graveyard, you may put it on top of its owner’s library instead." should be granted to all Sliver Permanents, that's why I removed
- Code: Select all
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
Re: Help with Pulmonic Sliver ["May" on replacemt_effect]
by Xander9009 » 18 Feb 2015, 21:11
Do you have RiiakShiNal's Object DC Function mod? It's required for this to work. Sorry, I kind of assumed you would already have it, but I suppose it's possible you don't. (Note, if you have the CW, then you have the ObjectDC functions).
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Help with Pulmonic Sliver ["May" on replacemt_effect]
by Zambooo » 18 Feb 2015, 21:19
if it is "Data_DLC_8192_ObjectDC.wad" then yes, I do have it
Re: Help with Pulmonic Sliver ["May" on replacemt_effect]
by RiiakShiNal » 18 Feb 2015, 23:26
As far as I know MAY does not work with replacement abilities (replacement_effect="1" or replacement_query="1").Xander9009 wrote:I don't know if it would work in an RTA, but I'd leave it in the trigger. Also, I'm pretty sure the Override is the reason the may tag won't work. Could be wrong, though.
Yes, that is the WAD that adds the ObjectDC functions.Zambooo wrote:if it is "Data_DLC_8192_ObjectDC.wad" then yes, I do have it
For the TRIGGERED_ABILITY with resource_id="2" try changing it to ZONECHANGE_END instead of ZONECHANGE_BEGIN.
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: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Help with Pulmonic Sliver ["May" on replacemt_effect]
by Zambooo » 19 Feb 2015, 02:25
Same as before: had to click on the MW choice several times (for sure more than 10)RiiakShiNal wrote:For the TRIGGERED_ABILITY with resource_id="2" try changing it to ZONECHANGE_END instead of ZONECHANGE_BEGIN.
The point is that now it just does it :no first attempt, the first time a sliver is about to go to the graveyard the Question pop-up 15-20 times before "getting" my result (or whatever the computer is doing..)
Re: Help with Pulmonic Sliver ["May" on replacemt_effect]
by RiiakShiNal » 19 Feb 2015, 02:30
Try moving the ODC:Set_Int(28301, 1) line to just after MTG():OverrideEvent() in the trigger and removing the to_zone attribute in the second TRIGGERED_ABILITY. That way the variable will be set in the trigger preventing multiple activations and regardless of which zone it moves to it should reset the ObjectDC value.
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: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
23 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 9 guests