Page 142 of 253

Re: Community Wad

PostPosted: 29 Oct 2016, 23:06
by Splinterverse
Xander9009 wrote:
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.
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.

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.
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>

Re: Community Wad

PostPosted: 29 Oct 2016, 23:22
by Xander9009
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>
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)
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())
That's in a CA running on another filter, but the idea should be the same.

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)
See if parent is affected. If not, then that's the problem. If not, then I'm not sure what's going on, but I'll troubleshoot it on my end.

Re: Community Wad

PostPosted: 30 Oct 2016, 01:30
by tmxk2012917
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

Re: Community Wad

PostPosted: 30 Oct 2016, 01:33
by Xander9009
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?
Should happen even when not blocked. Should also be fixed.

Re: Community Wad

PostPosted: 30 Oct 2016, 10:46
by Splinterverse
tmxk2012917 wrote:Ruthless Disposal does not have any card text, except flavor text
I have corrected Ruthless Disposal and will upload it this evening with the cards I am coding today. Thank you for reporting.

Re: Community Wad

PostPosted: 30 Oct 2016, 14:50
by tmxk2012917
CW core disappears for some reason

Re: Community Wad

PostPosted: 30 Oct 2016, 14:54
by migookman
A few cards tested and uploaded:
Wand of Denial
Waxmane Baku
Wood Sage

Some cards attached if anyone wants to give them a try:

Re: Community Wad

PostPosted: 30 Oct 2016, 15:35
by thefiremind
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. #-o

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.

Re: Community Wad

PostPosted: 30 Oct 2016, 16:14
by tmxk2012917
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.

Re: Community Wad

PostPosted: 30 Oct 2016, 17:24
by Splinterverse
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.
I will test Oviya Pashiri, Sage Lifecrafter, and if I have a fix, I will upload it later today.

Re: Community Wad

PostPosted: 30 Oct 2016, 17:26
by Xander9009

Re: Community Wad

PostPosted: 30 Oct 2016, 21:54
by Splinterverse
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.

Re: Community Wad

PostPosted: 30 Oct 2016, 22:13
by Xander9009
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).

Re: Community Wad

PostPosted: 30 Oct 2016, 23:07
by thefiremind
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)?
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).

Re: Community Wad

PostPosted: 30 Oct 2016, 23:10
by Splinterverse
thefiremind wrote:
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)?
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).
That sounds like a good tactic. I'll give it a whirl on Wednesday.