Skip to content

Notify monsters of characters exiting via event handler. #360

@tristandunn

Description

@tristandunn

While #359 allows monsters to know when characters enter, they don't know when they leave. If they're notified when they leave, they could optionally decide to follow them and continue attacking.

  • When a character successfully moves, an exit event should be triggered on the monster with the character provided.
  • A new event handler, follow, responds to the exit event and moves the monster in the direction the character moved.
    • The chance of following could possibly be random, but can also be left as a follow-up change.

It could be worth being more specific with the event names, such as character_exited instead of exit. If that happens, the existing on_attacked and on_enter handlers should be renamed too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Upcoming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions