Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Programming Talk
Overload at 95%
Moderator: CCGHQ Admins
Overload at 95%
by braquio » 18 Aug 2014, 11:59
Hi People!
I'm back with overload, i have a Cyclonic Rift aproximation at 95%.
The minor problem is that u can always play the spell at normal cost when it supose that u need a valid target, but if u do it nothing hapens so its ok.
And the real problem is that when u play it at normal cost the trigger fire 2 times instead 1, and i dont know why, cuase have <CLEANUP fire_once="1" />.
Except these problems works well.
some ideas to resolve the trigger fire?
I'm back with overload, i have a Cyclonic Rift aproximation at 95%.
- | Open
- Code: Select all
<UTILITY_ABILITY qualifier="Alternate" linked_ability_group="1">
<COST mana_cost="{1}" type="Mana"/>
<COST type="generic">
<PREREQUISITE>
return true
</PREREQUISITE>
<RESOLUTION_TIME_ACTION>
LinkedDC():Set_Int(50,1)
</RESOLUTION_TIME_ACTION>
</COST>
<ABILITY_TEXT tag="OVERLOAD_QUERY_CYCLONIC_RIFT_OVERLOADED"/>
</UTILITY_ABILITY>
<SPELL_ABILITY linked_ability_group="1">
<FILTER filter_id="1">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_NOT, CARD_TYPE_LAND )
filter:Add( FE_IS_PERMANENT, true )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController())
filter:SetZone( ZONE_BATTLEFIELD )
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="1">
if LinkedDC():Get_Int(50) == 1 then
if FilteredCard() ~= nil then
FilteredCard():PutInHand()
end
else
local delayDC = EffectDC():Make_Chest(1)
MTG():CreateDelayedTrigger(2, delayDC)
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY resource_id="2" active_zone="ZONE_ANY" linked_ability_group ="1">
<CLEANUP fire_once="1" />
<TRIGGER value="SPELL_RESOLVED" simple_qualifier="self" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_NOT, CARD_TYPE_LAND)
filter:Add( FE_IS_PERMANENT, true )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController())
</TARGET_DEFINITION>
<TARGET tag="CARD_QUERY_CHOOSE_NONLAND_PERMANENT_TO_PUT_INTO_HAND" definition="0" compartment="0">
if LinkedDC():Get_Int(50) ~= 1 then
MTG():SetTargetCount(1)
else
MTG():SetTargetCount(0)
end
</TARGET>
<RESOLUTION_TIME_ACTION>
if EffectDC():Get_Targets(0) ~= nil then
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
target:PutInHand()
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
The minor problem is that u can always play the spell at normal cost when it supose that u need a valid target, but if u do it nothing hapens so its ok.
And the real problem is that when u play it at normal cost the trigger fire 2 times instead 1, and i dont know why, cuase have <CLEANUP fire_once="1" />.
Except these problems works well.
some ideas to resolve the trigger fire?
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Re: Overload at 95%
by thefiremind » 18 Aug 2014, 12:13
You are creating the delayed trigger in a filter-based RESOLUTION_TIME_ACTION, so you are creating one for each filtered card. What you want to do is probably the following:
- Code: Select all
<RESOLUTION_TIME_ACTION filter_id="1">
if LinkedDC():Get_Int(50) == 1 and FilteredCard() ~= nil then
FilteredCard():PutInHand()
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if LinkedDC():Get_Int(50) ~= 1 then
MTG():CreateDelayedTrigger(2, nil) -- you can pass nil if you don't need any DC
end
</RESOLUTION_TIME_ACTION>
< 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: 721 times
Re: Overload at 95%
by braquio » 18 Aug 2014, 12:24
Oh Great!
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Re: Overload at 95%
by braquio » 18 Aug 2014, 12:50
Well now we can play with OVERLOAD cards!
May be not at fully work, but at least at 98%.
i see another minor problem, is that cause u do the target after the spell is resolved, if u want to counterspell it u have to do it without known the target.
May be not at fully work, but at least at 98%.
i see another minor problem, is that cause u do the target after the spell is resolved, if u want to counterspell it u have to do it without known the target.
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Re: Overload at 95%
by braquio » 18 Aug 2014, 12:53
Here the complete code:
- Cyclonic Rift | Open
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="CYCLONIC_RIFT_666270798" />
<CARDNAME text="CYCLONIC_RIFT" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Cyclonic Rift]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Faille cyclonique]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Grieta ciclónica]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Rift des Sturmtiefs]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Squarcio Ciclonico]]></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[Fenda Ciclônica]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="666270798" />
<ARTID value="666270798" />
<ARTIST name="Chris Rahn" />
<CASTING_COST cost="{1}{U}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[The Izzet specialize in unnatural disaster.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Les Izzet sont spécialisés dans les catastrophes artificielles.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Los ízzet se especializan en desastres no naturales.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Die Izzet sind auf unnatürliche Katastrophen spezialisiert.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gli Izzet sono specializzati in catastrofi innaturali.]]></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[A especialidade dos Izzet são os desastres não naturais.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Instant" />
<EXPANSION value="RTR" />
<RARITY metaname="R" />
<UTILITY_ABILITY qualifier="Alternate" linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Overload {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Surcharge {6}{U} » par « chaque ».)]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Sobrecarga {6}{U}.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Überlast {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Sovraccarico {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[超過 {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[과부하 {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Перегрузка {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Sobrecarga {6}{U}]]></LOCALISED_TEXT>
<COST mana_cost="{6}{U}" type="Mana"/>
<COST type="generic">
<PREREQUISITE>
return true
</PREREQUISITE>
<RESOLUTION_TIME_ACTION>
LinkedDC():Set_Int(50,1)
</RESOLUTION_TIME_ACTION>
</COST>
<ABILITY_TEXT tag="OVERLOAD_QUERY_CYCLONIC_RIFT_OVERLOADED"/>
</UTILITY_ABILITY>
<SPELL_ABILITY linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Return target nonland permanent you don’t control to its owner’s hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Renvoyez un permanent non-terrain ciblé que vous ne contrôlez pas dans la main de son propriétaire.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Regresa el permanente objetivo que no sea tierra que no controles a la mano de su propietario.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Bringe eine bleibende Karte deiner Wahl, die kein Land ist und die du nicht kontrollierst, auf die Hand ihres Besitzers zurück.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Fai tornare un permanente non terra bersaglio che non controlli in mano al suo proprietario.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたがコントロールしていない土地でないパーマネント1つを対象とし、それをオーナーの手札に戻す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[당신이 조종하지 않는 지속물 중 대지가 아닌 지속물 한 개를 목표로 정한다. 그 지속물을 소유자의 손으로 되돌린다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Верните целевой не являющийся землей перманент, который не находится под вашим контролем, в руку его владельца.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Devolva a permanente alvo que não seja um terreno e que você não controle para a mão de seu dono.]]></LOCALISED_TEXT>
<SFX text="TARGET_MAELSTROM_PLAY" />
<FILTER filter_id="1">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_NOT, CARD_TYPE_LAND )
filter:Add( FE_IS_PERMANENT, true )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController())
filter:SetZone( ZONE_BATTLEFIELD )
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="1">
if LinkedDC():Get_Int(50) == 1 then
if FilteredCard() ~= nil then
FilteredCard():PutInHand()
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if LinkedDC():Get_Int(50) ~= 1 then
local delayDC = EffectDC():Make_Chest(1)
MTG():CreateDelayedTrigger(2, nil)
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY resource_id="2" active_zone="ZONE_ANY" linked_ability_group ="1">
<CLEANUP fire_once="1" />
<TRIGGER value="SPELL_RESOLVED" simple_qualifier="self" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_NOT, CARD_TYPE_LAND)
filter:Add( FE_IS_PERMANENT, true )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController())
</TARGET_DEFINITION>
<TARGET tag="CARD_QUERY_CHOOSE_NONLAND_PERMANENT_TO_PUT_INTO_HAND" definition="0" compartment="0">
if LinkedDC():Get_Int(50) ~= 1 then
MTG():SetTargetCount(1)
else
MTG():SetTargetCount(0)
end
</TARGET>
<RESOLUTION_TIME_ACTION>
if EffectDC():Get_Targets(0) ~= nil then
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
target:PutInHand()
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<AI_AVAILABILITY type="in_response" response_source="1" />
<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="main_1" window_turn="my_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_BASE_SCORE score="900" zone="ZONE_HAND" />
</CARD_V2>
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Re: Overload at 95%
by NeoAnderson » 21 Aug 2014, 14:30
braquio wrote:Well now we can play with OVERLOAD cards!
May be not at fully work, but at least at 98%.
i see another minor problem, is that cause u do the target after the spell is resolved, if u want to counterspell it u have to do it without known the target.
Cannot use Counterspell properly is not minor bug, it could be fatal during the game. Anyway this bug can be fixed.braquio wrote:Here the complete code:
- Cyclonic Rift | Open
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="CYCLONIC_RIFT_666270798" />
<CARDNAME text="CYCLONIC_RIFT" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Cyclonic Rift]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Faille cyclonique]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Grieta ciclónica]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Rift des Sturmtiefs]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Squarcio Ciclonico]]></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[Fenda Ciclônica]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="666270798" />
<ARTID value="666270798" />
<ARTIST name="Chris Rahn" />
<CASTING_COST cost="{1}{U}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[The Izzet specialize in unnatural disaster.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Les Izzet sont spécialisés dans les catastrophes artificielles.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Los ízzet se especializan en desastres no naturales.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Die Izzet sind auf unnatürliche Katastrophen spezialisiert.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gli Izzet sono specializzati in catastrofi innaturali.]]></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[A especialidade dos Izzet são os desastres não naturais.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Instant" />
<EXPANSION value="RTR" />
<RARITY metaname="R" />
<UTILITY_ABILITY qualifier="Alternate" linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Overload {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Surcharge {6}{U} » par « chaque ».)]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Sobrecarga {6}{U}.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Überlast {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Sovraccarico {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[超過 {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[과부하 {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Перегрузка {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Sobrecarga {6}{U}]]></LOCALISED_TEXT>
<COST mana_cost="{6}{U}" type="Mana"/>
<COST type="generic">
<PREREQUISITE>
return true
</PREREQUISITE>
<RESOLUTION_TIME_ACTION>
LinkedDC():Set_Int(50,1)
</RESOLUTION_TIME_ACTION>
</COST>
<ABILITY_TEXT tag="OVERLOAD_QUERY_CYCLONIC_RIFT_OVERLOADED"/>
</UTILITY_ABILITY>
<SPELL_ABILITY linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Return target nonland permanent you don’t control to its owner’s hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Renvoyez un permanent non-terrain ciblé que vous ne contrôlez pas dans la main de son propriétaire.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Regresa el permanente objetivo que no sea tierra que no controles a la mano de su propietario.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Bringe eine bleibende Karte deiner Wahl, die kein Land ist und die du nicht kontrollierst, auf die Hand ihres Besitzers zurück.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Fai tornare un permanente non terra bersaglio che non controlli in mano al suo proprietario.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたがコントロールしていない土地でないパーマネント1つを対象とし、それをオーナーの手札に戻す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[당신이 조종하지 않는 지속물 중 대지가 아닌 지속물 한 개를 목표로 정한다. 그 지속물을 소유자의 손으로 되돌린다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Верните целевой не являющийся землей перманент, который не находится под вашим контролем, в руку его владельца.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Devolva a permanente alvo que não seja um terreno e que você não controle para a mão de seu dono.]]></LOCALISED_TEXT>
<SFX text="TARGET_MAELSTROM_PLAY" />
<FILTER filter_id="1">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_NOT, CARD_TYPE_LAND )
filter:Add( FE_IS_PERMANENT, true )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController())
filter:SetZone( ZONE_BATTLEFIELD )
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="1">
if LinkedDC():Get_Int(50) == 1 then
if FilteredCard() ~= nil then
FilteredCard():PutInHand()
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if LinkedDC():Get_Int(50) ~= 1 then
local delayDC = EffectDC():Make_Chest(1)
MTG():CreateDelayedTrigger(2, nil)
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY resource_id="2" active_zone="ZONE_ANY" linked_ability_group ="1">
<CLEANUP fire_once="1" />
<TRIGGER value="SPELL_RESOLVED" simple_qualifier="self" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_NOT, CARD_TYPE_LAND)
filter:Add( FE_IS_PERMANENT, true )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController())
</TARGET_DEFINITION>
<TARGET tag="CARD_QUERY_CHOOSE_NONLAND_PERMANENT_TO_PUT_INTO_HAND" definition="0" compartment="0">
if LinkedDC():Get_Int(50) ~= 1 then
MTG():SetTargetCount(1)
else
MTG():SetTargetCount(0)
end
</TARGET>
<RESOLUTION_TIME_ACTION>
if EffectDC():Get_Targets(0) ~= nil then
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
target:PutInHand()
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<AI_AVAILABILITY type="in_response" response_source="1" />
<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="main_1" window_turn="my_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_BASE_SCORE score="900" zone="ZONE_HAND" />
</CARD_V2>
I have made a revised version who fixes some bugs, but it still encounters some issues.
Fixes :
1. Now you can Counterspell the card after Target declared.
2. Partial fixed the issue about the normal cast without target :
---Now you can cast it if there is at least one no-land targetable permanent without shroud or hexproof.
---The problem is if you have enough mana to cast overload, it still give you the possibility to choose normal cast also if there are no targetable permanents.
3. The main effect is applied into Spell block.
Known bugs still unsolved :
1. If you use a Copy spell like : Increasing Vengeance the copy will not allow you to select a target.
- Cyclonic Rift - NeoRev. 0.1 | Open
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="CYCLONIC_RIFT_666270798" />
<CARDNAME text="CYCLONIC_RIFT" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Cyclonic Rift]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Faille cyclonique]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Grieta ciclónica]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Rift des Sturmtiefs]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Squarcio Ciclonico]]></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[Fenda Ciclônica]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="666270798" />
<ARTID value="666270798" />
<ARTIST name="Chris Rahn" />
<CASTING_COST cost="{1}{U}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[The Izzet specialize in unnatural disaster.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Les Izzet sont spécialisés dans les catastrophes artificielles.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Los ízzet se especializan en desastres no naturales.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Die Izzet sind auf unnatürliche Katastrophen spezialisiert.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gli Izzet sono specializzati in catastrofi innaturali.]]></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[A especialidade dos Izzet são os desastres não naturais.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Instant" />
<EXPANSION value="RTR" />
<RARITY metaname="R" />
<UTILITY_ABILITY qualifier="Alternate" linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Overload {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Surcharge {6}{U} » par « chaque ».)]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Sobrecarga {6}{U}.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Überlast {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Sovraccarico {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[超過 {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[과부하 {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Перегрузка {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Sobrecarga {6}{U}]]></LOCALISED_TEXT>
<COST mana_cost="{6}{U}" type="Mana"/>
<COST type="generic">
<PREREQUISITE>
return true
</PREREQUISITE>
<RESOLUTION_TIME_ACTION>
LinkedDC():Set_Int(50,1)
</RESOLUTION_TIME_ACTION>
</COST>
<ABILITY_TEXT tag="OVERLOAD_QUERY_CYCLONIC_RIFT_OVERLOADED"/>
</UTILITY_ABILITY>
<SPELL_ABILITY linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Return target nonland permanent you don’t control to its owner’s hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Renvoyez un permanent non-terrain ciblé que vous ne contrôlez pas dans la main de son propriétaire.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Regresa el permanente objetivo que no sea tierra que no controles a la mano de su propietario.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Bringe eine bleibende Karte deiner Wahl, die kein Land ist und die du nicht kontrollierst, auf die Hand ihres Besitzers zurück.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Fai tornare un permanente non terra bersaglio che non controlli in mano al suo proprietario.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたがコントロールしていない土地でないパーマネント1つを対象とし、それをオーナーの手札に戻す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[당신이 조종하지 않는 지속물 중 대지가 아닌 지속물 한 개를 목표로 정한다. 그 지속물을 소유자의 손으로 되돌린다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Верните целевой не являющийся землей перманент, который не находится под вашим контролем, в руку его владельца.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Devolva a permanente alvo que não seja um terreno e que você não controle para a mão de seu dono.]]></LOCALISED_TEXT>
<SFX text="TARGET_MAELSTROM_PLAY" />
<PLAY_TIME_ACTION>
if LinkedDC():Get_Int(50) ~= 1 then
local delayDC = EffectDC():Make_Chest(1)
MTG():CreateDelayedTrigger(2, nil)
end
</PLAY_TIME_ACTION>
<FILTER filter_id="1">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_NOT, CARD_TYPE_LAND )
filter:Add( FE_IS_PERMANENT, true )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController())
filter:SetZone( ZONE_BATTLEFIELD )
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="1">
if LinkedDC():Get_Int(50) == 1 then
if FilteredCard() ~= nil then
FilteredCard():PutInHand()
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if LinkedDC():Get_Int(50) ~= 1 then
local target = LinkedDC():Get_CardPtr(1000)
if target ~= nil then
target:PutInHand()
end
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY resource_id="2" replacement_query="1" linked_ability_group ="1">
<TRIGGER value="STATE_BASED_EFFECTS" simple_qualifier="self" pre_trigger="1" />
<CLEANUP fire_once="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_NOT, CARD_TYPE_LAND)
filter:Add( FE_IS_PERMANENT, true )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController())
</TARGET_DEFINITION>
<TARGET tag="CARD_QUERY_CHOOSE_NONLAND_PERMANENT_TO_PUT_INTO_HAND" definition="0" compartment="0">
if LinkedDC():Get_Int(50) ~= 1 then
MTG():SetTargetCount(1)
else
MTG():SetTargetCount(0)
end
</TARGET>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
LinkedDC():Set_CardPtr(1000, target)
LinkedDC():Protect_CardPtr(1000)
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY">
<TRIGGER value="CONSIDERED_FOR_CAST" simple_qualifier="self" pre_trigger="1" >
local OverloadStringCost = "{6}{U}"
if EffectController():CanPayManaCost(OverloadStringCost) then
MTG():OverrideEvent()
return false
else
MTG():ClearFilterMark()
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_NOT, CARD_TYPE_LAND)
filter:Add( FE_IS_PERMANENT, true )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController())
local filter_count = filter:EvaluateObjects()
for i=0,filter_count-1 do
local permanent = filter:GetNthEvaluatedObject(i)
if (permanent:GetCurrentCharacteristics():Bool_Get( CHARACTERISTIC_SHROUD ) == false) and (permanent:GetCurrentCharacteristics():Bool_Get( CHARACTERISTIC_HEXPROOF ) == false) then
permanent:MarkForFilter()
end
end
filter:SetMarkedObjectsOnly()
local count = filter:Count()
if count > 0 then
MTG():OverrideEvent()
return false
else
return true
end
end
</TRIGGER>
</TRIGGERED_ABILITY>
<AI_AVAILABILITY type="in_response" response_source="1" />
<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="main_1" window_turn="my_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_BASE_SCORE score="900" zone="ZONE_HAND" />
</CARD_V2>
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Overload at 95%
by braquio » 21 Aug 2014, 15:22
Well this go better
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Re: Overload at 95%
by RiiakShiNal » 23 Aug 2014, 12:59
I can't see any way to fix the problem with not being able to select new targets for the copy as the only way to fix that is to put the TARGET block in the SPELL_ABILITY, but that causes other problems for overload.
Well, Cyclonic rift still has problems:
I don't see any way to resolve all the problems, so as I said before making overload properly (even with an approximation) can't be done. There are just too many interaction problems that are created by any approximation we can come up with.
Well, Cyclonic rift still has problems:
- (Easy fix) The filters are set wrong, it will also consider/return invisible tokens (such as the planeswalker manager, mana tokens, etc...) to their owner's hands (at which point they will cease to exist). You should instead do a positive check for all card types except land instead of the negative check for land.
- Normal casting will not trigger effects that depend on a spell targeting a creature (such as Heroic, Avoid Fate, etc...). The only way to fix this is to put the TARGET block into the SPELL_ABILITY, but this causes other problems for overload.
- If the target becomes illegal before the spell resolves (such as gaining Shroud, Hexproof, or some other effect) then it should counter a normal cast Cyclonic Rift, but with your code that won't happen. Again, the only way to fix this is to put the TARGET block in the SPELL_ABILITY, but this causes other problems for overload.
- (Easy Fix) Due to protecting the card pointer targeted in the delayed trigger it will even affect cards that have left the battlefield (for example if the opponent sacrificed them to another effect, they would still effectively end up in their hand again). To fix simply remove the Protect_CardPtr() call.
I don't see any way to resolve all the problems, so as I said before making overload properly (even with an approximation) can't be done. There are just too many interaction problems that are created by any approximation we can come up with.
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: Overload at 95%
by braquio » 23 Aug 2014, 17:31
I'll see to fix.RiiakShiNal wrote:
- (Easy fix) The filters are set wrong, it will also consider/return invisible tokens (such as the planeswalker manager, mana tokens, etc...) to their owner's hands (at which point they will cease to exist). You should instead do a positive check for all card types except land instead of the negative check for land.
- (Easy Fix) Due to protecting the card pointer targeted in the delayed trigger it will even affect cards that have left the battlefield (for example if the opponent sacrificed them to another effect, they would still effectively end up in their hand again). To fix simply remove the Protect_CardPtr() call.
I don't think this is a problem, cause the target can becomes illegal after the spell is resolved and before the triggers do it, so the spell is not countered but it's effect yes.[*]If the target becomes illegal before the spell resolves (such as gaining Shroud, Hexproof, or some other effect) then it should counter a normal cast Cyclonic Rift, but with your code that won't happen. Again, the only way to fix this is to put the TARGET block in the SPELL_ABILITY, but this causes other problems for overload.
I'm with you in this point, i dont see any way to fix this except to put the TARGET block into the SPELL_ABILITY.[*]Normal casting will not trigger effects that depend on a spell targeting a creature (such as Heroic, Avoid Fate, etc...). The only way to fix this is to put the TARGET block into the SPELL_ABILITY, but this causes other problems for overload.
So seems that overload keep in approximation until new news.
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Re: Overload at 95%
by RiiakShiNal » 24 Aug 2014, 21:46
Actually, there isn't much point in giving a creature Shroud or Hexproof in response until it is actually targeted (in other words the triggered ability has already triggered and captured the card pointer) and since it is stored then used by another ability it is not cleared and the spell countered by the engine like a normal spell would be in that case. So I believe this is still a problem.braquio wrote:I don't think this is a problem, cause the target can becomes illegal after the spell is resolved and before the triggers do it, so the spell is not countered but it's effect yes.
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: Overload at 95%
by braquio » 24 Aug 2014, 23:41
Oh yes!, this happens in this new version, in my old version the effect of the spell without overload was in the trigger so didn't has this problem.
Well anyway, we keep this card as aproximation, a good one in my opinion, but not fully work.
Well anyway, we keep this card as aproximation, a good one in my opinion, but not fully work.
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Re: Overload at 95%
by braquio » 26 Aug 2014, 10:53
Here the new version:
Is there any code to check protection from a color?
So at the moment, Known bugs:
- Don't trigger effects that depend on a spell targeting like Heroic ability or spells like Avoid Fate.
- If you use a Copy spell like Increasing Vengeance the copy will not allow you to select a target.
- if you have enough mana to cast overload, it still give you the possibility to choose normal cast also if there are no targetable permanents.
- If the target gets protection from blue before the spell is resolved, don't avoid the effect.
- Cyclonic Rift v2.0 | Open
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="CYCLONIC_RIFT_666270798" />
<CARDNAME text="CYCLONIC_RIFT" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Cyclonic Rift]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Faille cyclonique]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Grieta ciclónica]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Rift des Sturmtiefs]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Squarcio Ciclonico]]></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[Fenda Ciclônica]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="666270798" />
<ARTID value="666270798" />
<ARTIST name="Chris Rahn" />
<CASTING_COST cost="{1}{U}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[The Izzet specialize in unnatural disaster.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Les Izzet sont spécialisés dans les catastrophes artificielles.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Los ízzet se especializan en desastres no naturales.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Die Izzet sind auf unnatürliche Katastrophen spezialisiert.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gli Izzet sono specializzati in catastrofi innaturali.]]></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[A especialidade dos Izzet são os desastres não naturais.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Instant" />
<EXPANSION value="RTR" />
<RARITY metaname="R" />
<UTILITY_ABILITY qualifier="Alternate" linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Overload {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Surcharge {6}{U} » par « chaque ».)]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Sobrecarga {6}{U}.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Überlast {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Sovraccarico {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[超過 {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[과부하 {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Перегрузка {6}{U}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Sobrecarga {6}{U}]]></LOCALISED_TEXT>
<COST mana_cost="{6}{U}" type="Mana"/>
<COST type="generic">
<PREREQUISITE>
return true
</PREREQUISITE>
<RESOLUTION_TIME_ACTION>
LinkedDC():Set_Int(50,1)
</RESOLUTION_TIME_ACTION>
</COST>
<ABILITY_TEXT tag="OVERLOAD_QUERY_CYCLONIC_RIFT_OVERLOADED"/>
</UTILITY_ABILITY>
<SPELL_ABILITY linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Return target nonland permanent you don’t control to its owner’s hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Renvoyez un permanent non-terrain ciblé que vous ne contrôlez pas dans la main de son propriétaire.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Regresa el permanente objetivo que no sea tierra que no controles a la mano de su propietario.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Bringe eine bleibende Karte deiner Wahl, die kein Land ist und die du nicht kontrollierst, auf die Hand ihres Besitzers zurück.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Fai tornare un permanente non terra bersaglio che non controlli in mano al suo proprietario.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたがコントロールしていない土地でないパーマネント1つを対象とし、それをオーナーの手札に戻す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[당신이 조종하지 않는 지속물 중 대지가 아닌 지속물 한 개를 목표로 정한다. 그 지속물을 소유자의 손으로 되돌린다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Верните целевой не являющийся землей перманент, который не находится под вашим контролем, в руку его владельца.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Devolva a permanente alvo que não seja um terreno e que você não controle para a mão de seu dono.]]></LOCALISED_TEXT>
<SFX text="TARGET_MAELSTROM_PLAY" />
<PLAY_TIME_ACTION>
if LinkedDC():Get_Int(50) ~= 1 then
MTG():CreateDelayedTrigger(2, nil)
end
</PLAY_TIME_ACTION>
<FILTER filter_id="1">
local filter = ClearFilter()
filter:SetZone( ZONE_BATTLEFIELD )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController())
local subfilter = filter:AddSubFilter_Or()
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT )
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="1">
if LinkedDC():Get_Int(50) == 1 then
if FilteredCard() ~= nil then
FilteredCard():PutInHand()
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if LinkedDC():Get_Int(50) ~= 1 then
local target = LinkedDC():Get_CardPtr(1000)
if target ~= nil then
local characteristics = target:GetCurrentCharacteristics()
if characteristics:Bool_Get( CHARACTERISTIC_SHROUD ) == false and characteristics:Bool_Get( CHARACTERISTIC_HEXPROOF ) == false then
local filter = ClearFilter()
filter:SetZone( ZONE_BATTLEFIELD )
filter:Add(FE_CARD_INSTANCE, OP_IS, target )
if filter:Count() ~= nil and filter:Count() > 0 then
target:PutInHand()
end
end
end
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY resource_id="2" replacement_query="1" linked_ability_group ="1">
<TRIGGER value="STATE_BASED_EFFECTS" simple_qualifier="self" pre_trigger="1" />
<CLEANUP fire_once="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_NOT, CARD_TYPE_LAND)
filter:Add( FE_IS_PERMANENT, true )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController())
</TARGET_DEFINITION>
<TARGET tag="CARD_QUERY_CHOOSE_NONLAND_PERMANENT_TO_PUT_INTO_HAND" definition="0" compartment="0">
if LinkedDC():Get_Int(50) ~= 1 then
MTG():SetTargetCount(1)
else
MTG():SetTargetCount(0)
end
</TARGET>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
LinkedDC():Set_CardPtr(1000, target)
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY">
<TRIGGER value="CONSIDERED_FOR_CAST" simple_qualifier="self" pre_trigger="1" >
local OverloadStringCost = "{6}{U}"
if EffectController():CanPayManaCost(OverloadStringCost) then
MTG():OverrideEvent()
return false
else
MTG():ClearFilterMark()
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_NOT, CARD_TYPE_LAND)
filter:Add( FE_IS_PERMANENT, true )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController())
local filter_count = filter:EvaluateObjects()
for i=0,filter_count-1 do
local permanent = filter:GetNthEvaluatedObject(i)
if (permanent:GetCurrentCharacteristics():Bool_Get( CHARACTERISTIC_SHROUD ) == false) and (permanent:GetCurrentCharacteristics():Bool_Get( CHARACTERISTIC_HEXPROOF ) == false) then
permanent:MarkForFilter()
end
end
filter:SetMarkedObjectsOnly()
local count = filter:Count()
if count > 0 then
MTG():OverrideEvent()
return false
else
return true
end
end
</TRIGGER>
</TRIGGERED_ABILITY>
<AI_AVAILABILITY type="in_response" response_source="1" />
<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="main_1" window_turn="my_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_BASE_SCORE score="900" zone="ZONE_HAND" />
</CARD_V2>
All fixedRiiakShiNal wrote:Well, Cyclonic rift still has problems:
- (Easy fix) The filters are set wrong, it will also consider/return invisible tokens (such as the planeswalker manager, mana tokens, etc...) to their owner's hands (at which point they will cease to exist). You should instead do a positive check for all card types except land instead of the negative check for land.
- (Easy Fix) Due to protecting the card pointer targeted in the delayed trigger it will even affect cards that have left the battlefield (for example if the opponent sacrificed them to another effect, they would still effectively end up in their hand again). To fix simply remove the Protect_CardPtr() call.
Partially fixed, now checks in resolution for shroud or hexproof, and if target is still on battlefield.[*]If the target becomes illegal before the spell resolves (such as gaining Shroud, Hexproof, or some other effect) then it should counter a normal cast Cyclonic Rift, but with your code that won't happen. Again, the only way to fix this is to put the TARGET block in the SPELL_ABILITY, but this causes other problems for overload.
Is there any code to check protection from a color?
Can't be fixed[*]Normal casting will not trigger effects that depend on a spell targeting a creature (such as Heroic, Avoid Fate, etc...). The only way to fix this is to put the TARGET block into the SPELL_ABILITY, but this causes other problems for overload.
So at the moment, Known bugs:
- Don't trigger effects that depend on a spell targeting like Heroic ability or spells like Avoid Fate.
- If you use a Copy spell like Increasing Vengeance the copy will not allow you to select a target.
- if you have enough mana to cast overload, it still give you the possibility to choose normal cast also if there are no targetable permanents.
- If the target gets protection from blue before the spell is resolved, don't avoid the effect.
Last edited by braquio on 26 Aug 2014, 15:32, edited 1 time in total.
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Re: Overload at 95%
by braquio » 26 Aug 2014, 14:42
I'm realized that in this case is only a bug for spells like Avoid Fate not for Heroic ability cause Cyclonic Rift can only target permanents you don't control so Heoric abilities never could be trigger with this spell even if the spell is 100% fine coded.braquio wrote:So at the moment, Known bugs:
- Don't trigger effects that depend on a spell targeting like Heroic ability or spells like Avoid Fate.
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Re: Overload at 95%
by RiiakShiNal » 27 Aug 2014, 00:09
You may not have to worry about Heroic for Cyclonic Rift and some others, but you would for other overload spells like Dragonshift and Dynacharge so it is still a problem with the overload approximation.braquio wrote:I'm realized that in this case is only a bug for spells like Avoid Fate not for Heroic ability cause Cyclonic Rift can only target permanents you don't control so Heoric abilities never could be trigger with this spell even if the spell is 100% fine coded.
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: Overload at 95%
by NeoAnderson » 27 Aug 2014, 00:28
To avoid Heroic issue, (You must use my Heroic version) you could use this code, just before targetting :RiiakShiNal wrote:You may not have to worry about Heroic for Cyclonic Rift and some others, but you would for other overload spells like Dragonshift and Dynacharge so it is still a problem with the overload approximation.braquio wrote:I'm realized that in this case is only a bug for spells like Avoid Fate not for Heroic ability cause Cyclonic Rift can only target permanents you don't control so Heoric abilities never could be trigger with this spell even if the spell is 100% fine coded.
- Code: Select all
local refplayer = Object():GetPlayer()
local Chest_Id = Object():GetRef()
local chest = refplayer:PlayerDataChest():Make_Chest(Chest_Id)
chest:Set_CardPtr(1, Object())
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Who is online
Users browsing this forum: No registered users and 24 guests