Class in reactor_objects_battlers.js
Game_Unit
23 public functions in 6 groups · show internal (_) functions
Familiar territory. Game_Unit keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.
Quick Reference
Setup & Creation 2
| initialize() | Sets up a new instance. |
| makeActions() | Makes the actions. |
Checks (True / False) 1
| isAllDead() | Whether it is all dead. |
Actions 3
| clearActions() | Clears the actions. |
| clearResults() | Clears the results. |
| select() | Select. |
Events, Commands & Input 2
| onBattleStart() | Called when battle start happens. |
| onBattleEnd() | Called when battle end happens. |
Updating & Drawing 1
| updateTpb() | Updates the tpb each frame. |
Other 14
| inBattle() | In battle. |
| members() | Members. |
| aliveMembers() | Alive members. |
| deadMembers() | Dead members. |
| movableMembers() | Movable members. |
| agility() | Agility. |
| tgrSum() | Tgr sum. |
| randomTarget() | Random target. |
| randomDeadTarget() | Random dead target. |
| smoothTarget() | Smooth target. |
| smoothDeadTarget() | Smooth dead target. |
| substituteBattler() | The target is skipped, so a dying battler that has Substitute itself is still covered by the next member that… |
| tpbBaseSpeed() | Tpb base speed. |
| tpbReferenceTime() | Tpb reference time. |
Setup & Creation
initialize
method sourceGame_Unit.prototype.initialize()
Sets up a new instance. (Same as the RPG Maker MZ method of this name.)
makeActions
method sourceGame_Unit.prototype.makeActions()
Makes the actions. (Same as the RPG Maker MZ method of this name.)
Checks (True / False)
isAllDead
method sourceGame_Unit.prototype.isAllDead()
Whether it is all dead. (Same as the RPG Maker MZ method of this name.)
Actions
clearActions
method sourceGame_Unit.prototype.clearActions()
Clears the actions. (Same as the RPG Maker MZ method of this name.)
clearResults
method sourceGame_Unit.prototype.clearResults()
Clears the results. (Same as the RPG Maker MZ method of this name.)
select
method sourceGame_Unit.prototype.select(activeMember)
Select. (Same as the RPG Maker MZ method of this name.)
Events, Commands & Input
onBattleStart
method sourceGame_Unit.prototype.onBattleStart(advantageous)
Called when battle start happens. (Same as the RPG Maker MZ method of this name.)
onBattleEnd
method sourceGame_Unit.prototype.onBattleEnd()
Called when battle end happens. (Same as the RPG Maker MZ method of this name.)
Updating & Drawing
updateTpb
method sourceGame_Unit.prototype.updateTpb()
Updates the tpb each frame. (Same as the RPG Maker MZ method of this name.)
Other
inBattle
method sourceGame_Unit.prototype.inBattle()
In battle. (Same as the RPG Maker MZ method of this name.)
members
method sourceGame_Unit.prototype.members()
Members. (Same as the RPG Maker MZ method of this name.)
aliveMembers
method sourceGame_Unit.prototype.aliveMembers()
Alive members. (Same as the RPG Maker MZ method of this name.)
deadMembers
method sourceGame_Unit.prototype.deadMembers()
Dead members. (Same as the RPG Maker MZ method of this name.)
movableMembers
method sourceGame_Unit.prototype.movableMembers()
Movable members. (Same as the RPG Maker MZ method of this name.)
agility
method sourceGame_Unit.prototype.agility()
Agility. (Same as the RPG Maker MZ method of this name.)
tgrSum
method sourceGame_Unit.prototype.tgrSum()
Tgr sum. (Same as the RPG Maker MZ method of this name.)
randomTarget
method sourceGame_Unit.prototype.randomTarget()
Random target. (Same as the RPG Maker MZ method of this name.)
randomDeadTarget
method sourceGame_Unit.prototype.randomDeadTarget()
Random dead target. (Same as the RPG Maker MZ method of this name.)
smoothTarget
method sourceGame_Unit.prototype.smoothTarget(index)
Smooth target. (Same as the RPG Maker MZ method of this name.)
smoothDeadTarget
method sourceGame_Unit.prototype.smoothDeadTarget(index)
Smooth dead target. (Same as the RPG Maker MZ method of this name.)
substituteBattler
method sourceGame_Unit.prototype.substituteBattler(target)
The target is skipped, so a dying battler that has Substitute itself is still covered by the next member that has it.
tpbBaseSpeed
method sourceGame_Unit.prototype.tpbBaseSpeed()
Tpb base speed. (Same as the RPG Maker MZ method of this name.)
tpbReferenceTime
method sourceGame_Unit.prototype.tpbReferenceTime()
Tpb reference time. (Same as the RPG Maker MZ method of this name.)