News:

Zatikon is back and free to play! https://www.chroniclogic.com/zatikon.htm

Main Menu

Triggers

Started by zatikon, May 30, 2009, 06:29:45 PM

Previous topic - Next topic

zatikon

The present triggering system is too arcane, and we've been playing around with ideas to make it more intuitive.

A new system would be a long term project, and as part of the design process I'd love some feedback and suggestions from you guys.

One idea we've had is to implement a stack style system, similar to what Magic the Gathering uses. In that system, all triggers that can trigger will trigger, building a stack of effects to resolve on a Last-in-First-out basis. This way, effects that don't explicitly cancel other actions won't. For example, a Lancer shot down by a Tower would still resolve his Joust trigger.

Cancellations would occur by targeting specific actions on the stack. If you attack a rogue, you would place his Dodge trigger on the stack. When Dodge resolves, it would flag the Attack action (which resolves later) as being canceled.

As this model develops, I'll keep modifying this first post with an updated proposal.

Thanks in advance!
Gabe

glunkr

Yes, this is the best idea. It makes everything easier to predict. For instance:

Shield Maiden is next to the unit it is protecting and a fireball hits both of them. The Shield Maiden's shield ability should protect the other unit even if the shield maiden dies from the fireball.

From your explanation, I'm pretty sure my example would be correct since the Shield Maiden's shield ability would go on the stack after the fireball, and therefore resolve before the fireball damage is triggered.

This would really make things clearer and I'm really looking forward to it.

Kran

Very good. But then what going to happen if a rider captures a castle defended by a tower? Somethings would still cause confusion. But anyway its very better than the actual system.

Jezebeau

Stack is a good idea if done properly.  My major concern with it is that you'd need to be very clear with players about triggering order of competing passive effects, such as whether it's attacker's or defender's attacks first, or if there's a spell/skill/non-type priority.

@Kran: Capture would go first on the stack, anything that would then target the unit landing on that space would be resolved before capturing would, and the castle would only be captured if there was a valid alive on the castle after everything resolved.  As zatikon said, it's a long-term project and we'll be involved in finding any problems.

(As an afterthought, if your pikeman/bowman/tower kills a unit landing on the castle and you have a dracolich in play, do you get a non-gate-guard unit on the castle?)

Kran

@Jezebeau yes. Also if ballista push ally to castle. Anyway, you cant transform magus to spirit while in castle or make templar indestructible.

zatikon

How about this sequence:

As soon as a trigger begins (and everything will be a trigger, using a unit action is just a deliberate trigger) the effect stack opens. Once all the effects resolve and the stack is empty, the game checks for unit deaths, and then victory condition.

Unit deaths are also a source of triggers. I'm not sure how to integrate that.

Jezebeau

A unit death is a separate trigger.  It starts a new stack.

For an effects stack to work, it'll need to check for unit deaths as each effect resolves, so that effects don't target dead units.

glunkr

I agree with Jezebeau. For clarification:

1. Actions go on stack, then resolve FILO.
2. When stack is empty check for unit deaths, and add their triggers to the stack.
3. Iterate steps 1 and 2 until no more units die.
4. Check for victory condition.

Jezebeau

For further clarification, each time a new effect is triggered, it is added to the stack immediately after the trigger resolves, effectively at the level of the trigger.  This may prompt further triggers that would add to that stack.

zatikon

QuoteFor an effects stack to work, it'll need to check for unit deaths as each effect resolves, so that effects don't target dead units.

Wouldn't that cause cancellations?

Should costs for the action be paid at trigger time or during resolution?

Jezebeau

Yes, it could cause cancellations, but that's important since setting the triggers up right is the only tool we have to cancel them.  Trigger costs should be paid at trigger-time to increase tactical options.  At the very least, they need to be committed at trigger-time so you don't get defenses going off more than once in a stack.

glunkr

Quote from: Jezebeau on June 01, 2009, 01:34:09 AM
For further clarification, each time a new effect is triggered, it is added to the stack immediately after the trigger resolves, effectively at the level of the trigger.  This may prompt further triggers that would add to that stack.

This didn't clarify anything for me. Can you maybe give an example of what you mean?

zatikon

One of the goals of the new system is to prevent non-explicit cancellations. I don't think death should prevent that unit from triggering, or being a trigger target.

An effect against a dead unit would still be valid because its not dead until the empty-stack resolution.

Lunaraia

OK here is an example abut the stack thingy they talk about: Let's use a Tower with only 1 hp left, a Lancer and the old sergant to make the explenation, new sergant can't drag, so to make this workable I had to use the old one

1st stack, sergant rallies lancer
2nd stack, sergant moves into tower range, trigger attack, trigger rally, lancer moves, cancel attack from tower since it is lower in the staack then the first attack, thus a second attack can't happen, lancer moves and joust attacks tower, killing it.

Providing they haven't changed the trigger prioerties of the lancer, this is what should happen

Current version: tower is destroyed, Lancer is not attacked.

New Version: Tower is destroyed, Lancer is attacked.

and that should be what happens, right?
Bad guys are no problem when you're an asshole yourself

Jezebeau

Quote from: glunkr on June 01, 2009, 02:41:11 AM
Quote from: Jezebeau on June 01, 2009, 01:34:09 AM
For further clarification, each time a new effect is triggered, it is added to the stack immediately after the trigger resolves, effectively at the level of the trigger.  This may prompt further triggers that would add to that stack.

This didn't clarify anything for me. Can you maybe give an example of what you mean?

The most explicit example I can think of would be:
>Warrior with 1 life attached to longbowman attacks heretic.
-->Warrior attack triggers longbowman attack.
-->Longbowman attack resolves, damaging heretic.
-->Heretic triggers, reducing life of all opposing organics by 1.
-->Warrior dies.
>Warrior is dead, attack is cancelled, heretic survives with 1 life.