| Name | Type | Description |
|---|---|---|
troopID |
number | Current troop ID that the allies are fighting |
canGameOver |
boolean | Indicate if there is a win/lose node or not |
canEscape |
boolean | Indicate if the player can escape this battle |
battleMap |
SystemBattleMap | The system battle map |
transitionStart |
MapTransitionKind | The kind of transition for the battle start |
transitionEnd |
MapTransitionKind | The kind of transition for the battle end |
transitionStartColor |
SystemColor | The system color for start transition |
transitionEndColor |
SystemColor | The system color for end transition |
Properties:
| Name | Type | Argument | Default | Description |
|---|---|---|---|---|
SceneBattle.TRANSITION_ZOOM_TIME |
number |
<optional> |
500 | The time in milliseconds for zooming in transition |
SceneBattle.TRANSITION_COLOR_VALUE |
number |
<optional> |
0.1 | The color value for transition |
SceneBattle.TRANSITION_COLOR_END_WAIT |
number |
<optional> |
600 | The transition color to wait at the end |
SceneBattle.TIME_END_WAIT |
number |
<optional> |
1000 | The time in milliseconds to wait at the end of the battle |
SceneBattle.TIME_PROGRESSION_XP |
number |
<optional> |
3000 | The time in milliseconds for progression xp |
SceneBattle.TIME_LINEAR_MUSIC_END |
number |
<optional> |
500 | The linear music end time in milliseconds |
SceneBattle.TIME_LINEAR_MUSIC_START |
number |
<optional> |
500 | The linear music start time in milliseconds |
SceneBattle.TIME_ACTION_ANIMATION |
number |
<optional> |
2000 | The time in milliseconds for action animation |
SceneBattle.CAMERA_TICK |
number |
<optional> |
0.05 | The camera tick |
SceneBattle.CAMERA_OFFSET |
number |
<optional> |
3 | The camera small move offset in pixels |
SceneBattle.START_CAMERA_DISTANCE |
number |
<optional> |
10 | The start camera distance |
SceneBattle.WINDOW_PROFILE_WIDTH |
number |
<optional> |
300 | The window profile width |
SceneBattle.WINDOW_PROFILE_HEIGHT |
number |
<optional> |
100 | The window profile height |
SceneBattle.COMMANDS_NUMBER |
number |
<optional> |
6 | The max commands number |
SceneBattle.WINDOW_COMMANDS_WIDTH |
number |
<optional> |
150 | The window commands width |
SceneBattle.WINDOW_COMMANDS_SELECT_X |
number |
<optional> |
25 | The window commands select x |
SceneBattle.WINDOW_COMMANDS_SELECT_Y |
number |
<optional> |
100 | The window commands select y |
SceneBattle.WINDOW_COMMANDS_SELECT_WIDTH |
number |
<optional> |
200 | The window commands select width |
SceneBattle.WINDOW_DESCRIPTIONS_X |
number |
<optional> |
385 | The window descriptions x |
SceneBattle.WINDOW_DESCRIPTIONS_Y |
number |
<optional> |
100 | The window descriptions y |
SceneBattle.WINDOW_DESCRIPTIONS_WIDTH |
number |
<optional> |
360 | The window descriptions width |
SceneBattle.WINDOW_DESCRIPTIONS_HEIGHT |
number |
<optional> |
200 | The window descriptions height |
SceneBattle.WINDOW_EXPERIENCE_X |
number |
<optional> |
10 | The window experience x |
SceneBattle.WINDOW_EXPERIENCE_Y |
number |
<optional> |
80 | The window experience y |
SceneBattle.WINDOW_EXPERIENCE_WIDTH |
number |
<optional> |
300 | The window experience width |
SceneBattle.WINDOW_EXPERIENCE_HEIGHT |
number |
<optional> |
90 | The window experience height |
SceneBattle.WINDOW_STATS_X |
number |
<optional> |
250 | The window stats x |
SceneBattle.WINDOW_STATS_Y |
number |
<optional> |
90 | The window stats y |
SceneBattle.WINDOW_STATS_WIDTH |
number |
<optional> |
380 | The window stats width |
SceneBattle.WINDOW_STATS_HEIGHT |
number |
<optional> |
200 | The window stats height |
troopID |
number | Current troop ID that the allies are fighting | ||
canGameOver |
boolean | Indicate if there is a win/lose node or not | ||
canEscape |
boolean | Indicate if the player can escape this battle | ||
transitionStart |
MapTransitionKind | The kind of transition for the battle start | ||
transitionEnd |
MapTransitionKind | The kind of transition for the battle end | ||
transitionStartColor |
SystemColor | The system color for start transition | ||
transitionEndColor |
SystemColor | The system color for end transition | ||
transitionColor |
boolean | Indicate if the transition is by color | ||
transitionColorAlpha |
number | The alpha transition color value | ||
step |
number | Main step of the battle | ||
subStep |
number | Sub step of the battle (used for menus or other sub-steps) | ||
sceneMap |
SceneMap | The scene map where the battle was run | ||
sceneMapCameraDistance |
number | The scene map camera distance | ||
actionDoNothing |
SystemMonsterAction | A system monster action reprensenting action doing nothing | ||
cameraStep |
number | The camera step (for moving) | ||
cameraTick |
number | The camera tick | ||
cameraOffset |
number | The camera offset | ||
cameraON |
boolean | Indicate if the transition is camera zoom | ||
cameraDistance |
number | The camera distance | ||
transitionZoom |
boolean | Indicate when to zoom in or out | ||
loadingStep |
boolean | Indicate if there is a loading step | ||
winning |
boolean | Indicate if the battle is won | ||
kindSelection |
CharacterKind | Indicating which group is currently selected | ||
selectedUserIndex |
number | Index of the selected user | ||
selectedTargetIndex |
number | Index of the selected target | ||
battleCommandKind |
EffectSpecialActionKind | The current battle command kind | ||
targets |
Array.<Battler> | List of all the current targets | ||
damages |
Array.<any> | Informations about damages | ||
battlers |
Array.<Array.<Battler>> | Battlers of all the allies / enemies | ||
graphicPlayers |
Array.<Object> | The graphics used for user and target(s) | ||
time |
number | A chronometer for several steps of battle | ||
turn |
number | The turn number | ||
windowTopInformations |
WindowBox | The window on top that shows specific informations | ||
windowUserInformations |
WindowBox | The window on bot that shows user characteristics informations | ||
windowTargetInformations |
WindowBox | The window on bot that shows target characteristics informations | ||
windowChoicesBattleCommands |
WindowChoices | The window for battle commands | ||
windowChoicesSkills |
WindowChoices | The window choices for skills | ||
windowSkillDescription |
WindowBox | The window description for selected skill | ||
windowChoicesItems |
WindowChoices | The window choices for items | ||
windowItemDescription |
WindowBox | The window description for selected item | ||
windowExperienceProgression |
WindowBox | The window experience progression | ||
windowStatisticProgression |
WindowBox | The window statistic progression | ||
attackingGroup |
CharacterKind | Indicating which group is currently attacking | ||
userTarget |
boolean | Indicate if the user is a target | ||
all |
boolean | Indicate if the targets are all the enemies | ||
listSkills |
Array.<GraphicSkill> | The graphics list for each skill | ||
listItems |
Array.<GraphicItem> | The graphics list for each item | ||
transitionEnded |
boolean | Indicate if the transition ended | ||
effects |
Array.<SystemEffect> | The current weapon / skill system effects | ||
frameUser |
number | The frame user | ||
frameTarget |
number | The frame target | ||
userAnimation |
SystemAnimation | The system animation for user | ||
targetAnimation |
SystemAnimation | The system animation for target | ||
user |
Battler | The user battler | ||
currentEffectIndex |
number | The current effect index | ||
timeEnemyAttack |
number | A chronometer for enemy attack | ||
action |
SystemMonsterAction | The current system action | ||
attackSkill |
SystemSkill | The system skill | ||
finishedXP |
boolean | Indicate if the xp progression is finished | ||
priorityIndex |
number | The priority index | ||
windowLoots |
WindowBox | The window box for loots | ||
xp |
number | The total xp | ||
currencies |
Object | The total currencies | ||
loots |
Array.<Object> | The total loots | ||
lootsNumber |
number | The total loots number | ||
graphicRewardTop |
GraphicRewardsTop | The graphic reward on top |
Extends
Methods
-
Initialize step
-
Initialize allies battlers
-
Initialize enemies battlers
-
Initialize informations (boxes)
-
Initialize window commands
-
Initialize windows end
-
Initialize musics
-
Update the battle
-
Update transtion start fade
-
Update transition start zoom
-
Handle key pressed
Name Type Description keynumber The key ID -
Handle key released
Name Type Description keynumber The key ID -
Handle key repeat pressed
Name Type Description keynumber The key ID -
Handle key pressed and repeat
Name Type Description keynumber The key ID -
Draw the battle HUD
-
Initialize step
-
Register the last command index and offset in the user
-
Register the laster skill index and offset in the user
-
Register the last item index and offset in the user
-
Select a target
Name Type Description targetKindTargetKind The target kind -
Select the first index according to target kind
Name Type Description kindTargetKind The target kind indexnumber The index (last registered) -
Get the index of the array after going up
Returns:
Type Description number -
Get the index of the array after going down
Returns:
Type Description number -
Move the arrow
-
Get the index of the target
Returns:
Type Description number -
When an ally is selected
-
When an ally is unselected
-
When a command is selected
Name Type Description keynumber The key pressed ID -
When targets are selected
-
When targets are unselected
-
Update the battle
-
Handle key pressed
Name Type Description keynumber The key ID -
Handle key released
Name Type Description keynumber The key ID -
Handle key repeat pressed
Name Type Description keynumber The key ID -
Handle key pressed and repeat
Name Type Description keynumber The key ID -
Draw the battle HUD
-
Initialize step
-
getCondition ()AnimationEffectConditionKind
-
Get the animation efect condition kind
Returns:
Type Description AnimationEffectConditionKind -
Update the battle
-
Handle key pressed
Name Type Description keynumber The key ID -
Handle key released
Name Type Description keynumber The key ID -
Handle key repeat pressed
Name Type Description keynumber The key ID -
Handle key pressed and repeat
Name Type Description keynumber The key ID -
Draw the battle HUD
-
Initialize step
-
Define the action to do
-
Define the targets
-
Update the battle
-
Handle key pressed
Name Type Description keynumber The key ID -
Handle key released
Name Type Description keynumber The key ID -
Handle key repeat pressed
Name Type Description keynumber The key ID -
Handle key pressed and repeat
Name Type Description keynumber The key ID -
Draw the battle HUD
-
Initialize step
-
Prepare the rewards (xp, currencies, loots)
-
Update the team progression xp
-
Pause the team progression xp
-
Unpause the team progression xp
-
Play map music
-
Prepare the end transition
-
Update the battle
-
Handle key pressed
Name Type Description keynumber The key ID -
Handle key released
Name Type Description keynumber The key ID -
Handle key repeat pressed
Name Type Description keynumber The key ID -
Handle key pressed and repeat
Name Type Description keynumber The key ID -
Draw the battle HUD
-
Initialize and correct some camera settings for the battle start
-
Make the attacking group all actives
-
Check if a player is defined (active and not dead)
Name Type Description kindCharacterKind Kind of player indexnumber Index in the group targetboolean Indicate if the player is a target Returns:
Type Description boolean -
Check if all the heroes or enemies are inactive
Returns:
Type Description boolean -
Check if all the heroes or enemies are dead
Name Type Description groupCharacterKind Kind of player Returns:
Type Description boolean -
Check if all the enemies are dead
Returns:
Type Description boolean -
Check if all the heroes are dead
Returns:
Type Description boolean -
Transition to game over scene
-
Win the battle
-
Win the battle
-
Change the step of the battle
Name Type Description inumber Step of the battle -
Initialize the current step
-
update () overrides
-
Update battle according to step
-
Do camera standard moves
-
onKeyPressed (key) overrides
-
Handle battle key pressed according to step
Name Type Description keynumber The key ID -
onKeyReleased (key) overrides
-
Handle battle key released according to step
Name Type Description keynumber The key ID -
onKeyPressedRepeat (key) overrides
-
Handle battle key pressed repeat according to step
Name Type Description keynumber The key ID -
onKeyPressedAndRepeat (key) overrides
-
Handle battle key pressed and repeat according to step
Name Type Description keynumber The key ID -
draw3D () overrides
-
Draw the battle 3D scene
-
drawHUD () overrides
-
Draw the battle HUD according to step
-
Load async stuff
-
Update all the reactions interpreters
-
Update all the parallel commands
-
Add a reaction in the interpreter list
Name Type Description senderMapObject The sender of this reaction reactionSystemReaction The reaction to add objectMapObject The object reacting statenumber The state ID parametersArray.<SystemParameter> All the parameters coming with this reaction eventArray.<number> The time events values movingboolean Indicate if command is a moving one -
Close the scene