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




Community Wad
Moderator: CCGHQ Admins
Re: Community Wad
by thefiremind » 25 Nov 2016, 12:55
It's a situation similar to Nacatl War-Pride: you can code an approximation that works well most of the times. Use CHARACTERISTIC_MUST_ATTACK for the first part, and a CANT_ATTACK_TEST trigger that excludes yourself for the second part. The approximation fails in some of the scenarios described in the Gatherer rulings, but they should be rare enough to be ignored.Splinterverse wrote:What do you think about the Goading mechanic, which reads "Until your next turn, [goaded] creature attacks each combat if able and attacks a player other than you if able."
(For the CANT_ATTACK_TEST, search for an example and follow that, because the usage is not intuitive at all: I always need an example at hand when using it.)
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
Re: Community Wad
by migookman » 25 Nov 2016, 15:21
That fixed it. Will be uploading Sands of Time soon. Thanks Splinterverse.Splinterverse wrote:I think the issue is that you need "BEGINNING_OF_PLAYERS_STEP" instead of "BEGINNING_OF_STEP" in that Triggered Ability.migookman wrote:I tried coding Sands of Time but the last triggered ability isn't doing anything:
- Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="SANDS_OF_TIME_CW_3601" />
<CARDNAME text="SANDS_OF_TIME" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Sables du temps]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Arenas del tiempo]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sand der Zeit]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Sabbie del Tempo]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Areias do Tempo]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="3601" />
<ARTID value="SANDS_OF_TIME" />
<ARTIST name="Paul Lee" />
<CASTING_COST cost="{4}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[“Aber einst, mit der Hilfe eines Magiers, wurde die Zeit gestoppt, und der Tag stand still.“ -“Das Liebeslied von Tag und Nacht“]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Artifact" />
<EXPANSION value="VI" />
<RARITY metaname="R" />
<TRIGGERED_ABILITY replacement_effect="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[<span class=“missing”>(Missing!)</span>]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[<span class=“missing”>(Missing!)</span>]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Jeder Spieler übergeht seine Enttap-Phase. Enttappe zu Beginn des Zuges eines Spielers alle getappten Artefakte, Kreaturen und Länder, die dieser Spieler kontrolliert, und tappe alle ungetappten Artefakte, Kreaturen und Länder, die dieser Spieler kontrolliert.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[<span class=“missing”>(Missing!)</span>]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[<span class=“missing”>(Missing!)</span>]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" pre_trigger="1">
return MTG():GetStep() == STEP_UNTAP
</TRIGGER>
<RESOLUTION_TIME_ACTION>
MTG():SkipStep()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
<TRIGGER value="BEGINNING_OF_STEP">
return MTG():GetStep() == STEP_UPKEEP
</TRIGGER>
<FILTER filter_id="0">
local filter = ClearFilter()
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_LAND )
filter:Add( FE_CONTROLLER, OP_IS, TriggerPlayer())
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="0">
if FilteredCard() ~= nil then
if FilteredCard():IsTapped() then
FilteredCard():Untap()
else
FilteredCard():Tap()
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
</CARD_V2>
Re: Community Wad
by Splinterverse » 25 Nov 2016, 15:23
No problem. Happy to help any way I can.migookman wrote:That fixed it. Will be uploading Sands of Time soon. Thanks Splinterverse.

---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by Splinterverse » 25 Nov 2016, 15:23
Anyone know how to determine the "active player" (i.e., the player whose turn it is currently)?
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by thefiremind » 25 Nov 2016, 15:31
The one for which player:MyTurn() returns true.Splinterverse wrote:Anyone know how to determine the "active player" (i.e., the player whose turn it is currently)?

EDIT: ...or in a BEGINNING_OF_PLAYERS_STEP, it's always TriggerPlayer().
< 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: Community Wad
by nivmizzet1 » 25 Nov 2016, 16:07
I think the code for the first effect on Talon of Pain is incorrect -- I can't see where it excludes itself from the sources able to trigger it. But I'm not knowledgeable enough to know how to fix it (or even to be 100% sure it's incorrect).
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever a source you control other than Talon of Pain deals damage to an opponent, put a charge counter on Talon of Pain.]]></LOCALISED_TEXT>
<COUNTER_REGISTRATION name="Charge" proliferate="11" />
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" simple_qualifier="objectyoucontrol" damage_type="all">
return SecondaryPlayer():GetTeam() ~= EffectController():GetTeam()
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local oSource = EffectSource()
if oSource ~= nil then
oSource:AddCounters(MTG():GetCountersType("Charge"), 1)
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
______________________________________
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
- nivmizzet1
- Posts: 617
- Joined: 21 Mar 2013, 10:10
- Has thanked: 100 times
- Been thanked: 25 times
Re: Community Wad
by thefiremind » 25 Nov 2016, 16:28
You don't want the triggered ability to intercept damage dealt by Talon of Pain itself (the effect source), so:nivmizzet1 wrote:I think the code for the first effect on Talon of Pain is incorrect -- I can't see where it excludes itself from the sources able to trigger it. But I'm not knowledgeable enough to know how to fix it (or even to be 100% sure it's incorrect).
- Code: Select all
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" simple_qualifier="objectyoucontrol" damage_type="all">
return SecondaryPlayer():GetTeam() ~= EffectController():GetTeam() and TriggerObject() ~= EffectSource()
</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: Community Wad
by Splinterverse » 25 Nov 2016, 16:37
I'll put this change in and upload it with my work later today.thefiremind wrote:You don't want the triggered ability to intercept damage dealt by Talon of Pain itself (the effect source), so:nivmizzet1 wrote:I think the code for the first effect on Talon of Pain is incorrect -- I can't see where it excludes itself from the sources able to trigger it. But I'm not knowledgeable enough to know how to fix it (or even to be 100% sure it's incorrect).
- Code: Select all
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" simple_qualifier="objectyoucontrol" damage_type="all">
return SecondaryPlayer():GetTeam() ~= EffectController():GetTeam() and TriggerObject() ~= EffectSource()
</TRIGGER>
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by Splinterverse » 25 Nov 2016, 22:14
Finished coding for today; all cards referenced are from the missing cards list.
Coded, tested, and uploaded:
Adriana, Captain of the Guard
Alpha Brawl
Ballot Broker (includes disclaimer text until all voting cards are coded)
Borderland Explorer
Bower Passage
Brago's Representative (includes disclaimer text until all voting cards are coded)
Custodi Soulcaller
Deputized Protester
Elemental Appeal
Fang of the Pack
Grenzo's Ruffians
Lieutenants of the Guard
Sanctum Prelate
Sickening Dreams
Turbulent Dreams
Viridian Betrayers
Visions
Void
Volcanic Eruption
Wandering Eye
Bugs fixed:
Builder's Bane -- removed commented out code from when I coded it
Talon of Pain -- restricted to creatures other than Talon per earlier forum post; not tested
Tempt with Discovery -- pointer correction
HQ art uploaded (some were missing; others were HQ upgrades):
Adriana, Captain of the Guard
Ballot Broker
Brago's Representative -- HQ upgrade
Custodi Lich
Custodi Soulcaller
Deputized Protester
Fang of the Pack
Grenzo's Ruffians
Jeering Homunculus
Lieutenants of the Guard
Sanctum Prelate -- HQ upgrade
Skittering Crustacean -- HQ upgrade
Splitting Slime -- HQ upgrade
Open Items:
-- CW_CARD_QUERY_SPLINTERVERSE has been updated and uploaded.
-- Xander, the new counters don't appear to be working. I have uploaded Spirit Shackle with a reference to the new counters, so you can use that to test if you want. I think they are causing this error:
[lua] [string "_MANAGER_CHARACTERISTICS_TITLE (CONTINUOUS_ACTION)~0x0000038f"]:5: attempt to call method 'AddPower' (a nil value)
[lua] [string "_MANAGER_CHARACTERISTICS_TITLE (CONTINUOUS_ACTION)~0x0000038c"]:5: attempt to call method 'AddToughness' (a nil value)[/code]
-- Bösium Strip is now giving the top card the ability to be played, but I will shelve it unless anyone has ideas on how to make the card that is cast end up exiled instead of in the graveyard.
-- Chained Throatseeker http://pastebin.com/4tahH0hW Able to attack when defending player is not poisoned.
-- Can CARD_QUERY files only contain messages that include CARD_QUERY in them? I have some KICKER messages in my lol file and they are not being translated.
Next:
Back tomorrow to continue coding missing cards.
Coded, tested, and uploaded:
Adriana, Captain of the Guard
Alpha Brawl
Ballot Broker (includes disclaimer text until all voting cards are coded)
Borderland Explorer
Bower Passage
Brago's Representative (includes disclaimer text until all voting cards are coded)
Custodi Soulcaller
Deputized Protester
Elemental Appeal
Fang of the Pack
Grenzo's Ruffians
Lieutenants of the Guard
Sanctum Prelate
Sickening Dreams
Turbulent Dreams
Viridian Betrayers
Visions
Void
Volcanic Eruption
Wandering Eye
Bugs fixed:
Builder's Bane -- removed commented out code from when I coded it
Talon of Pain -- restricted to creatures other than Talon per earlier forum post; not tested
Tempt with Discovery -- pointer correction
HQ art uploaded (some were missing; others were HQ upgrades):
Adriana, Captain of the Guard
Ballot Broker
Brago's Representative -- HQ upgrade
Custodi Lich
Custodi Soulcaller
Deputized Protester
Fang of the Pack
Grenzo's Ruffians
Jeering Homunculus
Lieutenants of the Guard
Sanctum Prelate -- HQ upgrade
Skittering Crustacean -- HQ upgrade
Splitting Slime -- HQ upgrade
Open Items:
-- CW_CARD_QUERY_SPLINTERVERSE has been updated and uploaded.
-- Xander, the new counters don't appear to be working. I have uploaded Spirit Shackle with a reference to the new counters, so you can use that to test if you want. I think they are causing this error:
[lua] [string "_MANAGER_CHARACTERISTICS_TITLE (CONTINUOUS_ACTION)~0x0000038f"]:5: attempt to call method 'AddPower' (a nil value)
[lua] [string "_MANAGER_CHARACTERISTICS_TITLE (CONTINUOUS_ACTION)~0x0000038c"]:5: attempt to call method 'AddToughness' (a nil value)[/code]
-- Bösium Strip is now giving the top card the ability to be played, but I will shelve it unless anyone has ideas on how to make the card that is cast end up exiled instead of in the graveyard.
-- Chained Throatseeker http://pastebin.com/4tahH0hW Able to attack when defending player is not poisoned.
-- Can CARD_QUERY files only contain messages that include CARD_QUERY in them? I have some KICKER messages in my lol file and they are not being translated.
Next:
Back tomorrow to continue coding missing cards.
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by thefiremind » 25 Nov 2016, 22:24
The condition for the CANT_ATTACK_TEST should be "== 0" rather than "> 0". It should return true when the creature can't attack. I said it wasn't very intuitive...Splinterverse wrote:-- Chained Throatseeker http://pastebin.com/4tahH0hW Able to attack when defending player is not poisoned.

You can call the messages with any name you want. Double check that there are no typos.Splinterverse wrote:-- Can CARD_QUERY files only contain messages that include CARD_QUERY in them? I have some KICKER messages in my lol file and they are not being translated.
< 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: Community Wad
by Splinterverse » 25 Nov 2016, 23:05
Here's my attempt at a card with the Goad mechanic -- Jeering Homunculus http://pastebin.com/dsWtDeA6. However, nothing works on the card. I've tried variations, including F4A matches. I was planning to add more to the attack_test trigger once I got it working (a check to see if there are no other players to attack, because in that situation it IS supposed to attack the player who goaded it).
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by thefiremind » 26 Nov 2016, 00:04
I made a bit of... cleanup (which you forgot to include in the delayed trigger, by the waySplinterverse wrote:-- Jeering Homunculus http://pastebin.com/dsWtDeA6

- Jeering Homunculus cleaned-up code (untested) | Open
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US">...</LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
<TARGET tag="SPL_CARD_QUERY_CHOOSE_CREATURE_TO_GOAD" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
if creature ~= nil then
local turn = MTG():GetTurnNumber()
EffectDC():Set_Int(33, turn)
local delayDC = EffectDC():Make_Chest(1)
delayDC:Set_CardPtr(0, creature)
delayDC:Set_PlayerPtr(1, EffectController())
delayDC:Set_Int(33, turn)
MTG():CreateDelayedTrigger(2, delayDC)
end
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="8">
local creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
if creature ~= nil then
creature:GetCurrentCharacteristics():Bool_Set( CHARACTERISTIC_MUST_ATTACK, 1 )
end
</CONTINUOUS_ACTION>
<DURATION>
return EffectDC():Get_Targets(0):Get_CardPtr(0) == nil or TFM_UntilMyNextTurn( EffectDC():Get_Int(33) )
</DURATION>
<MAY />
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id="2" replacement_effect="1">
<TRIGGER value="CANT_ATTACK_PLAYER_TEST" pre_trigger="1">
return TriggerObject() == EffectDC():Get_CardPtr(0) and TriggerPlayer() == EffectDC():Get_PlayerPtr(1)
</TRIGGER>
<CLEANUP>
return EffectDC():Get_CardPtr(0) == nil or TFM_UntilMyNextTurn( EffectDC():Get_Int(33) )
</CLEANUP>
</TRIGGERED_ABILITY>
I removed the short-circuit check for the target chest being not nil ("EffectDC():Get_Targets(0) and...") because the TARGET block always initializes the chest so it will never be nil. It doesn't hurt if you leave it, and it's better to add it when not needed than to forget it when needed, but in this case I can guarantee it's not needed.

It would be a wonderful idea, but I doubt it would be easy to accomplish. The only way to do it that I can think of is to save in an ObjectDC the players that each creature is unable to attack, so that you can check them whenever you want. All the cards that enforce a similar kind of restriction would need to be revised so that they do the same.Splinterverse wrote:(a check to see if there are no other players to attack, because in that situation it IS supposed to attack the player who goaded it).
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
Re: Community Wad
by tmxk2012917 » 26 Nov 2016, 03:34
A bug of Fork in the Road:
I picked two land cards. One then entered my graveyard while the other was not put into my hand.
I picked two land cards. One then entered my graveyard while the other was not put into my hand.
- tmxk2012917
- Posts: 164
- Joined: 15 Mar 2015, 09:52
- Has thanked: 20 times
- Been thanked: 12 times
Re: Community Wad
by Splinterverse » 26 Nov 2016, 09:15
Thanks for the feedback. I will try this today.
My thinking was a couple of things. One, a simple check to see if the current number of players is 2. While that wouldn't handle it all, it would at least determine if it was a 2 player game or a F4A where only 2 were left. In both of those situations, the goaded creature should be able to attack the other player. Perhaps a filter on players/teams + count and/or a sharedlifetotal check could handle the 2HG cases. Both of these would be inside the CAN'T ATTACK TEST trigger.thefiremind wrote:It would be a wonderful idea, but I doubt it would be easy to accomplish. The only way to do it that I can think of is to save in an ObjectDC the players that each creature is unable to attack, so that you can check them whenever you want. All the cards that enforce a similar kind of restriction would need to be revised so that they do the same.Splinterverse wrote:(a check to see if there are no other players to attack, because in that situation it IS supposed to attack the player who goaded it).
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by nivmizzet1 » 26 Nov 2016, 10:15
Can anyone help with either (or both) of these two cards? Both are so close, but just aren't working.
Wandering Fumarole: it enters tapped as desired, it's mana ability works fine, and I can get it to become a creature with the ability "{0}: Switch this creature’s power and toughness until end of turn.", but it's this granted ability that doesn't seem to be working.
Wandering Fumarole: it enters tapped as desired, it's mana ability works fine, and I can get it to become a creature with the ability "{0}: Switch this creature’s power and toughness until end of turn.", but it's this granted ability that doesn't seem to be working.
- Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="WANDERING_FUMAROLE_MM_CW_407692" />
<CARDNAME text="WANDERING_FUMAROLE" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Wandering Fumarole]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="407692" />
<ARTID value="WANDERING_FUMAROLE" />
<ARTIST name="Florian de Gesincourt" />
<CASTING_COST cost="" />
<TYPE metaname="Land" />
<EXPANSION value="OGW" />
<RARITY metaname="R" />
<TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Wandering Fumarole enters the battlefield tapped.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" pre_trigger="1" />
<RESOLUTION_TIME_ACTION>
if TriggerObject() ~= nil then
TriggerObject():Tap()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<ACTIVATED_ABILITY forced_skip="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Add {U} or {R} to your mana pool.]]></LOCALISED_TEXT>
<COST type="TapSelf" />
<MODE_SELECT tag="MODE_CHOOSE_ONE">
<MODE tag="RSN_MODE_PRODUCE_U" index="1" />
<MODE tag="RSN_MODE_PRODUCE_R" index="2" />
</MODE_SELECT>
<PLAY_TIME_ACTION>
RSN_MarkManaAbilityStart()
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION mode="1">
RSN_Produce( "{U}", 1 )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION mode="2">
RSN_Produce( "{R}", 1 )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
RSN_EliminateExtraManaTokens()
S_DisplayManaPool(EffectController())
RSN_MarkManaAbilityEnd()
</RESOLUTION_TIME_ACTION>
<AI_AVAILABILITY window_step="upkeep" type="window" />
<AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="begin_combat" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="declare_attackers" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="declare_blockers" type="window" />
<AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="end_of_turn" type="window" />
<AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
<AI_AVAILABILITY type="in_response" response_source="1" response_target="1" />
<AI_AVAILABILITY type="in_response" response_source="1" />
<AI_AVAILABILITY type="in_response" response_target="1" />
</ACTIVATED_ABILITY>
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{2}{U}{R}: Until end of turn, Wandering Fumarole becomes a 1/4 blue and red Elemental creature with “{0}: Switch this creature’s power and toughness until end of turn.” It’s still a land.]]></LOCALISED_TEXT>
<COST mana_cost="{2}{U}{R}" type="Mana" />
<CONTINUOUS_ACTION layer="4">
if EffectSource() ~= nil then
local characteristics = EffectSource():GetCurrentCharacteristics()
local card_type = characteristics:CardType_GetWritable()
local sub_type = characteristics:SubType_GetWritable()
card_type:Add( CARD_TYPE_CREATURE)
sub_type:ClearAllOfType( CARD_TYPE_CREATURE )
sub_type:Add(CREATURE_TYPE_ELEMENTAL)
end
</CONTINUOUS_ACTION>
<CONTINUOUS_ACTION layer="6">
if EffectSource() ~= nil then
EffectSource():GetCurrentCharacteristics():GrantAbility(3)
end
</CONTINUOUS_ACTION>
<CONTINUOUS_ACTION layer="7B">
if EffectSource() ~= nil then
local characteristics = EffectSource():GetCurrentCharacteristics()
characteristics:Power_Set( 1 )
characteristics:Toughness_Set( 4 )
end
</CONTINUOUS_ACTION>
<CONTINUOUS_ACTION layer="5">
if EffectSource() ~= nil then
EffectSource():GetCurrentCharacteristics():Colour_Set( COLOUR_RED )
EffectSource():GetColour():Add( COLOUR_BLUE )
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
<AUTO_SKIP>
if Object():GetCardType():Test( CARD_TYPE_CREATURE ) then
return true
end
return false
</AUTO_SKIP>
<AI_AVAILABILITY window_step="declare_blockers" type="window" window_in_combat="1" />
<AI_AVAILABILITY type="in_response" response_source="1" />
<AI_AVAILABILITY type="restriction" restriction_type="no_regeneration_shield" />
<AI_MODIFIERS combat_immunity="1" />
</ACTIVATED_ABILITY>
<STATIC_ABILITY>
<CONTINUOUS_ACTION layer="0">
RSN_ClearCanProduceMana()
RSN_MarkCanProduceMana("{U}{R}")
</CONTINUOUS_ACTION>
<CONTINUOUS_ACTION layer="8">
local nDefaultColour = COLOUR_BLUE
local oCard = EffectSource()
if (RSN_CheckSwitchToFallback(oCard)) then
local nColour = RSN_GetLastProducedColour()
local oCharacteristics = oCard:GetCurrentCharacteristics()
if (nColour ~= COLOUR_COLOURLESS) then
oCharacteristics:GrantAbility(nColour)
else
oCharacteristics:GrantAbility(nDefaultColour)
end
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY forced_skip="1" replacement_effect="1">
<TRIGGER value="BEGINNING_OF_STEP" pre_trigger="1" />
<RESOLUTION_TIME_ACTION>
RSN_ClearProducedMana()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<MANA_ABILITY resource_id="2">
<COST type="TapSelf" />
<PRODUCES amount="{U}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="4">
<COST type="TapSelf" />
<PRODUCES amount="{R}" />
</MANA_ABILITY>
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_U" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_R" />
<ACTIVATED_ABILITY resource_id="3">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{0}: Switch this creature’s power and toughness until end of turn.]]></LOCALISED_TEXT>
<COST mana_cost="{0}" type="Mana" />
<CONTINUOUS_ACTION layer="7E">
if EffectSource() ~= nil then
EffectSource():GetCurrentCharacteristics():SwitchPowerToughness()
end
</CONTINUOUS_ACTION>
<AI_AVAILABILITY window_step="declare_blockers" type="window" window_in_combat="1" />
<AI_AVAILABILITY type="in_response" response_source="1" />
<AI_AVAILABILITY type="restriction" restriction_type="no_regeneration_shield" />
<AI_MODIFIERS combat_immunity="1" />
</ACTIVATED_ABILITY>
<AUTHOR><![CDATA[Xander9009]]></AUTHOR>
<EDITORS><![CDATA[Xander9009, NivMizzet1]]></EDITORS>
<DATE><![CDATA[11-02-16, 22-11-16]]></DATE>
</CARD_V2>
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="QUEST_FOR_PURE_FLAME_CW_197407" />
<CARDNAME text="QUEST_FOR_PURE_FLAME" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Quest for Pure Flame]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="197407" />
<ARTID value="QUEST_FOR_PURE_FLAME" />
<ARTIST name="Cyril Van Der Haegen" />
<CASTING_COST cost="{R}" />
<TYPE metaname="Enchantment" />
<EXPANSION value="ZEN" />
<RARITY metaname="U" />
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever a source you control deals damage to an opponent, you may put a quest counter on Quest for Pure Flame.]]></LOCALISED_TEXT>
<COUNTER_REGISTRATION name="Quest" proliferate="11" />
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" simple_qualifier="objectyoucontrol" damage_type="all">
return SecondaryPlayer():GetTeam() ~= EffectController():GetTeam()
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local oSource = EffectSource()
if oSource ~= nil then
oSource:AddCounters(MTG():GetCountersType("Quest"), 1)
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Remove four quest counters from Quest for Pure Flame and sacrifice it: If any source you control would deal damage to a creature or player this turn, it deals double that damage to that creature or player instead.]]></LOCALISED_TEXT>
<COUNTER_REGISTRATION name="Quest" proliferate="11" />
<COST type="RemoveCountersSelf" amount="4" counter_type="Quest" />
<COST type="SacrificeSelf" />
<CONTINUOUS_ACTION layer="6">
if EffectController() ~= nil then
EffectController():GetCurrentCharacteristics():GrantAbility(3)
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
</ACTIVATED_ABILITY>
<TRIGGERED_ABILITY replacement_effect="1" resource_id="3">
<TRIGGER value="SOURCE_DEALS_DAMAGE" simple_qualifier="objectyoucontrol" pre_trigger="1" damage_type="all" />
<RESOLUTION_TIME_ACTION>
Damage():Multiply(2)
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<AUTHOR><![CDATA[NivMizzet1]]></AUTHOR>
<EDITORS><![CDATA[NivMizzet1]]></EDITORS>
<DATE><![CDATA[26-11-16]]></DATE>
</CARD_V2>
______________________________________
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
- nivmizzet1
- Posts: 617
- Joined: 21 Mar 2013, 10:10
- Has thanked: 100 times
- Been thanked: 25 times
Who is online
Users browsing this forum: No registered users and 9 guests