Protected cast_The direction that the controllable char is casting thie psynergy.
Protected casterThe main char that it casting the psynergy.
Protected controllable_The controllable char that's casting this psynergy.
Protected dataThe GoldenSun object.
Private enable_Protected gameThe Phaser.Game object.
Protected reset_Resets the map to default colors.
Protected stop_If called, the casting aura is destroyed.
Optional reset_casting_psy_flag: booleanOptional reset_map_tint: booleanProtected target_The target object of this psynergy. Might not be necessary depending on the psynergy.
Static Private Readonly ABILITY_Static Private Readonly ACTION_Static Private Readonly EMITTER_Static Private Readonly RISE_Casts this psynergy.
the controllable char that's casting this psynergy.
the main char key name that's casting this psyerngy.
Protected close_Generic funcion that can be overriden. When calling this, the psynergy effect should be finished.
for the psynergy to finish.
stops the char current animation.
Optional finish_callback: (() => void)the callback method to be called on psynergy end finish.
Protected return_Protected set_Protected set_Protected set_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.
the method to be tested.
Static colorize_Colorizes the map for psynergy casting.
the Phaser.Game object.
the current map.
Optional options: { some options.
Optional after_after the map gets colorized callback.
Optional after_after colorize filter destruction callback.
Optional color?: numberthe color to colorize the map. In the RGB spectre, values between 0 and 1. Default is random.
Optional intensity?: numberthe colorize intensity.
Optional map_if true, it will keep changing colorization color over time.
returns a function that if called, it will return the map colors to normal.
Static init_Initializes a casting aura around the caster.
the Phase.Game object.
the GoldenSun object.
the caster controllable char.
Optional after_init: (() => void)after the aura is initialized callback.
Optional after_destroy: ((reset_casting_psy_flag) => void)after the aura is completely destroyed callback.
Optional before_destroy: ((reset_map_tint) => void)on aura destruction init callback.
returns a function that when called, will stop the casting aura.
Optional reset_casting_psy_flag: booleanOptional reset_map_tint: boolean
Defines and manages the usage of field psynergy. Classes that inherit this one, are expected to at least:
This class already do initial checks, search for target, init casting aura and colorize the map automatically.