Class: Scene_Battle

Scene_Battle

new Scene_Battle()

The scene class of the battle screen.

Extends

Methods

actorCommandWindowRect()Rectangle

Get the rectangle that represents the actor command window's x/y/width/height
Returns:
TypeDescription
RectangleThe rectangle that represents the actor command window
Get the rectangle that represents the actor window's x/y/width/height
Returns:
TypeDescription
RectangleThe rectangle that represents the actor window
Adds a window to the scene's WindowLayer
NameTypeDescription
windowWindowThe window to add as a child
Associates the windows with each other

buttonAreaBottom()numberinherited

Gets the bottom of the touch UI button area in the scene
Returns:
TypeDescription
numberY Pixel for the cottom coordinate of the button area

buttonAreaHeight()numberinherited

Gets the height of the touch UI button area
Returns:
TypeDescription
numberHeight in pixels of the button area

buttonAreaTop()numberoverrides

Get the top Y pixel of the button area
Returns:
TypeDescription
numberThe top pixel of the button area
Gets the Y pixel of the buttons
Returns:
TypeDescription
numberY Pixel for the top coordinate of the buttons

calcWindowHeight(numLines, selectable)numberinherited

Calculates how many pixels tall a window is
NameTypeDescription
numLinesnumberAmount of text lines in the window
selectablebooleanIf the window is selectable (or inherits from Window_Selectable) or not
Returns:
TypeDescription
numberAmount of pixels tall the window is
Cancel the message window wait
Since:
  • 1.8.0

centerSprite(sprite)inherited

Centers a given sprite within the game window
NameTypeDescription
spriteSpriteThe sprite to center

changeInputWindow()

Changes the current input window
Check if there is a gameover, and go to Scene_Gameover if so

closeCommandWindows()

Closes the command windows

commandAttack()

Processing for when the Attack command is selected

commandCancel()

Processing for when the Cancel command is selected

commandEscape()

Processing for when the Escape command is selected

commandFight()

Processing for when the Fight command is selected

commandGuard()

Processing for when the Guard command is selected

commandItem()

Processing for when the Item command is selected

commandSkill()

Processing for when the Skill command is selected
Creates the scene

createActorCommandWindow()

Creates the actor command window

createActorWindow()

Creates the actor window
Create all of the windows in the scene

createButtons()

Creates the Touch UI buttons

createCancelButton()

Creates the cancel Touch UI button

createChoiceListWindow()inherited

Creates the choice list window

createColorFilter()inherited

Creates the scene's ColorFilter

createDisplayObjects()

Create the display objects for the battle scene

createEnemyWindow()

Creates the enemy window

createEventItemWindow()inherited

Creates the event item window
Creates the gold window

createHelpWindow()

Creates the help window

createItemWindow()

Creates the item window

createLogWindow()

Create the battle log window

createMessageWindow()inherited

Create the message window

createNameBoxWindow()inherited

Creates the name box window

createNumberInputWindow()inherited

Creates the number input window

createPartyCommandWindow()

Creates the party command window

createScrollTextWindow()inherited

Creates the scroll text window

createSkillWindow()

Creates the skill window

createSpriteset()

Create the battle spriteset

createStatusWindow()

Creates the status window

createWindowLayer()inherited

Create the scene's WindowLayer
Destroys the stage

endCommandSelection()

Ends command selection
Get the rectangle that represents the enemy window's x/y/width/height
Returns:
TypeDescription
RectangleThe rectangle that represents the enemy window
Get the rectangle that represents the event item window's x/y/width/height
Returns:
TypeDescription
RectangleThe rectangle that represents the message event item
Try to autosave the game
Fades out the scene and audio
Default speed for a normal fade
Returns:
TypeDescription
numberAmount of frames to fade
Get the rectangle that represents the gold window's x/y/width/height
Returns:
TypeDescription
RectangleThe rectangle that represents the gold window

helpAreaBottom()number

Get the bottom Y pixel of the help area
Returns:
TypeDescription
numberThe bottom pixel of the help area

helpAreaHeight()number

Get the height (in pixels) of the help area
Returns:
TypeDescription
numberThe height of the help area

helpAreaTop()number

Get the top Y pixel of the help area
Returns:
TypeDescription
numberThe top pixel of the help area
Get the rectangle that represents the help window's x/y/width/height
Returns:
TypeDescription
RectangleThe rectangle that represents the help window

hideSubInputWindows()

Hides the sub input windows
Initializes the scene

isActive()booleaninherited

Check if scene is active
Returns:
TypeDescription
booleanTrue if the scene is active

isAnyInputWindowActive()boolean

Check if any battle window that accepts player input is active
Returns:
TypeDescription
booleanTrue if any input window is active

isAutosaveEnabled()booleaninherited

Check if autosaving is enabled
Returns:
TypeDescription
booleanTrue if the game can autosave

isBottomButtonMode()booleaninherited

Check if touch UI buttons appear on bottom
Returns:
TypeDescription
booleanTrue if bottom button mode is enabled

isBottomHelpMode()booleaninherited

Check if the help window appears on bottom
Returns:
TypeDescription
booleanTrue if bottom help mode is enabled
Check if scene is busy
Returns:
TypeDescription
booleanTrue if the scene is busy
Check if scene is currently fading the screen
Returns:
TypeDescription
booleanTrue if the scene is fading

isMessageWindowClosing()booleaninherited

Check if the message window is closing
Returns:
TypeDescription
booleanIf the message window is currently closing
Check if scene is ready
Returns:
TypeDescription
booleanTrue if the scene is ready

isRightInputMode()booleaninherited

Check if right input mode is enabled
Returns:
TypeDescription
booleanTrue if right input mode is enabled

isStarted()booleaninherited

Check if scene is started
Returns:
TypeDescription
booleanTrue if the scene is started

isTimeActive()boolean

Check if battle time is active
Returns:
TypeDescription
booleanTrue if battle time is active
Get the rectangle that represents the item window's x/y/width/height
Returns:
TypeDescription
RectangleThe rectangle that represents the item window
Get the rectangle that represents the battle log window's x/y/width/height
Returns:
TypeDescription
RectangleThe rectangle that represents the battle log window

mainCommandWidth()numberinherited

Get the main command width
Returns:
TypeDescription
numberWidth of a main command
Get the rectangle that represents the message window's x/y/width/height
Returns:
TypeDescription
RectangleThe rectangle that represents the message window

needsInputWindowChange()boolean

Check if the input window should change
Returns:
TypeDescription
booleanTrue if the input window should change

needsSlowFadeOut()boolean

Check if the battle scene should slowly fade out
Returns:
TypeDescription
booleanTrue if the battle scene should slowly fade out

onActorCancel()

Processing for cancel input on the actor window
Processing for OK input on the actor window

onAutosaveFailure()inherited

Processing for when an autosave attempt failed

onAutosaveSuccess()inherited

Processing for when an autosave attempt was successful

onEnemyCancel()

Processing for cancel input on the enemy window
Processing for OK input on the enemy window

onItemCancel()

Processing for cancel input on the item window
Processing for OK input on the item window

onSelectAction()

Processing for command selection

onSkillCancel()

Processing for cancel input on the skill window
Processing for OK input on the skill window

partyCommandWindowRect()Rectangle

Get the rectangle that represents the party command window's x/y/width/height
Returns:
TypeDescription
RectangleThe rectangle that represents the party command window
Pops the scene to return to the previous scene
Requests an autosave

scaleSprite(sprite)inherited

Scales a given sprite to fit in the game window
NameTypeDescription
spriteSpriteThe sprite to scale
Get the rectangle that represents the scroll text window's x/y/width/height
Returns:
TypeDescription
RectangleThe rectangle that represents the scroll text window

selectNextCommand()

Selects the next command

selectPreviousCommand()

Selects the previous command

shouldAutosave()boolean

Check if the scene should autosave
Returns:
TypeDescription
booleanTrue if next scene is the map scene

shouldOpenStatusWindow()boolean

Check if the status window should open
Returns:
TypeDescription
booleanTrue if status window should open
Get the rectangle that represents the skill window's x/y/width/height
Returns:
TypeDescription
RectangleThe rectangle that represents the skill window

slowFadeSpeed()numberinherited

Default speed for a slow fade
Returns:
TypeDescription
numberAmount of frames to fade
Starts the scene

startActorCommandSelection()

Start actor command selection

startActorSelection()

Starts the actor selection

startEnemySelection()

Starts enemy selection

startFadeIn(duration, white)inherited

Start to fade the scene in
NameTypeDescription
durationnumberFrames to fade in the scene
whitebooleanIf the fade color is white or not

startFadeOut(duration, white)inherited

Start to fade the scene out
NameTypeDescription
durationnumberFrames to fade out the scene
whitebooleanIf the fade color is white or not

startPartyCommandSelection()

Starts party command selection
Get the rectangle that represents the status window's x/y/width/height
Returns:
TypeDescription
RectangleThe rectangle that represents the status window

statusWindowX()number

Get the X coordinate of the left of the status window
Returns:
TypeDescription
numberPixel of the left of the status window
Stops the scene
Terminates the scene
Updates the scene

updateBattleProcess()

Updates the battle process. See BattleManager.

updateCancelButton()

Update the cancel Touch UI button
Updates the scene's children

updateColorFilter()inherited

Updates the scene's ColorFilter
Updates the scene's fade

updateInputWindowVisibility()

Update the input window visibility

updateLogWindowVisibility()

Updates the battle log window visibility

updateStatusWindowPosition()

Updates the position of the status window

updateStatusWindowVisibility()

Updates the status window visibility

updateVisibility()

Updates the visibility of screen elements

windowAreaHeight()number

Get the height in pixels of the window area
Returns:
TypeDescription
numberThe height of the window area