FieldAbilities Ctor.
The Phaser.Game object.
The GoldenSun object.
The ability key_name.
The action that the char will assume when casting this ability.
Whether this ability need a target or not.
Whether this ability will tint the map when casting.
If this ability need a target, the max distance range from the caster to find a target. This can also be a function that receives a target candidate, this function must return a range.
A custom color to tint the map.
A custom intensity of a color when tinting the map.
Only for IO targets. If true, this field ability also works for disabled targets.
A function that receives a target. This called before casting. Execute some custom extra checks. If this funuction returns true, the char will cast this abiliy.
If true, it opens an YesNo menu asking if the char really wants to cast this ability.
If true, the target is a NPC instead of an IO.
If true, the map will be tinted sequentially with random colors.
Set this to true, if it's a custom psynergy.
The direction that the controllable char is casting thie psynergy.
The main char that it casting the psynergy.
The controllable char that's casting this psynergy.
The GoldenSun object.
The Phaser.Game object.
Resets the map to default colors.
If called, the casting aura is destroyed.
The target object of this psynergy. Might not be necessary depending on the psynergy.
Casts this psynergy.
the controllable char that's casting this psynergy.
the main char key name that's casting this psyerngy.
Closes the field psynergy window that shows its name.
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.
the callback method to be called on psynergy end finish.
Sets the psynergy cast direction, For diagonals, picks the next clockwise non-diagonal.
Current direction
Non-diagonal cast direction
Initializes the psynergy cast. This is called after initial checks.
the key name of the main char caster.
Open the dialog to be shown in the case the caster has no PP to cast this psynergy.
Returns the hero from cast animation to idle animation.
returns a promise for animation end.
Searches for target, NPC or IO, if this psynergy requests a target.
Sets the bootstrap method that will be called once psynergy cast is initialized. Each psynergy will have its own bootstrap function.
the bootstrap method.
Pass a method to be called on psynergy cast end when the casting aura starts to be destructed.
the method to be called.
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.
Plays hero cast animation.
If the target has a limit of psynergy interactions, flag this target as interacted with this psynergy.
Abstract method. This function is called on game main update funcion.
Colorizes the map for psynergy casting.
the Phaser.Game object.
the current map.
some options.
the color to colorize the map. In the RGB spectre, values between 0 and 1. Default is random.
the colorize intensity.
if true, it will keep changing colorization color over time.
after the map gets colorized callback.
after colorize filter destruction callback.
returns a function that if called, it will return the map colors to normal.
Initializes a casting aura around the caster.
the Phase.Game object.
the GoldenSun object.
the caster controllable char.
after the aura is initialized callback.
after the aura is completely destroyed callback.
on aura destruction init callback.
returns a function that when called, will stop the casting aura.
Generated using TypeDoc
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.