Rework event pipeline

Objectives:

  1. Allow sequenced and linked events to either fail or succeed together

Target features:

  1. Every Action comes from a source Actor Entity and generates an Effect
  2. An Effect is a sequence of Events tied to its source, the Actor Entity
  3. Effects are processed by Rules before being decomposed and queued as final Events
  4. Remove Act Events since they prevent linked Events

Problems:

  1. How to apply energy costs? Remember delayed acts!
  2. Whose Rules apply to an Effect's Events?
  3. When are Effects processed by Rules? Upon Action compilation or right before Event queuing?
  4. Are there Effects and Events that do not come from Actions?

Brainstorm steps:

  • Add a source to Effects and make them a list of simple Events
  • Actions have a source, which they add to the Effects they produce
  • process_effect applies rules then queues the event
  • Change Events to work as Commands
  • Change Rules so they only filter Events (possibly add new)
  • Remove "Self performs X at Y speed"
  • Use rules to add energy costs to effects
Edited by Wilson Kazuo Mizutani