Game_Battler
Game_Battler
Kind: global class
- Game_Battler
- new Game_Battler()
- .initialize()
- .initMembers()
- .clearAnimations()
- .clearDamagePopup()
- .clearWeaponAnimation()
- .clearEffect()
- .clearMotion()
- .requestEffect(effectType)
- .requestMotion(motionType)
- .requestMotionRefresh()
- .select()
- .deselect()
- .isAnimationRequested() ⇒
boolean
- .isDamagePopupRequested() ⇒
boolean
- .isEffectRequested() ⇒
boolean
- .isMotionRequested() ⇒
boolean
- .isWeaponAnimationRequested() ⇒
boolean
- .isMotionRefreshRequested() ⇒
boolean
- .isSelected() ⇒
boolean
- .effectType() ⇒
string
|null
- .motionType() ⇒
string
|null
- .weaponImageId() ⇒
number
- .shiftAnimation() ⇒
object
|undefined
- .startAnimation(animationId, mirror, delay)
- .startDamagePopup()
- .startWeaponAnimation(weaponImageId)
- .action(index) ⇒
Game_Action
- .setAction(index, action)
- .numActions() ⇒
number
- .clearActions()
- .result() ⇒
Game_ActionResult
- .clearResult()
- .refresh()
- .addState(stateId)
- .isStateAddable(stateId) ⇒
boolean
- .isStateRestrict(stateId) ⇒
boolean
- .onRestrict()
- .removeState(stateId)
- .escape()
- .addBuff(paramId, turns)
- .addDebuff(paramId, turns)
- .removeBuff(paramId)
- .removeBattleStates()
- .removeAllBuffs()
- .removeStatesAuto(timing)
- .removeBuffsAuto()
- .removeStatesByDamage()
- .makeActionTimes() ⇒
number
- .makeActions()
- .speed() ⇒
number
- .makeSpeed()
- .currentAction() ⇒
Game_Action
- .removeCurrentAction()
- .setLastTarget(target)
- .forceAction(skillId, targetIndex)
- .useItem(item)
- .consumeItem(item)
- .gainHp(value)
- .gainMp(value)
- .gainTp(value)
- .gainSilentTp(value)
- .initTp()
- .clearTp()
- .chargeTpByDamage(damageRate)
- .regenerateHp()
- .maxSlipDamage() ⇒
number
- .regenerateMp()
- .regenerateTp()
- .regenerateAll()
- .onBattleStart()
- .onAllActionsEnd()
- .onTurnEnd()
- .onBattleEnd()
- .onDamage(value)
- .setActionState(actionState)
- .isUndecided() ⇒
boolean
- .isInputting() ⇒
boolean
- .isWaiting() ⇒
boolean
- .isActing() ⇒
boolean
- .isChanting() ⇒
boolean
- .isGuardWaiting() ⇒
boolean
- .performActionStart(action)
- .performAction(action)
- .performActionEnd()
- .performDamage()
- .performMiss()
- .performRecovery()
- .performEvasion()
- .performMagicEvasion()
- .performCounter()
- .performReflection()
- .performSubstitute(target)
- .performCollapse()
new Game_Battler()
游戏战斗者类,继承自 Game_BattlerBase,用于处理战斗中的行动和效果
Game battler class, inherits from Game_BattlerBase, handles actions and effects in battle
Game_Battler.initialize()
初始化战斗者对象
Initialize the battler object
Kind: static method of Game_Battler
Game_Battler.initMembers()
初始化战斗者的成员变量
Initialize the battler's member variables
Kind: static method of Game_Battler
Game_Battler.clearAnimations()
清除所有待显示的动画
Clear all pending animations
Kind: static method of Game_Battler
Game_Battler.clearDamagePopup()
清除伤害弹出层显示标志
Clear the damage popup display flag
Kind: static method of Game_Battler
Game_Battler.clearWeaponAnimation()
清除武器动画 ID
Clear the weapon animation ID
Kind: static method of Game_Battler
Game_Battler.clearEffect()
清除视觉效果类型
Clear the visual effect type
Kind: static method of Game_Battler
Game_Battler.clearMotion()
清除动作类型和刷新标志
Clear the motion type and refresh flag
Kind: static method of Game_Battler
Game_Battler.requestEffect(effectType)
请求显示特定的视觉效果
Request to display a specific visual effect
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
effectType | string | 效果类型 Effect type |
Game_Battler.requestMotion(motionType)
请求播放特定的动作
Request to play a specific motion
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
motionType | string | 动作类型 Motion type |
Game_Battler.requestMotionRefresh()
请求刷新动作状态
Request to refresh the motion state
Kind: static method of Game_Battler
Game_Battler.select()
选择此战斗者(通常用于目标选择)
Select this battler (usually for target selection)
Kind: static method of Game_Battler
Game_Battler.deselect()
取消选择此战斗者
Deselect this battler
Kind: static method of Game_Battler
Game_Battler.isAnimationRequested() ⇒ boolean
检查是否有待播放的动画
Check if there are animations waiting to be played
Kind: static method of Game_Battler
Returns: boolean
- 是否有待播放的动画 Whether there are animations to play
Game_Battler.isDamagePopupRequested() ⇒ boolean
检查是否需要显示伤害弹出层
Check if damage popup should be displayed
Kind: static method of Game_Battler
Returns: boolean
- 是否需要显示伤害弹出层 Whether damage popup should be displayed
Game_Battler.isEffectRequested() ⇒ boolean
检查是否有待显示的视觉效果
Check if there is a visual effect waiting to be displayed
Kind: static method of Game_Battler
Returns: boolean
- 是否有待显示的效果 Whether there is an effect to display
Game_Battler.isMotionRequested() ⇒ boolean
检查是否有待播放的动作
Check if there is a motion waiting to be played
Kind: static method of Game_Battler
Returns: boolean
- 是否有待播放的动作 Whether there is a motion to play
Game_Battler.isWeaponAnimationRequested() ⇒ boolean
检查是否有武器动画需要播放
Check if weapon animation needs to be played
Kind: static method of Game_Battler
Returns: boolean
- 是否有武器动画请求 Whether weapon animation is requested
Game_Battler.isMotionRefreshRequested() ⇒ boolean
检查是否需要刷新动作状态
Check if motion state needs to be refreshed
Kind: static method of Game_Battler
Returns: boolean
- 是否需要刷新动作 Whether motion refresh is needed
Game_Battler.isSelected() ⇒ boolean
检查战斗者是否被选择
Check if the battler is selected
Kind: static method of Game_Battler
Returns: boolean
- 是否被选择 Whether the battler is selected
Game_Battler.effectType() ⇒ string
| null
获取当前的视觉效果类型
Get the current visual effect type
Kind: static method of Game_Battler
Returns: string
| null
- 当前效果类型 Current effect type
Game_Battler.motionType() ⇒ string
| null
获取当前的动作类型
Get the current motion type
Kind: static method of Game_Battler
Returns: string
| null
- 当前动作类型 Current motion type
Game_Battler.weaponImageId() ⇒ number
获取武器图像 ID
Get the weapon image ID
Kind: static method of Game_Battler
Returns: number
- 武器图像 ID Weapon image ID
Game_Battler.shiftAnimation() ⇒ object
| undefined
将动画数组的第一个元素从其中删除,并返回第一个元素的值
Remove and return the first element from the animations array
Kind: static method of Game_Battler
Returns: object
| undefined
- 动画数据 Animation data
Game_Battler.startAnimation(animationId, mirror, delay)
开始播放指定的动画
Start playing the specified animation
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
animationId | number | 动画 ID Animation ID |
mirror | boolean | 是否镜像 Whether to mirror |
delay | number | 延迟时间 Delay time |
Game_Battler.startDamagePopup()
开始显示伤害弹出层
Start displaying the damage popup
Kind: static method of Game_Battler
Game_Battler.startWeaponAnimation(weaponImageId)
开始播放武器动画
Start playing weapon animation
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
weaponImageId | number | 武器图像 ID Weapon image ID |
Game_Battler.action(index) ⇒ Game_Action
获取指定索引的行动
Get the action at the specified index
Kind: static method of Game_Battler
Returns: Game_Action
- 指定索引的行动 Action at the specified index
Param | Type | Description |
---|---|---|
index | number | 行动索引 Action index |
Game_Battler.setAction(index, action)
设置指定索引的行动
Set the action at the specified index
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
index | number | 行动索引 Action index |
action | Game_Action | 行动对象 Action object |
Game_Battler.numActions() ⇒ number
获取行动的总数量
Get the total number of actions
Kind: static method of Game_Battler
Returns: number
- 行动数量 Number of actions
Game_Battler.clearActions()
清除所有行动
Clear all actions
Kind: static method of Game_Battler
Game_Battler.result() ⇒ Game_ActionResult
获取行动结果对象
Get the action result object
Kind: static method of Game_Battler
Returns: Game_ActionResult
- 行动结果 Action result
Game_Battler.clearResult()
清除行动结果
Clear the action result
Kind: static method of Game_Battler
Game_Battler.refresh()
刷新战斗者状态,检查死亡状态
Refresh the battler's state, check death state
Kind: static method of Game_Battler
Game_Battler.addState(stateId)
为战斗者添加指定的状态
Add the specified state to the battler
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
stateId | number | 状态 ID State ID |
Game_Battler.isStateAddable(stateId) ⇒ boolean
检查指定状态是否可以添加
Check if the specified state can be added
Kind: static method of Game_Battler
Returns: boolean
- 是否可以添加状态 Whether the state can be added
Param | Type | Description |
---|---|---|
stateId | number | 状态 ID State ID |
Game_Battler.isStateRestrict(stateId) ⇒ boolean
检查状态是否在行动受限时解除
Check if the state is removed when actions are restricted
Kind: static method of Game_Battler
Returns: boolean
- 是否在行动限制时解除 Whether removed when restricted
Param | Type | Description |
---|---|---|
stateId | number | 状态 ID State ID |
Game_Battler.onRestrict()
当战斗者行动受限时的处理
Handle when the battler's actions are restricted
Kind: static method of Game_Battler
Game_Battler.removeState(stateId)
解除指定的状态
Remove the specified state
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
stateId | number | 状态 ID State ID |
Game_Battler.escape()
战斗者逃跑
The battler escapes from battle
Kind: static method of Game_Battler
Game_Battler.addBuff(paramId, turns)
添加强化效果
Add a buff effect
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
paramId | number | 参数 ID Parameter ID |
turns | number | 持续回合数 Duration in turns |
Game_Battler.addDebuff(paramId, turns)
添加弱化效果
Add a debuff effect
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
paramId | number | 参数 ID Parameter ID |
turns | number | 持续回合数 Duration in turns |
Game_Battler.removeBuff(paramId)
解除强化或弱化效果
Remove buff or debuff effect
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
paramId | number | 参数 ID Parameter ID |
Game_Battler.removeBattleStates()
解除所有战斗结束时应该移除的状态
Remove all states that should be removed at battle end
Kind: static method of Game_Battler
Game_Battler.removeAllBuffs()
解除所有的强化和弱化效果
Remove all buff and debuff effects
Kind: static method of Game_Battler
Game_Battler.removeStatesAuto(timing)
自动解除符合条件的状态
Automatically remove states that meet the conditions
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
timing | number | 时机 Timing |
Game_Battler.removeBuffsAuto()
自动解除过期的强化和弱化效果
Automatically remove expired buff and debuff effects
Kind: static method of Game_Battler
Game_Battler.removeStatesByDamage()
受到伤害时可能解除的状态
Remove states that may be removed when taking damage
Kind: static method of Game_Battler
Game_Battler.makeActionTimes() ⇒ number
根据行动次数追加计算实际行动次数
Calculate actual number of actions based on action plus
Kind: static method of Game_Battler
Returns: number
- 行动次数 Number of actions
Game_Battler.makeActions()
创建战斗者的行动列表
Create the battler's action list
Kind: static method of Game_Battler
Game_Battler.speed() ⇒ number
获取战斗者的速度
Get the battler's speed
Kind: static method of Game_Battler
Returns: number
- 速度值 Speed value
Game_Battler.makeSpeed()
计算战斗者的速度值
Calculate the battler's speed value
Kind: static method of Game_Battler
Game_Battler.currentAction() ⇒ Game_Action
获取当前的行动
Get the current action
Kind: static method of Game_Battler
Returns: Game_Action
- 当前行动 Current action
Game_Battler.removeCurrentAction()
移除当前行动(第一个行动)
Remove the current action (first action)
Kind: static method of Game_Battler
Game_Battler.setLastTarget(target)
设置上次选择的目标
Set the last selected target
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标战斗者 Target battler |
Game_Battler.forceAction(skillId, targetIndex)
强制战斗者执行指定行动
Force the battler to perform the specified action
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
skillId | number | 技能 ID Skill ID |
targetIndex | number | 目标索引 Target index |
Game_Battler.useItem(item)
使用技能或物品
Use skill or item
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
item | object | 项目对象 Item object |
Game_Battler.consumeItem(item)
消耗指定的物品
Consume the specified item
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
item | object | 物品对象 Item object |
Game_Battler.gainHp(value)
增加或减少 HP
Increase or decrease HP
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
value | number | HP 值 HP value |
Game_Battler.gainMp(value)
增加或减少 MP
Increase or decrease MP
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
value | number | MP 值 MP value |
Game_Battler.gainTp(value)
增加或减少 TP
Increase or decrease TP
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
value | number | TP 值 TP value |
Game_Battler.gainSilentTp(value)
静默增加 TP 值(不显示在结果中)
Silently increase TP value (not shown in results)
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
value | number | TP 值 TP value |
Game_Battler.initTp()
初始化 TP 值为随机值
Initialize TP to a random value
Kind: static method of Game_Battler
Game_Battler.clearTp()
将 TP 值设为 0
Set TP value to 0
Kind: static method of Game_Battler
Game_Battler.chargeTpByDamage(damageRate)
根据受到的伤害增加 TP
Increase TP based on damage taken
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
damageRate | number | 伤害比例 Damage rate |
Game_Battler.regenerateHp()
自动恢复 HP
Automatically regenerate HP
Kind: static method of Game_Battler
Game_Battler.maxSlipDamage() ⇒ number
计算最大的滑移伤害(持续伤害)
Calculate the maximum slip damage (continuous damage)
Kind: static method of Game_Battler
Returns: number
- 最大移动伤害 Maximum slip damage
Game_Battler.regenerateMp()
自动恢复 MP
Automatically regenerate MP
Kind: static method of Game_Battler
Game_Battler.regenerateTp()
自动恢复 TP
Automatically regenerate TP
Kind: static method of Game_Battler
Game_Battler.regenerateAll()
自动恢复 HP、MP、TP
Automatically regenerate HP, MP, and TP
Kind: static method of Game_Battler
Game_Battler.onBattleStart()
战斗开始时的处理
Handle when battle starts
Kind: static method of Game_Battler
Game_Battler.onAllActionsEnd()
所有行动结束时的处理
Handle when all actions end
Kind: static method of Game_Battler
Game_Battler.onTurnEnd()
回合结束时的处理
Handle when turn ends
Kind: static method of Game_Battler
Game_Battler.onBattleEnd()
战斗结束时的处理
Handle when battle ends
Kind: static method of Game_Battler
Game_Battler.onDamage(value)
受到伤害时的处理
Handle when taking damage
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
value | number | 伤害值 Damage value |
Game_Battler.setActionState(actionState)
设置战斗者的行动状态
Set the battler's action state
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
actionState | string | 行动状态 Action state |
Game_Battler.isUndecided() ⇒ boolean
检查行动状态是否为未决定
Check if action state is undecided
Kind: static method of Game_Battler
Returns: boolean
- 是否未决定行动 Whether action is undecided
Game_Battler.isInputting() ⇒ boolean
检查行动状态是否为输入中
Check if action state is inputting
Kind: static method of Game_Battler
Returns: boolean
- 是否在输入中 Whether inputting
Game_Battler.isWaiting() ⇒ boolean
检查行动状态是否为等待中
Check if action state is waiting
Kind: static method of Game_Battler
Returns: boolean
- 是否在等待中 Whether waiting
Game_Battler.isActing() ⇒ boolean
检查行动状态是否为行动中
Check if action state is acting
Kind: static method of Game_Battler
Returns: boolean
- 是否在行动中 Whether acting
Game_Battler.isChanting() ⇒ boolean
检查是否在吟唱魔法技能
Check if chanting a magic skill
Kind: static method of Game_Battler
Returns: boolean
- 是否在吟唱 Whether chanting
Game_Battler.isGuardWaiting() ⇒ boolean
检查是否在防御等待状态
Check if in guard waiting state
Kind: static method of Game_Battler
Returns: boolean
- 是否在防御等待 Whether guard waiting
Game_Battler.performActionStart(action)
表现行动开始的效果
Perform the effects of action start
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
action | Game_Action | 行动对象 Action object |
Game_Battler.performAction(action)
表现行动的效果(子类中实现)
Perform the effects of the action (implemented in subclasses)
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
action | Game_Action | 行动对象 Action object |
Game_Battler.performActionEnd()
表现行动结束的效果
Perform the effects of action end
Kind: static method of Game_Battler
Game_Battler.performDamage()
表现受到伤害的效果(子类中实现)
Perform the effects of taking damage (implemented in subclasses)
Kind: static method of Game_Battler
Game_Battler.performMiss()
表现未命中的效果
Perform the effects of missing
Kind: static method of Game_Battler
Game_Battler.performRecovery()
表现恢复的效果
Perform the effects of recovery
Kind: static method of Game_Battler
Game_Battler.performEvasion()
表现物理闪避的效果
Perform the effects of physical evasion
Kind: static method of Game_Battler
Game_Battler.performMagicEvasion()
表现魔法闪避的效果
Perform the effects of magic evasion
Kind: static method of Game_Battler
Game_Battler.performCounter()
表现反击的效果
Perform the effects of counter attack
Kind: static method of Game_Battler
Game_Battler.performReflection()
表现技能反射的效果
Perform the effects of skill reflection
Kind: static method of Game_Battler
Game_Battler.performSubstitute(target)
表现掩护的效果(子类中实现)
Perform the effects of substitution (implemented in subclasses)
Kind: static method of Game_Battler
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标战斗者 Target battler |
Game_Battler.performCollapse()
表现倒下的效果(子类中实现)
Perform the effects of collapse (implemented in subclasses)
Kind: static method of Game_Battler