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 Splinterverse » 29 Oct 2016, 23:06
Maybe it's just an issue with OP_INTERSECTS and subtype as a combination. I've tried every variation on the code below and it doesn't work:Xander9009 wrote:Fixed. The OP_INTERSECTS operation in a filter will determine the function it needs to call on the third parameter based on the first parameter. If the first parameter is FE_COLOUR, then it will call GetColour() on the third parameter. So, if GetColour() is called on it already, then it internally calls GetColour() on the colours, which doesn't work, and the function fails. If the first parameter is FE_SUBTYPE, it'll internally get the subtypes from the third parameter. In any case, the third parameter should be a card (or card's LKI), directly.Splinterverse wrote:Spreading Plague in the .wad is not working properly. I tested it multiple times and attempted a fix to no avail. I tested with monocolor cards to make sure it wasn't a multicolor issue. I suspect it has something to do with INTERSECTS being used in a filter block. I've never gotten that to work. The only card in the .wad that it seems to work on is Konda's Banner, which when you look at it, doesn't appear to be different. It is this issue that has prevented me from completing Crown of Awe, Crown of Suspicion, etc. I wish there was another way to query subtype. I've tried Get_Subtype() and looked through the S_ChooseCreatureType functions etc. EDIT TO ADD: Spreading Plague is destroying all creatures except the trigger creature, rather than all creatures that share a color with the trigger creature.
Many cards successfully use OP_INTERSECTS. Konda's Banner is just the only card in the CW that uses it with FE_COLOUR. The difference between the two is that Konda's Banner provided TriggerObjectLKI() as the third parameter, while Spreading Sickness was providing TriggerObjectLKI():GetColour() as the third parameter.
- Code: Select all
<FILTER_DEFINITION filter_id="2">
local parent = EffectSourceLKI():GetParent()
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_SUBTYPE, OP_INTERSECTS, parent )
</FILTER_DEFINITION>
---------------------------------------------
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 Xander9009 » 29 Oct 2016, 23:22
This is the code for Coat of Arms, which definitely works (it's both a base game card, and I tested it to make sure)Splinterverse wrote:Maybe it's just an issue with OP_INTERSECTS and subtype as a combination. I've tried every variation on the code below and it doesn't work:
- Code: Select all
<FILTER_DEFINITION filter_id="2">
local parent = EffectSourceLKI():GetParent()
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_SUBTYPE, OP_INTERSECTS, parent )
</FILTER_DEFINITION>
- Code: Select all
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
filter:Add(FE_SUBTYPE, OP_INTERSECTS, FilteredCard())
filter:Add(FE_CARD_INSTANCE, OP_NOT, FilteredCard())
My guess would be that 'parent' is somehow invalid. Try this:
- Code: Select all
local parent = EffectSourceLKI():GetParent()
local filter = ClearFilter()
filter:Add(FE_CARD_INSTANCE, OP_IS, parent)
_______________________________
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: Community Wad
by tmxk2012917 » 30 Oct 2016, 01:30
I have a question about Campaign of Vengeance. My creature attacked the opponent, but the opponent did not lose life though I got life.
Does the opponent lose life only when he uses creatures to defend mine?
Besides, Ruthless Disposal does not have any card text, except flavor text
Does the opponent lose life only when he uses creatures to defend mine?
Besides, Ruthless Disposal does not have any card text, except flavor text
Last edited by tmxk2012917 on 30 Oct 2016, 01:36, edited 1 time in total.
- tmxk2012917
- Posts: 164
- Joined: 15 Mar 2015, 09:52
- Has thanked: 20 times
- Been thanked: 12 times
Re: Community Wad
by Xander9009 » 30 Oct 2016, 01:33
Should happen even when not blocked. Should also be fixed.tmxk2012917 wrote:I have a question about Campaign of Vengeance. My creature attacked the opponent, but the opponent did not lose life though I got life.
Does the opponent lose life only when he uses creatures to defend mine?
_______________________________
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: Community Wad
by Splinterverse » 30 Oct 2016, 10:46
I have corrected Ruthless Disposal and will upload it this evening with the cards I am coding today. Thank you for reporting.tmxk2012917 wrote:Ruthless Disposal does not have any card text, except flavor text
---------------------------------------------
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
- tmxk2012917
- Posts: 164
- Joined: 15 Mar 2015, 09:52
- Has thanked: 20 times
- Been thanked: 12 times
Re: Community Wad
by migookman » 30 Oct 2016, 14:54
A few cards tested and uploaded:
Wand of Denial
Waxmane Baku
Wood Sage
Some cards attached if anyone wants to give them a try:
Wand of Denial
Waxmane Baku
Wood Sage
Some cards attached if anyone wants to give them a try:
- Attachments
-
Problem Cards.zip
- (14.61 KiB) Downloaded 213 times
Re: Community Wad
by thefiremind » 30 Oct 2016, 15:35
Still passing by in search of things that I need to test on Magic Duels. For example, after the discussion about Crazed Firecat I tested FlipCoin on Magic Duels and discovered that it crashes the game. 
Anyway, I took a look at the "problem cards":

Anyway, I took a look at the "problem cards":
- Wake the Dead: you can't use 2 AVAILABILITY blocks, you need to put all conditions in one. Also, I'd check teams in order to know if it's an opponent's turn, even though I think it probably works the same.
- Code: Select all
<AVAILABILITY>
return MTG():GetPhase() == PHASE_COMBAT and MTG():GetCurrentTeam() ~= EffectController():GetTeam()
</AVAILABILITY>
- Whipkeeper: the Get_Damage function doesn't exist for an interrogation. You should SetObject(target_creature), and then Count(INTERROGATE_DAMAGE_DEALT, INTERROGATE_THIS_TURN). You should be able to find cards with similar effects and get the exact syntax from there (I'd need to check it as well).
- Wild Might: this seems to be a stub. There are XML comments mixed with Lua code, which probably prevent it from running and should be substituted with the missing code. I'd also be careful with compartments: the target is using compartment #1 and there's a call to Make_Targets(1) further on.
- Wound Reflection: the repeating action and the parity check are useless here: there's nothing to ask or show to the players so everything can be done in 1 pass.
- Code: Select all
<RESOLUTION_TIME_ACTION>
local n = MTG():GetNumberOfPlayers()
for i=0,n-1 do
local player = MTG():GetNthPlayer(i)
if player ~= nil and player:GetTeam() ~= EffectController():GetTeam() then
local interrogation = MTG():ClearInterrogationQuery()
interrogation:SetPlayer(player)
local life_lost_this_turn = interrogation:Count(INTERROGATE_LIFE_LOST, INTERROGATE_THIS_TURN)
player:LoseLife(life_lost_this_turn)
end
end
</RESOLUTION_TIME_ACTION>
- Zhalfirin Crusader: the problem here probably is EffectSource in the delayed triggers. I think I have seen it working sometimes, but other times it doesn't, so it's safer to save EffectSource inside the delayDC as well.
- Zur's Weirding: I'm sorry but the indentation is a mess so it's very hard to follow the code flow. There's a high chance that the problem is a missing/misplaced "end", so I'd first indent it correctly and the problem might come to light by itself.
< 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 » 30 Oct 2016, 16:14
a bug of Oviya Pashiri, Sage Lifecrafter :
The opponent has her on the battleground.The token created via her second ability always has 3/3 instead of x/x, no matter how any creatures the opponent have on the battleground.
Also,
[lua] [string "PURESTEEL_PALADIN_CW_227504_TITLE (MAY)~0x0000485e"]:3: '<eof>' expected near 'then'
When the opponent has Puresteel Paladin and 5 weapons on the battleground, the game stayed in his combat phrase and could not continue.
The opponent has her on the battleground.The token created via her second ability always has 3/3 instead of x/x, no matter how any creatures the opponent have on the battleground.
Also,
[lua] [string "PURESTEEL_PALADIN_CW_227504_TITLE (MAY)~0x0000485e"]:3: '<eof>' expected near 'then'
When the opponent has Puresteel Paladin and 5 weapons on the battleground, the game stayed in his combat phrase and could not continue.
- tmxk2012917
- Posts: 164
- Joined: 15 Mar 2015, 09:52
- Has thanked: 20 times
- Been thanked: 12 times
Re: Community Wad
by Splinterverse » 30 Oct 2016, 17:24
I will test Oviya Pashiri, Sage Lifecrafter, and if I have a fix, I will upload it later today.tmxk2012917 wrote:a bug of Oviya Pashiri, Sage Lifecrafter :
The opponent has her on the battleground.The token created via her second ability always has 3/3 instead of x/x, no matter how any creatures the opponent have on the battleground.
---------------------------------------------
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 Xander9009 » 30 Oct 2016, 17:26
Puresteel Paladin is fixed.
_______________________________
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: Community Wad
by Splinterverse » 30 Oct 2016, 21:54
Finished coding for today; all cards referenced are from the missing cards list.
Coded, tested, and uploaded:
Ana Sanctuary
Baki's Curse
Banshee of the Dread Choir
Blade of Selves
Bloodspore Thrinax
Broodbirth Viper
Ceta Sanctuary
Crazed Firecat
Creature Bond
Crown of the Ages
Daxos's Torment
Draco
Enchantment Alteration
Forbidden Crypt
Herald of the Host
Instill Furor
Jilt
Magma Burst
Mana-Charged Dragon
Mindstorm Crown
Mistfolk
Mogg Infestation
Mystifying Maze
Nameless Race
Nature's Chosen
Nature's Wrath
Necra Sanctuary
Necromancer's Magemark
Nemesis Trap
Scrambleverse
Bugs fixed:
Caller of the Pack -- had "local" in front of an EffectDC():Set_Int
Eldrazi Displacer -- was not tapping exiled card upon its return
Ojutai Exemplars -- was not tapping upon its return from exile; tested
Oviya Pashiri, Sage Lifecrafter -- was not basing X/X on creature count; tested
Phytotitan -- was not tapping upon its return from exile; tested
Ruthless Disposal -- was missing ability text
Warchief Giant -- had "local" in front of an EffectDC():Set_Int
HQ art uploaded (all were missing):
Banshee of the Dread Choir
Blade of Selves
Bloodspore Thrinax
Broodbirth Viper
Daxos's Torment
Herald of the Host
Mana-Charged Dragon
Mystifying Maze
Scrambleverse
Open Items:
-- CW_CARD_QUERY_SPLINTERVERSE has been updated and uploaded.
-- Draco (coded and uploaded today) works properly, but it doesn't show it's native casting cost of 16. My guess is DOTP 2014 doesn't include a symbol for 16 and therefore it is blank (it is present in the deck builder though). The card still functions as it should. I did check the 15 cost Emrakul and saw that its symbol does show in game, so maybe 15 is the cutoff point? At any rate, if there is a trick to making it show, please let me know.
-- How do we reference an aura from the parent card? Nettlevine Blight is coded but because the ability is being granted to the parent, I can't seem to get it to identify the aura within that ability. I could check to see if something is attached. I could even check for the aura's name, but how would I know if it is truly the one aura that I am trying to target (since technically, there could be two copies of it attached)?
-- Firestorm Phoenix is coded, but I can't get it to not allow casting of itself during the turn in which it was returned to my hand. http://pastebin.com/ADMKkpCD
Next:
Back on Wednesday for more coding.
Coded, tested, and uploaded:
Ana Sanctuary
Baki's Curse
Banshee of the Dread Choir
Blade of Selves
Bloodspore Thrinax
Broodbirth Viper
Ceta Sanctuary
Crazed Firecat
Creature Bond
Crown of the Ages
Daxos's Torment
Draco
Enchantment Alteration
Forbidden Crypt
Herald of the Host
Instill Furor
Jilt
Magma Burst
Mana-Charged Dragon
Mindstorm Crown
Mistfolk
Mogg Infestation
Mystifying Maze
Nameless Race
Nature's Chosen
Nature's Wrath
Necra Sanctuary
Necromancer's Magemark
Nemesis Trap
Scrambleverse
Bugs fixed:
Caller of the Pack -- had "local" in front of an EffectDC():Set_Int
Eldrazi Displacer -- was not tapping exiled card upon its return
Ojutai Exemplars -- was not tapping upon its return from exile; tested
Oviya Pashiri, Sage Lifecrafter -- was not basing X/X on creature count; tested
Phytotitan -- was not tapping upon its return from exile; tested
Ruthless Disposal -- was missing ability text
Warchief Giant -- had "local" in front of an EffectDC():Set_Int
HQ art uploaded (all were missing):
Banshee of the Dread Choir
Blade of Selves
Bloodspore Thrinax
Broodbirth Viper
Daxos's Torment
Herald of the Host
Mana-Charged Dragon
Mystifying Maze
Scrambleverse
Open Items:
-- CW_CARD_QUERY_SPLINTERVERSE has been updated and uploaded.
-- Draco (coded and uploaded today) works properly, but it doesn't show it's native casting cost of 16. My guess is DOTP 2014 doesn't include a symbol for 16 and therefore it is blank (it is present in the deck builder though). The card still functions as it should. I did check the 15 cost Emrakul and saw that its symbol does show in game, so maybe 15 is the cutoff point? At any rate, if there is a trick to making it show, please let me know.
-- How do we reference an aura from the parent card? Nettlevine Blight is coded but because the ability is being granted to the parent, I can't seem to get it to identify the aura within that ability. I could check to see if something is attached. I could even check for the aura's name, but how would I know if it is truly the one aura that I am trying to target (since technically, there could be two copies of it attached)?
-- Firestorm Phoenix is coded, but I can't get it to not allow casting of itself during the turn in which it was returned to my hand. http://pastebin.com/ADMKkpCD
Next:
Back on Wednesday for more coding.
---------------------------------------------
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 Xander9009 » 30 Oct 2016, 22:13
For Nettlevine Blight, I'm not sure it'll work, but you could try Object().
For Firestorm Phoenix, it's changing zones, which makes EffectSource() nil. You need to protect the pointer. Should be
EffectDC():Protect_CardPtr(COMPARTMENT_ID_EFFECT_SOURCE).
For Firestorm Phoenix, it's changing zones, which makes EffectSource() nil. You need to protect the pointer. Should be
EffectDC():Protect_CardPtr(COMPARTMENT_ID_EFFECT_SOURCE).
_______________________________
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: Community Wad
by thefiremind » 30 Oct 2016, 23:07
This is how I solved the problem in DotP2013: pick the first one you find with that name by evaluating the filter. If you want to be picky, you could let the player decide which Nettlevine Blight to move, since theoretically you should be able to sort the triggers and resolve the one you want first (the other triggers will basically fizzle since all the other Nettlevine Blights will fall off after sacrificing the permanent).Splinterverse wrote:I could even check for the aura's name, but how would I know if it is truly the one aura that I am trying to target (since technically, there could be two copies of it attached)?
< 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 » 30 Oct 2016, 23:10
That sounds like a good tactic. I'll give it a whirl on Wednesday.thefiremind wrote:This is how I solved the problem in DotP2013: pick the first one you find with that name by evaluating the filter. If you want to be picky, you could let the player decide which Nettlevine Blight to move, since theoretically you should be able to sort the triggers and resolve the one you want first (the other triggers will basically fizzle since all the other Nettlevine Blights will fall off after sacrificing the permanent).Splinterverse wrote:I could even check for the aura's name, but how would I know if it is truly the one aura that I am trying to target (since technically, there could be two copies of it attached)?
---------------------------------------------
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
Who is online
Users browsing this forum: Google [Bot] and 18 guests