Page 1 of 1

Simultaneous Trigger ordering test version

PostPosted: 20 Apr 2011, 14:30
by Hellfish
First off, I know I've been sporadically/constantly missing even from topics started by me(I *will* look into the spoilered dev item, once I weasel my way into the mindset for the cost code) and probably will be somewhat absent in the coming months. Sorry about that, let's just say shit's happening and leave it at that.

However, I *have* been working on letting the player arrange the order of simultaneous triggered abilities. It's a simple little job in itself, the problem was making both the script triggers and the hardcoded triggers (spread over at least 4 places in the code, where I'm sure they could be reduced to one, two tops) play nice with the system and eachother. This has a lot of potential breaking points so I won't commit it until after the next beta. Until then, though, have a jar for testing:
http://www.megaupload.com/?d=PX7WUJMP (Just plonk it in a forge installation directory,renaming or overwriting the current jar)
Or, if you're so inclined, source patch here:
http://pastebin.com/CvjXDYQp
It's r8127 merged with my changes.I've done a bunch of quest mode run-throughs to test but the more the merrier,eh? :)
The jar is about twice the size of the regular jar, though, probably because of my IDEA settings and the dependencies.

Re: Simultaneous Trigger ordering test version

PostPosted: 20 Apr 2011, 20:32
by Chris H.
Hellfish wrote:First off, I know I've been sporadically/constantly missing even from topics started by me(I *will* look into the spoilered dev item, once I weasel my way into the mindset for the cost code) and probably will be somewhat absent in the coming months. Sorry about that, let's just say shit's happening and leave it at that.

However, I *have* been working on letting the player arrange the order of simultaneous triggered abilities. It's a simple little job in itself, the problem was making both the script triggers and the hardcoded triggers (spread over at least 4 places in the code, where I'm sure they could be reduced to one, two tops) play nice with the system and eachother. This has a lot of potential breaking points so I won't commit it until after the next beta. Until then, though, have a jar for testing:
http://www.megaupload.com/?d=PX7WUJMP (Just plonk it in a forge installation directory,renaming or overwriting the current jar)
Or, if you're so inclined, source patch here:
http://pastebin.com/CvjXDYQp
It's r8127 merged with my changes.I've done a bunch of quest mode run-throughs to test but the more the merrier,eh? :)
The jar is about twice the size of the regular jar, though, probably because of my IDEA settings and the dependencies.
`
Ah, awesome. :D

I will try to release the next beta on Friday.

Re: Simultaneous Trigger ordering test version

PostPosted: 22 Apr 2011, 17:47
by Chris H.
I have built the next beta version based on rev 8153. I have some of the archives uploaded but a few problems cropped up. I will figure it out and will finish the beta release.

Go ahead and merge your update into the SVN when you are ready. This will give the dev team and the Snacko Scripters a chance to bug test. And, yes, being able to arrange the order of simultaneous triggered abilities, that will be great.

Re: Simultaneous Trigger ordering test version

PostPosted: 22 Apr 2011, 22:24
by Hellfish
Alright, merged.
Hardcoded triggered abilities in the future should either use the Trigger objects (See Frost Titan code) or use AllZone.Stack.addSimultaneousStackEntry(SpellAbility) when it needs to add itself to the stack. Simultaneous Stack Entries are "flushed" onto the stack in whatever order decided by their controller when priority is passed and when a phase begins(To make phase triggers work).

Re: Simultaneous Trigger ordering test version

PostPosted: 24 Apr 2011, 13:41
by Sloth
I got this error a couple of times (for example if AI plays a bloodthirst creature):

Code: Select all
Mana_Part : checkMana() error, argument mana is invalid mana, mana - n


Version:
Forge -- official beta: $Date: 2011-01-06 17:34:48 +0100 (Do, 06 Jan 2011) $, SVN revision: $Revision: 4891 $

OS: Windows XP Version: 5.1 Architecture: x86

Java Version: 1.6.0_20 Vendor: Sun Microsystems Inc.

Detailed error trace:
java.lang.RuntimeException: Mana_Part : checkMana() error, argument mana is invalid mana, mana - n
   at forge.card.mana.Mana_Part.checkSingleMana(Unknown Source)
   at forge.card.mana.Mana_PartColor.<init>(Unknown Source)
   at forge.card.mana.ManaCost.getManaPart(Unknown Source)
   at forge.card.mana.ManaCost.split(Unknown Source)
   at forge.card.mana.ManaCost.<init>(Unknown Source)
   at forge.ComputerUtil.canPayCost(Unknown Source)
   at forge.ComputerUtil.playStack(Unknown Source)
   at forge.MagicStack.chooseOrderOfSimultaneousStackEntry(Unknown Source)
   at forge.MagicStack.chooseOrderOfSimultaneousStackEntryAll(Unknown Source)

Re: Simultaneous Trigger ordering test version

PostPosted: 24 Apr 2011, 14:09
by Hellfish
Thanks! Should be fixed now.

Re: Simultaneous Trigger ordering test version

PostPosted: 08 May 2011, 12:15
by Sloth
I don't know if this worked before, but Mesmeric Orb will freeze the stack with its triggers.

Re: Simultaneous Trigger ordering test version

PostPosted: 08 May 2011, 14:19
by Hellfish
Hmm, were there other cards whose triggers went off at the same time? If so, which ones? What and whose card untapped to trigger the Mesmeric Orb?

Re: Simultaneous Trigger ordering test version

PostPosted: 08 May 2011, 15:08
by friarsol
Mesmeric Orb also has the weird distinction of triggering during an Untap Phase, but waiting to go on the stack till the Upkeep. Maybe that's part of the problem?

Re: Simultaneous Trigger ordering test version

PostPosted: 08 May 2011, 16:41
by Sloth
Hellfish wrote:Hmm, were there other cards whose triggers went off at the same time? If so, which ones? What and whose card untapped to trigger the Mesmeric Orb?
There were no other triggers around.

Re: Simultaneous Trigger ordering test version

PostPosted: 08 May 2011, 17:11
by Hellfish
Okay, should be good now. Nobody recieves priority during the untap step anymore.