Game_Action
Game_Action
Kind: global class
- Game_Action
- new Game_Action()
- .initialize(subject, forcing)
- .clear()
- .setSubject(subject)
- .subject() ⇒
Game_Battler
- .friendsUnit() ⇒
Game_Unit
- .opponentsUnit() ⇒
Game_Unit
- .setEnemyAction(action)
- .setAttack()
- .setGuard()
- .setSkill(skillId)
- .setItem(itemId)
- .setItemObject(object)
- .setTarget(targetIndex)
- .item() ⇒
Object
- .isSkill() ⇒
Boolean
- .isItem() ⇒
Boolean
- .numRepeats() ⇒
Number
- .checkItemScope(list) ⇒
Boolean
- .isForOpponent() ⇒
Boolean
- .isForFriend() ⇒
Boolean
- .isForDeadFriend() ⇒
Boolean
- .isForUser() ⇒
Boolean
- .isForOne() ⇒
Boolean
- .isForRandom() ⇒
Boolean
- .isForAll() ⇒
Boolean
- .needsSelection() ⇒
Boolean
- .numTargets() ⇒
Number
- .checkDamageType(list) ⇒
Boolean
- .isHpEffect() ⇒
Boolean
- .isMpEffect() ⇒
Boolean
- .isDamage() ⇒
Boolean
- .isRecover() ⇒
Boolean
- .isDrain() ⇒
Boolean
- .isHpRecover() ⇒
Boolean
- .isMpRecover() ⇒
Boolean
- .isCertainHit() ⇒
Boolean
- .isPhysical() ⇒
Boolean
- .isMagical() ⇒
Boolean
- .isAttack() ⇒
Boolean
- .isGuard() ⇒
Boolean
- .isMagicSkill() ⇒
Boolean
- .decideRandomTarget()
- .setConfusion()
- .prepare()
- .isValid() ⇒
Boolean
- .speed() ⇒
Number
- .makeTargets() ⇒
Array
- .repeatTargets(targets) ⇒
Array
- .confusionTarget() ⇒
Game_Battler
- .targetsForOpponents() ⇒
Array
- .targetsForFriends() ⇒
Array
- .evaluate() ⇒
Number
- .itemTargetCandidates() ⇒
Array
- .evaluateWithTarget(target) ⇒
Number
- .testApply(target) ⇒
Boolean
- .hasItemAnyValidEffects(target) ⇒
Boolean
- .testItemEffect(target, effect) ⇒
Boolean
- .itemCnt(target) ⇒
Number
- .itemMrf(target) ⇒
Number
- .itemHit(target) ⇒
Number
- .itemEva(target) ⇒
Number
- .itemCri(target) ⇒
Number
- .apply(target)
- .makeDamageValue(target, critical) ⇒
Number
- .evalDamageFormula(target) ⇒
Number
- .calcElementRate(target) ⇒
Number
- .elementsMaxRate(target, elements) ⇒
Number
- .applyCritical(damage) ⇒
Number
- .applyVariance(damage, variance) ⇒
Number
- .applyGuard(damage, target) ⇒
Number
- .executeDamage(target, value)
- .executeHpDamage(target, value)
- .executeMpDamage(target, value)
- .gainDrainedHp(value)
- .gainDrainedMp(value)
- .applyItemEffect(target, effect)
- .itemEffectRecoverHp(target, effect)
- .itemEffectRecoverMp(target, effect)
- .itemEffectGainTp(target, effect)
- .itemEffectAddState(target, effect)
- .itemEffectAddAttackState(target, effect)
- .itemEffectAddNormalState(target, effect)
- .itemEffectRemoveState(target, effect)
- .itemEffectAddBuff(target, effect)
- .itemEffectAddDebuff(target, effect)
- .itemEffectRemoveBuff(target, effect)
- .itemEffectRemoveDebuff(target, effect)
- .itemEffectSpecial(target, effect)
- .itemEffectGrow(target, effect)
- .itemEffectLearnSkill(target, effect)
- .itemEffectCommonEvent(target, effect)
- .makeSuccess(target)
- .applyItemUserEffect(target)
- .lukEffectRate(target) ⇒
Number
- .applyGlobal()
new Game_Action()
行动对象类
Game action class
Game_Action.initialize(subject, forcing)
初始化行动对象
Initialize action object
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
subject | Game_Battler | 行动主体 - Action subject |
forcing | Boolean | 是否强制 - Whether forcing |
Game_Action.clear()
清除行动
Clear action
Kind: static method of Game_Action
Game_Action.setSubject(subject)
设置行动主体
Set action subject
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
subject | Game_Battler | 行动主体 - Action subject |
Game_Action.subject() ⇒ Game_Battler
获取行动主体
Get action subject
Kind: static method of Game_Action
Returns: Game_Battler
- 行动主体 - Action subject
Game_Action.friendsUnit() ⇒ Game_Unit
获取我方单位
Get friends unit
Kind: static method of Game_Action
Returns: Game_Unit
- 我方单位 - Friends unit
Game_Action.opponentsUnit() ⇒ Game_Unit
获取敌方单位
Get opponents unit
Kind: static method of Game_Action
Returns: Game_Unit
- 敌方单位 - Opponents unit
Game_Action.setEnemyAction(action)
设置敌人行动
Set enemy action
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
action | Object | 敌人行动数据 - Enemy action data |
Game_Action.setAttack()
设置普通攻击
Set attack
Kind: static method of Game_Action
Game_Action.setGuard()
设置防御
Set guard
Kind: static method of Game_Action
Game_Action.setSkill(skillId)
设置技能
Set skill
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
skillId | Number | 技能 ID - Skill ID |
Game_Action.setItem(itemId)
设置物品
Set item
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
itemId | Number | 物品 ID - Item ID |
Game_Action.setItemObject(object)
设置项目对象
Set item object
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
object | Object | 项目对象 - Item object |
Game_Action.setTarget(targetIndex)
设置目标
Set target
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
targetIndex | Number | 目标索引 - Target index |
Game_Action.item() ⇒ Object
获取项目
Get item
Kind: static method of Game_Action
Returns: Object
- 项目对象 - Item object
Game_Action.isSkill() ⇒ Boolean
是否是技能
Check if it is a skill
Kind: static method of Game_Action
Returns: Boolean
- 是否为技能 - Whether it is a skill
Game_Action.isItem() ⇒ Boolean
是否是物品
Check if it is an item
Kind: static method of Game_Action
Returns: Boolean
- 是否为物品 - Whether it is an item
Game_Action.numRepeats() ⇒ Number
获取连续次数
Get number of repeats
Kind: static method of Game_Action
Returns: Number
- 连续次数 - Number of repeats
Game_Action.checkItemScope(list) ⇒ Boolean
检测项目范围
Check item scope
Kind: static method of Game_Action
Returns: Boolean
- 是否在范围内 - Whether in scope
Param | Type | Description |
---|---|---|
list | Array | 范围列表 - Scope list |
Game_Action.isForOpponent() ⇒ Boolean
是否作用于敌方
Check if for opponent
Kind: static method of Game_Action
Returns: Boolean
- 是否作用于敌方 - Whether for opponent
Game_Action.isForFriend() ⇒ Boolean
是否作用于我方
Check if for friend
Kind: static method of Game_Action
Returns: Boolean
- 是否作用于我方 - Whether for friend
Game_Action.isForDeadFriend() ⇒ Boolean
是否作用于我方无法战斗的
Check if for dead friend
Kind: static method of Game_Action
Returns: Boolean
- 是否作用于死亡我方 - Whether for dead friend
Game_Action.isForUser() ⇒ Boolean
是否作用于使用者
Check if for user
Kind: static method of Game_Action
Returns: Boolean
- 是否作用于使用者 - Whether for user
Game_Action.isForOne() ⇒ Boolean
是否作用于单体
Check if for one target
Kind: static method of Game_Action
Returns: Boolean
- 是否作用于单体 - Whether for one target
Game_Action.isForRandom() ⇒ Boolean
是否作用于随机目标
Check if for random targets
Kind: static method of Game_Action
Returns: Boolean
- 是否作用于随机目标 - Whether for random targets
Game_Action.isForAll() ⇒ Boolean
是否作用于全体
Check if for all targets
Kind: static method of Game_Action
Returns: Boolean
- 是否作用于全体 - Whether for all targets
Game_Action.needsSelection() ⇒ Boolean
是否需要选择目标
Check if needs selection
Kind: static method of Game_Action
Returns: Boolean
- 是否需要选择 - Whether needs selection
Game_Action.numTargets() ⇒ Number
获取目标数量
Get number of targets
Kind: static method of Game_Action
Returns: Number
- 目标数量 - Number of targets
Game_Action.checkDamageType(list) ⇒ Boolean
检测伤害类型
Check damage type
Kind: static method of Game_Action
Returns: Boolean
- 是否匹配 - Whether matches
Param | Type | Description |
---|---|---|
list | Array | 伤害类型列表 - Damage type list |
Game_Action.isHpEffect() ⇒ Boolean
是否是 HP 效果
Check if HP effect
Kind: static method of Game_Action
Returns: Boolean
- 是否为 HP 效果 - Whether HP effect
Game_Action.isMpEffect() ⇒ Boolean
是否是 MP 效果
Check if MP effect
Kind: static method of Game_Action
Returns: Boolean
- 是否为 MP 效果 - Whether MP effect
Game_Action.isDamage() ⇒ Boolean
是否是伤害
Check if damage
Kind: static method of Game_Action
Returns: Boolean
- 是否为伤害 - Whether damage
Game_Action.isRecover() ⇒ Boolean
是否是恢复
Check if recover
Kind: static method of Game_Action
Returns: Boolean
- 是否为恢复 - Whether recover
Game_Action.isDrain() ⇒ Boolean
是否是吸收
Check if drain
Kind: static method of Game_Action
Returns: Boolean
- 是否为吸收 - Whether drain
Game_Action.isHpRecover() ⇒ Boolean
是否是 HP 恢复
Check if HP recover
Kind: static method of Game_Action
Returns: Boolean
- 是否为 HP 恢复 - Whether HP recover
Game_Action.isMpRecover() ⇒ Boolean
是否是 MP 恢复
Check if MP recover
Kind: static method of Game_Action
Returns: Boolean
- 是否为 MP 恢复 - Whether MP recover
Game_Action.isCertainHit() ⇒ Boolean
是否是必定命中
Check if certain hit
Kind: static method of Game_Action
Returns: Boolean
- 是否必定命中 - Whether certain hit
Game_Action.isPhysical() ⇒ Boolean
是否是物理攻击
Check if physical attack
Kind: static method of Game_Action
Returns: Boolean
- 是否为物理攻击 - Whether physical attack
Game_Action.isMagical() ⇒ Boolean
是否是魔法攻击
Check if magical attack
Kind: static method of Game_Action
Returns: Boolean
- 是否为魔法攻击 - Whether magical attack
Game_Action.isAttack() ⇒ Boolean
是否是普通攻击
Check if normal attack
Kind: static method of Game_Action
Returns: Boolean
- 是否为普通攻击 - Whether normal attack
Game_Action.isGuard() ⇒ Boolean
是否是防御
Check if guard
Kind: static method of Game_Action
Returns: Boolean
- 是否为防御 - Whether guard
Game_Action.isMagicSkill() ⇒ Boolean
是否是魔法技能
Check if magic skill
Kind: static method of Game_Action
Returns: Boolean
- 是否为魔法技能 - Whether magic skill
Game_Action.decideRandomTarget()
决定随机目标
Decide random target
Kind: static method of Game_Action
Game_Action.setConfusion()
设置混乱行动
Set confusion action
Kind: static method of Game_Action
Game_Action.prepare()
准备行动
Prepare action
Kind: static method of Game_Action
Game_Action.isValid() ⇒ Boolean
是否有效
Check if valid
Kind: static method of Game_Action
Returns: Boolean
- 是否有效 - Whether valid
Game_Action.speed() ⇒ Number
获取速度
Get speed
Kind: static method of Game_Action
Returns: Number
- 速度值 - Speed value
Game_Action.makeTargets() ⇒ Array
制作目标列表
Make targets
Kind: static method of Game_Action
Returns: Array
- 目标列表 - Target list
Game_Action.repeatTargets(targets) ⇒ Array
处理连续目标
Process repeat targets
Kind: static method of Game_Action
Returns: Array
- 重复目标列表 - Repeated target list
Param | Type | Description |
---|---|---|
targets | Array | 目标列表 - Target list |
Game_Action.confusionTarget() ⇒ Game_Battler
获取混乱目标
Get confusion target
Kind: static method of Game_Action
Returns: Game_Battler
- 混乱目标 - Confusion target
Game_Action.targetsForOpponents() ⇒ Array
获取敌方目标
Get targets for opponents
Kind: static method of Game_Action
Returns: Array
- 敌方目标列表 - Opponent target list
Game_Action.targetsForFriends() ⇒ Array
获取我方目标
Get targets for friends
Kind: static method of Game_Action
Returns: Array
- 我方目标列表 - Friend target list
Game_Action.evaluate() ⇒ Number
评估行动价值
Evaluate action
Kind: static method of Game_Action
Returns: Number
- 评估值 - Evaluation value
Game_Action.itemTargetCandidates() ⇒ Array
获取项目目标候选
Get item target candidates
Kind: static method of Game_Action
Returns: Array
- 候选目标列表 - Candidate target list
Game_Action.evaluateWithTarget(target) ⇒ Number
对目标进行评估
Evaluate with target
Kind: static method of Game_Action
Returns: Number
- 评估值 - Evaluation value
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
Game_Action.testApply(target) ⇒ Boolean
测试是否可应用
Test if can apply
Kind: static method of Game_Action
Returns: Boolean
- 是否可应用 - Whether can apply
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
Game_Action.hasItemAnyValidEffects(target) ⇒ Boolean
项目是否有任何有效效果
Check if item has any valid effects
Kind: static method of Game_Action
Returns: Boolean
- 是否有效果 - Whether has effects
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
Game_Action.testItemEffect(target, effect) ⇒ Boolean
测试项目效果
Test item effect
Kind: static method of Game_Action
Returns: Boolean
- 是否有效 - Whether valid
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.itemCnt(target) ⇒ Number
获取项目反击值
Get item counter attack value
Kind: static method of Game_Action
Returns: Number
- 反击值 - Counter attack value
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
Game_Action.itemMrf(target) ⇒ Number
获取项目魔法反射值
Get item magic reflection value
Kind: static method of Game_Action
Returns: Number
- 魔法反射值 - Magic reflection value
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
Game_Action.itemHit(target) ⇒ Number
获取项目命中率值
Get item hit rate value
Kind: static method of Game_Action
Returns: Number
- 命中率值 - Hit rate value
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
Game_Action.itemEva(target) ⇒ Number
获取项目回避率值
Get item evasion rate value
Kind: static method of Game_Action
Returns: Number
- 回避率值 - Evasion rate value
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
Game_Action.itemCri(target) ⇒ Number
获取项目暴击率值
Get item critical rate value
Kind: static method of Game_Action
Returns: Number
- 暴击率值 - Critical rate value
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
Game_Action.apply(target)
应用行动
Apply action
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
Game_Action.makeDamageValue(target, critical) ⇒ Number
制作伤害值
Make damage value
Kind: static method of Game_Action
Returns: Number
- 伤害值 - Damage value
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
critical | Boolean | 是否暴击 - Whether critical |
Game_Action.evalDamageFormula(target) ⇒ Number
计算伤害公式
Evaluate damage formula
Kind: static method of Game_Action
Returns: Number
- 计算结果 - Calculation result
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
Game_Action.calcElementRate(target) ⇒ Number
计算属性有效度
Calculate element rate
Kind: static method of Game_Action
Returns: Number
- 属性有效度 - Element rate
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
Game_Action.elementsMaxRate(target, elements) ⇒ Number
计算属性最高有效度
Calculate max element rate
Kind: static method of Game_Action
Returns: Number
- 最高有效度 - Max rate
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
elements | Array | 属性列表 - Element list |
Game_Action.applyCritical(damage) ⇒ Number
应用暴击
Apply critical
Kind: static method of Game_Action
Returns: Number
- 暴击伤害值 - Critical damage value
Param | Type | Description |
---|---|---|
damage | Number | 伤害值 - Damage value |
Game_Action.applyVariance(damage, variance) ⇒ Number
应用分散度
Apply variance
Kind: static method of Game_Action
Returns: Number
- 最终伤害值 - Final damage value
Param | Type | Description |
---|---|---|
damage | Number | 伤害值 - Damage value |
variance | Number | 分散度 - Variance |
Game_Action.applyGuard(damage, target) ⇒ Number
应用防御
Apply guard
Kind: static method of Game_Action
Returns: Number
- 防御后伤害值 - Damage after guard
Param | Type | Description |
---|---|---|
damage | Number | 伤害值 - Damage value |
target | Game_Battler | 目标 - Target |
Game_Action.executeDamage(target, value)
执行伤害
Execute damage
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
value | Number | 伤害值 - Damage value |
Game_Action.executeHpDamage(target, value)
执行 HP 伤害
Execute HP damage
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
value | Number | 伤害值 - Damage value |
Game_Action.executeMpDamage(target, value)
执行 MP 伤害
Execute MP damage
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
value | Number | 伤害值 - Damage value |
Game_Action.gainDrainedHp(value)
获得吸收的 HP
Gain drained HP
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
value | Number | 吸收值 - Drained value |
Game_Action.gainDrainedMp(value)
获得吸收的 MP
Gain drained MP
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
value | Number | 吸收值 - Drained value |
Game_Action.applyItemEffect(target, effect)
应用项目效果
Apply item effect
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.itemEffectRecoverHp(target, effect)
项目效果 - 恢复 HP
Item effect - recover HP
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.itemEffectRecoverMp(target, effect)
项目效果 - 恢复 MP
Item effect - recover MP
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.itemEffectGainTp(target, effect)
项目效果 - 获得 TP
Item effect - gain TP
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.itemEffectAddState(target, effect)
项目效果 - 附加状态
Item effect - add state
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.itemEffectAddAttackState(target, effect)
项目效果 - 附加普通攻击状态
Item effect - add attack state
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.itemEffectAddNormalState(target, effect)
项目效果 - 附加普通状态
Item effect - add normal state
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.itemEffectRemoveState(target, effect)
项目效果 - 解除状态
Item effect - remove state
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.itemEffectAddBuff(target, effect)
项目效果 - 强化
Item effect - add buff
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.itemEffectAddDebuff(target, effect)
项目效果 - 弱化
Item effect - add debuff
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.itemEffectRemoveBuff(target, effect)
项目效果 - 解除强化
Item effect - remove buff
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.itemEffectRemoveDebuff(target, effect)
项目效果 - 解除弱化
Item effect - remove debuff
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.itemEffectSpecial(target, effect)
项目效果 - 特殊效果
Item effect - special
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.itemEffectGrow(target, effect)
项目效果 - 成长
Item effect - grow
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.itemEffectLearnSkill(target, effect)
项目效果 - 学会技能
Item effect - learn skill
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.itemEffectCommonEvent(target, effect)
项目效果 - 公共事件
Item effect - common event
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
effect | Object | 效果 - Effect |
Game_Action.makeSuccess(target)
制作成功结果
Make success result
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
Game_Action.applyItemUserEffect(target)
应用项目使用者效果
Apply item user effect
Kind: static method of Game_Action
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
Game_Action.lukEffectRate(target) ⇒ Number
获取幸运效果变化率
Get luck effect rate
Kind: static method of Game_Action
Returns: Number
- 幸运效果率 - Luck effect rate
Param | Type | Description |
---|---|---|
target | Game_Battler | 目标 - Target |
Game_Action.applyGlobal()
应用全局效果
Apply global effects
Kind: static method of Game_Action