If true, custom psynergies won't be stopped on this event fire.
The events object where the keys are the ids.
The GameEvents id incrementer.
The events object where the keys are the events labels.
Whether this GameEvent is active or not.
The GameEvent id number.
If true, Reveal Psynergy won't be stopped on this event fire.
An unique label that identifies this GameEvent. This is optional.
If this GameEvent was originated by a NPC, this var holds this NPC reference.
The GameEvent type.
This abstract function is the one that GameEvent child classes should override. It should never be called.
This abstract function is the one that GameEvent child classes should override. It should never be called.
Check if a custom psynergy is currently active. If yes, then cancel it.
Check if "Reveal" is currently active. If yes, then cancel it.
This function is the one that should be called to destroy an event. It should never be overriden. Call this function to destroy this event. This can be called whenever an associated entity is destroyed, like maps, NPCs etc.
This function is the one that should be called to start a event. It should never be overriden. Always before this function is called, it's checked whether Reveal psynergy is being casted, if yes, it's stopped before this event start.
the NPC that originated this game event.
if the child class has an async fire function, returns its Promise.
Actives or deactives this event.
whether to active or not.
A helper function that defines the ControllableChar based on inputs. The controllable char can be a hero or a npc.
The GoldenSun instance.
Some options to help defining the char.
Whether it's a npc or not.
The npc index number.
The npc unique label identifier.
the defined char.
Get a specific event by its id.
The event id.
Returns the event.
Gets an event that was labeled.
The event key.
Returns the labeled event, if the given key wasn't found, returns null.
Destroys all game events and resets the id counter.
Generated using TypeDoc
This is the class reponsible for general events of the game. Every game event class must inherit from this class. Whenever a game event is instantiated, this event receives an unique id. These ids are reset whenever a map is destroyed. In order to fire a GameEvent, calls GameEvent.fire. In order to destroy a game event, calls GameEvent.destroy. Game events can be fired from TileEvents, NPC or Interactable Objects interaction, map changes or other game events. For easy reference/example, check base/game_events/EmoticonEvent.ts. Whenever an asynchronous game event is fired, increments the GameEventManager.events_running_count, so the engine knows that there's an event going on. When the event is finished, decrements the same variable. If your event has internal states, don't forget to reset them on finish. When creating a new GameEvent class, add its instantiation in GameEventManager.get_event_instance factory method.