Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

  • new BattleEvent(game: any, data: any, active: any, key_name: any, keep_reveal: any, keep_custom_psynergy: any, background_key: any, enemy_party_key: any, return_to_sanctum: any, bgm: any, reset_previous_bgm: any, all_enemies_fled_events: any, victory_events: any, defeat_events: any, before_fade_victory_events: any, before_fade_defeat_events: any): BattleEvent
  • Parameters

    • game: any
    • data: any
    • active: any
    • key_name: any
    • keep_reveal: any
    • keep_custom_psynergy: any
    • background_key: any
    • enemy_party_key: any
    • return_to_sanctum: any
    • bgm: any
    • reset_previous_bgm: any
    • all_enemies_fled_events: any
    • victory_events: any
    • defeat_events: any
    • before_fade_victory_events: any
    • before_fade_defeat_events: any

    Returns BattleEvent

Properties

all_enemies_fled_events: GameEvent[]
background_key: string
battle: Battle
before_fade_defeat_events: GameEvent[]
before_fade_finish_callback: ((victory: boolean, all_party_fled: boolean) => void)

Type declaration

    • (victory: boolean, all_party_fled: boolean): void
    • Parameters

      • victory: boolean
      • all_party_fled: boolean

      Returns void

before_fade_victory_events: GameEvent[]
bgm: string
data: GoldenSun
defeat_events: GameEvent[]
enemy_party_key: string
finish_callback: ((victory: boolean, all_party_fled: boolean) => void)

Type declaration

    • (victory: boolean, all_party_fled: boolean): void
    • Parameters

      • victory: boolean
      • all_party_fled: boolean

      Returns void

game: Game
reset_previous_bgm: boolean
return_to_sanctum: boolean
victory_events: GameEvent[]
events: {}

The events object where the keys are the ids.

Type declaration

id_incrementer: number

The GameEvents id incrementer.

labeled_events: {}

The events object where the keys are the events labels.

Type declaration

Accessors

  • get active(): boolean
  • get id(): number
  • get keep_reveal(): boolean
  • get key_name(): string
  • get origin_npc(): NPC

Methods

  • _destroy(): void
  • _fire(): void
  • assign_before_fade_finish_callback(callback: ((victory: boolean, all_party_fled: boolean) => void)): void
  • Parameters

    • callback: ((victory: boolean, all_party_fled: boolean) => void)
        • (victory: boolean, all_party_fled: boolean): void
        • Parameters

          • victory: boolean
          • all_party_fled: boolean

          Returns void

    Returns void

  • assign_finish_callback(callback: ((victory: boolean, all_party_fled: boolean) => void)): void
  • Parameters

    • callback: ((victory: boolean, all_party_fled: boolean) => void)
        • (victory: boolean, all_party_fled: boolean): void
        • Parameters

          • victory: boolean
          • all_party_fled: boolean

          Returns void

    Returns void

  • destroy(): void
  • 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.

    Returns void

  • fire(origin_npc?: NPC): void
  • 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.

    Parameters

    • Optional origin_npc: NPC

      the NPC that originated this game event.

    Returns void

    if the child class has an async fire function, returns its Promise.

  • set_event_activation(activate: boolean): void
  • get_char(data: GoldenSun, options: { is_npc?: boolean; npc_index?: number; npc_label?: string }): Hero | NPC
  • A helper function that defines the ControllableChar based on inputs. The controllable char can be a hero or a npc.

    Parameters

    • data: GoldenSun

      The GoldenSun instance.

    • options: { is_npc?: boolean; npc_index?: number; npc_label?: string }

      Some options to help defining the char.

      • Optional is_npc?: boolean

        Whether it's a npc or not.

      • Optional npc_index?: number

        The npc index number.

      • Optional npc_label?: string

        The npc unique label identifier.

    Returns Hero | NPC

    the defined char.

  • get_labeled_event(key_name: string): GameEvent
  • reset(): void

Generated using TypeDoc