Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

Properties

cast_direction: number

The direction that the controllable char is casting thie psynergy.

caster: MainChar

The main char that it casting the psynergy.

controllable_char: ControllableChar

The controllable char that's casting this psynergy.

data: GoldenSun

The GoldenSun object.

enable_update: boolean
game: Game

The Phaser.Game object.

is_custom_psynergy: boolean
reset_map: (() => void)

Resets the map to default colors.

Type declaration

    • (): void
    • Resets the map to default colors.

      Returns void

stop_casting: ((reset_casting_psy_flag?: boolean, reset_map_tint?: boolean) => Promise<void>)

If called, the casting aura is destroyed.

Type declaration

    • (reset_casting_psy_flag?: boolean, reset_map_tint?: boolean): Promise<void>
    • If called, the casting aura is destroyed.

      Parameters

      • Optional reset_casting_psy_flag: boolean
      • Optional reset_map_tint: boolean

      Returns Promise<void>

target_object: InteractableObjects | NPC

The target object of this psynergy. Might not be necessary depending on the psynergy.

ABILITY_KEY_NAME: "avoid" = "avoid"
ACTION_KEY_NAME: CAST = base_actions.CAST

Methods

  • aura(total_time: number): Promise<void>
  • close_field_psynergy_window(): void
  • finish(): Promise<void>
  • finish_psynergy(force?: boolean, stop_char?: boolean, finish_callback?: (() => void)): void
  • Generic funcion that can be overriden. When calling this, the psynergy effect should be finished.

    Parameters

    • force: boolean = false

      for the psynergy to finish.

    • stop_char: boolean = true

      stops the char current animation.

    • Optional finish_callback: (() => void)

      the callback method to be called on psynergy end finish.

        • (): void
        • Returns void

    Returns void

  • init(): Promise<void>
  • return_to_idle_anim(): Promise<void>
  • set_bootstrap_method(method: Function): void
  • set_cast_finisher_method(method: Function): void
  • set_extra_cast_check(method: (() => boolean)): void
  • Adds an extra check for this psynergy to be casted. The given function is tested on this psynergy cast initialization. If the given function call returns false, this psynergy won't be casted.

    Parameters

    • method: (() => boolean)

      the method to be tested.

        • (): boolean
        • Returns boolean

    Returns void

  • update(): void
  • colorize_map_layers(game: Game, map: Map, options?: { color?: number; intensity?: number; map_colors_sequence?: boolean; after_colorize?: any; after_destroy?: any }): (() => void)
  • Colorizes the map for psynergy casting.

    Parameters

    • game: Game

      the Phaser.Game object.

    • map: Map

      the current map.

    • Optional options: { color?: number; intensity?: number; map_colors_sequence?: boolean; after_colorize?: any; after_destroy?: any }

      some options.

      • Optional color?: number

        the color to colorize the map. In the RGB spectre, values between 0 and 1. Default is random.

      • Optional intensity?: number

        the colorize intensity.

      • Optional map_colors_sequence?: boolean

        if true, it will keep changing colorization color over time.

      • after_colorize?:function
        • after_colorize(): void
      • after_destroy?:function
        • after_destroy(): void

    Returns (() => void)

    returns a function that if called, it will return the map colors to normal.

      • (): void
      • Returns void

  • init_cast_aura(game: Game, data: GoldenSun, char: ControllableChar, after_init?: (() => void), after_destroy?: ((reset_casting_psy_flag: boolean) => void), before_destroy?: ((reset_map_tint: boolean) => void)): ((reset_casting_psy_flag?: boolean, reset_map_tint?: boolean) => Promise<void>)
  • Initializes a casting aura around the caster.

    Parameters

    • game: Game

      the Phase.Game object.

    • data: GoldenSun

      the GoldenSun object.

    • char: ControllableChar

      the caster controllable char.

    • Optional after_init: (() => void)

      after the aura is initialized callback.

        • (): void
        • Returns void

    • Optional after_destroy: ((reset_casting_psy_flag: boolean) => void)

      after the aura is completely destroyed callback.

        • (reset_casting_psy_flag: boolean): void
        • Parameters

          • reset_casting_psy_flag: boolean

          Returns void

    • Optional before_destroy: ((reset_map_tint: boolean) => void)

      on aura destruction init callback.

        • (reset_map_tint: boolean): void
        • Parameters

          • reset_map_tint: boolean

          Returns void

    Returns ((reset_casting_psy_flag?: boolean, reset_map_tint?: boolean) => Promise<void>)

    returns a function that when called, will stop the casting aura.

      • (reset_casting_psy_flag?: boolean, reset_map_tint?: boolean): Promise<void>
      • Parameters

        • Optional reset_casting_psy_flag: boolean
        • Optional reset_map_tint: boolean

        Returns Promise<void>

Generated using TypeDoc