# Can Orion miss?

**URL:** <https://community.gemsofwar.com/t/can-orion-miss/1156>\
**Category:** Support\
**Created:** [November 2, 2015, 9:56pm UTC](https://community.gemsofwar.com/t/can-orion-miss/1156 "2015-11-02T21:56:06Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![Sirrian](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/sirrian/32/35758_2.png) [@Sirrian](https://community.gemsofwar.com/u/Sirrian)\
**Post date:** [November 3, 2015, 3:08pm UTC](https://community.gemsofwar.com/t/can-orion-miss/1156/15 "2015-11-03T15:08:47Z")

</div>

> That sounds like a pretty weird handling.

Well… think about it like this… in any event-driven system, like Gems of War combat, the game simply reacts to a series of events, some from the player, some from the AI, some from the board. Imagine that we had a queue of events that looked like this after the AI player matched 4 skulls:

- APPLY DAMAGE
- WAIT FOR BOARD TO STOP CASCADING
- TAKE ANOTHER TURN
- DECIDE WHAT TO DO (it decides for Orion to cast a spell)
- PICK ORION SPELL TARGET
- CAST ORION’S SPELL

Now suppose that the very first step kills a troop… Ideally it should add a priority event “REMOVE DEAD TROOP” into the system to remove that troop, so now the queue looks like this

- _APPLY DAMAGE (completed)_
- REMOVE DEAD TROOP
- WAIT FOR BOARD TO STOP CASCADING
- TAKE ANOTHER TURN
- DECIDE WHAT TO DO (it decides for Orion to cast a spell)
- PICK ORION SPELL TARGET
- CAST ORION’S SPELL

But suppose because things moved through too quickly in the queue, when it inserted that event to remove the troop, lots of other stuff had been resolved… we’d now have

- _APPLY DAMAGE (completed)_
- _WAIT FOR BOARD TO STOP CASCADING (completed)_
- _TAKE ANOTHER TURN (completed)_
- _DECIDE WHAT TO DO (it decides for Orion to cast a spell) (completed)_
- _PICK ORION SPELL TARGET (completed)_
- REMOVE DEAD TROOP
- CAST ORION’S SPELL

As you can see… the targeting event _could_ now select the dead troop.

That’s just the kind of error you sometimes see in event driven systems… it means the Finite State Machine that runs the system has a flaw in it that has allowed a game-state to advance, when it should have been been waiting for something to resolve. Not saying that _is_ the case with this one, just that it’s something that sprang to mind

---

_[View the full topic](https://community.gemsofwar.com/t/can-orion-miss/1156)._
