Apply the action to the target
applyCritical(damage)number
Apply the critical effect to the damage value
| Name | Type | Description |
|---|
damage | number | The original damage value |
Returns:
| Type | Description |
|---|
| number | The damage value after applying critical effect |
Apply global effects
applyGuard(damage, target)number
Apply guard effect to the damage value
| Name | Type | Description |
|---|
damage | number | The base damage value |
target | Game_Battler | The target |
Returns:
| Type | Description |
|---|
| number | The damage value after applying guard effect |
applyItemEffect(target, effect)
Apply item effects on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
effect | Object | The item effect |
Apply item user effects on the target (in this case, the subject)
applyVariance(damage, variance)number
Apply variance to the damage value
| Name | Type | Description |
|---|
damage | number | The base damage value |
variance | number | The variance value |
Returns:
| Type | Description |
|---|
| number | The damage value after applying variance |
calcElementRate(target)number
Calculate the element rate for the target
Returns:
| Type | Description |
|---|
| number | The element rate |
checkDamageType(list)boolean
Check if the action's damage type matches the list of damage types
| Name | Type | Description |
|---|
list | Array | List of damage types to check |
Returns:
| Type | Description |
|---|
| boolean | True if damage type included in given list |
checkItemScope(list)boolean
Check the item's scope
| Name | Type | Description |
|---|
list | Array | The list to check scope for |
Returns:
| Type | Description |
|---|
| boolean | True if scope is included in the list |
Clears the action
Get the confusion target
Returns:
Choose a random target
elementsMaxRate(target, elements)number
Get the maximum element rate effect
| Name | Type | Description |
|---|
target | Game_Battler | The target |
elements | Array | The list of elements |
Returns:
| Type | Description |
|---|
| number | The max element rate |
eval the damage formula
Returns:
| Type | Description |
|---|
| number | The result value |
Evaluate the action
Returns:
| Type | Description |
|---|
| number | The value of the action |
evaluateWithTarget(target)number
Evaluate the action with a target
Returns:
| Type | Description |
|---|
| number | The value of the action |
executeDamage(target, value)
Execute damage on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
value | number | The damage value |
executeHpDamage(target, value)
Execute hp damage on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
value | number | The damage value |
executeMpDamage(target, value)
Execute mp damage on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
value | number | The damage value |
Get the friendly unit of the action
Returns:
| Type | Description |
|---|
| Game_Unit | The subject's friendly unit |
Gain drained hp
| Name | Type | Description |
|---|
value | number | The drain value |
Gain drained mp
| Name | Type | Description |
|---|
value | number | The drain value |
hasItemAnyValidEffects(target)boolean
Test applying the action to the target for valid effects
Returns:
| Type | Description |
|---|
| boolean | True if the action has an effect |
initialize(subject, forcing)
Initialize the action
| Name | Type | Default | Description |
|---|
subject | Game_Battler | | The subject of the action |
forcing | boolean | false | optionalIf the action is forcing |
Check if the action is an attack
Returns:
| Type | Description |
|---|
| boolean | True if attack |
Check if the action is a certain hit
Returns:
| Type | Description |
|---|
| boolean | True if certain hit |
Check if the action's damage type is a damage type
Returns:
| Type | Description |
|---|
| boolean | True if damage type is damage effect |
Check if the action's damage type is a drain type
Returns:
| Type | Description |
|---|
| boolean | True if damage type is drain effect |
isForAliveFriend()boolean
Check if the action is for alive allies
Returns:
| Type | Description |
|---|
| boolean | True if scope includes alive allies |
Check if the action is for all
Returns:
| Type | Description |
|---|
| boolean | True if scope includes all |
Check if the action is for dead allies
Returns:
| Type | Description |
|---|
| boolean | True if scope includes only dead allies |
Check if the action is for everyone
Returns:
| Type | Description |
|---|
| boolean | True if scope includes everyone |
Check if the action is for allies
Returns:
| Type | Description |
|---|
| boolean | True if scope includes allies |
Check if the action is for one target
Returns:
| Type | Description |
|---|
| boolean | True if scope includes only one target |
Check if the action is for opponent
Returns:
| Type | Description |
|---|
| boolean | True if scope includes opponents |
Check if the action is for a random unit
Returns:
| Type | Description |
|---|
| boolean | True if scope includes random units |
Check if the action is for the user
Returns:
| Type | Description |
|---|
| boolean | True if scope includes only the user |
Check if the action is a guard
Returns:
| Type | Description |
|---|
| boolean | True if guard |
Check if the action's damage type is an hp type
Returns:
| Type | Description |
|---|
| boolean | True if damage type is hp effect |
Check if the action's damage type is an hp recover type
Returns:
| Type | Description |
|---|
| boolean | True if damage type is hp recover effect |
Check if the action item is an item
Returns:
| Type | Description |
|---|
| boolean | True if item |
Check if the action is a magic skill
Returns:
| Type | Description |
|---|
| boolean | True if magic skill |
Check if the action is magical
Returns:
| Type | Description |
|---|
| boolean | True if magical |
Check if the action's damage type is an mp type
Returns:
| Type | Description |
|---|
| boolean | True if damage type is mp effect |
Check if the action's damage type is an mp recover type
Returns:
| Type | Description |
|---|
| boolean | True if damage type is mp recover effect |
Check if the action is physical
Returns:
| Type | Description |
|---|
| boolean | True if physical |
Check if the action's damage type is a recover type
Returns:
| Type | Description |
|---|
| boolean | True if damage type is recover effect |
Check if the action item is a skill
Returns:
| Type | Description |
|---|
| boolean | True if skill |
Check if the action is valid
Returns:
| Type | Description |
|---|
| boolean | True if the action is valid |
Get the item of the action
Returns:
| Type | Description |
|---|
| Object | The item data object |
Get the item cnt (counter attack rate)
Returns:
| Type | Description |
|---|
| number | The counter attack rate |
Get the item cri (critical rate)
Returns:
| Type | Description |
|---|
| number | The critical rate |
itemEffectAddAttackState(target, effect)
Apply add attack state effects on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
effect | Object | The item effect |
itemEffectAddBuff(target, effect)
Apply add buff effects on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
effect | Object | The item effect |
itemEffectAddDebuff(target, effect)
Apply add debuff effects on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
effect | Object | The item effect |
itemEffectAddNormalState(target, effect)
Apply add normal state effects on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
effect | Object | The item effect |
itemEffectAddState(target, effect)
Apply add state effects on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
effect | Object | The item effect |
itemEffectCommonEvent(target, effect)
Apply common event effects on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
effect | Object | The item effect |
itemEffectGainTp(target, effect)
Apply gain tp effects on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
effect | Object | The item effect |
itemEffectGrow(target, effect)
Apply grow effects on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
effect | Object | The item effect |
itemEffectLearnSkill(target, effect)
Apply learn skill effects on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
effect | Object | The item effect |
itemEffectRecoverHp(target, effect)
Apply recover hp effects on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
effect | Object | The item effect |
itemEffectRecoverMp(target, effect)
Apply recover mp effects on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
effect | Object | The item effect |
itemEffectRemoveBuff(target, effect)
Apply remove buff effects on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
effect | Object | The item effect |
itemEffectRemoveDebuff(target, effect)
Apply remove debuff effects on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
effect | Object | The item effect |
itemEffectRemoveState(target, effect)
Apply remove state effects on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
effect | Object | The item effect |
itemEffectSpecial(target, effect)
Apply special effects on the target
| Name | Type | Description |
|---|
target | Game_Battler | The target |
effect | Object | The item effect |
Get the item evade rate
Returns:
| Type | Description |
|---|
| number | The evade rate |
Get the item hit rate
Returns:
| Type | Description |
|---|
| number | The hit rate |
Get the item mrf (magic reflection rate)
Returns:
| Type | Description |
|---|
| number | The magic reflection rate |
Get the target candidates
Returns:
| Type | Description |
|---|
| Array.<Game_Battler> | The array of candidate targets |
lukEffectRate(target)number
Get the luk effect rate
Returns:
| Type | Description |
|---|
| number | The luk effect rate |
makeDamageValue(target, critical)number
Make the damage value
| Name | Type | Description |
|---|
target | Game_Battler | The target |
critical | boolean | If the effect is a critical |
Returns:
| Type | Description |
|---|
| number | The damage value |
Make the success status for the target
Make the targets of the action
Returns:
Check if the action is needs to select a target
Returns:
| Type | Description |
|---|
| boolean | True if scope requires target selection |
Get amount of repeats
Returns:
| Type | Description |
|---|
| number | Number of repeats |
Get number of targets when random
Returns:
| Type | Description |
|---|
| number | Amount of random targets |
Get the opponent unit of the action
Returns:
| Type | Description |
|---|
| Game_Unit | The subject's opponent unit |
Prepares the action
Make the targets for random
| Name | Type | Description |
|---|
unit | Game_Unit | The unit to look for random targets in |
Returns:
| Type | Description |
|---|
| Array.<Game_Battler> | The array of targets for random |
Repeat the targets for the action if it repeats
| Name | Type | Description |
|---|
targets | Array.<Game_Battler> | The target array to repeat |
Returns:
Set an attack action
Sets confusion action
Set an enemy action
| Name | Type | Description |
|---|
The | Object | enemy action |
Set a guard action
Set an item action
| Name | Type | Description |
|---|
itemId | number | The set item's id |
Set an item action
| Name | Type | Description |
|---|
object | Object | The item object to set |
Set a skill action
| Name | Type | Description |
|---|
skillId | number | The set skill's id |
Set the subject of the action
Set the target index
| Name | Type | Description |
|---|
targetIndex | number | The target index |
Get the action speed
Returns:
| Type | Description |
|---|
| number | The action speed |
Get the subject of the action
Returns:
Make the targets for alive
| Name | Type | Description |
|---|
unit | Game_Unit | The unit to look for alive targets in |
Returns:
| Type | Description |
|---|
| Array.<Game_Battler> | The array of targets for alive |
Make the targets for dead
| Name | Type | Description |
|---|
unit | Game_Unit | The unit to look for dead targets in |
Returns:
| Type | Description |
|---|
| Array.<Game_Battler> | The array of targets for dead |
Make the targets for alive
| Name | Type | Description |
|---|
unit | Game_Unit | The unit to look for dead and alive targets in |
Returns:
| Type | Description |
|---|
| Array.<Game_Battler> | The array of targets for dead and alive |
Make the targets for everyone
Returns:
| Type | Description |
|---|
| Array.<Game_Battler> | The array of targets for everyone |
Make the targets for allies
Returns:
| Type | Description |
|---|
| Array.<Game_Battler> | The array of targets for allies |
Make the targets for opponents
Returns:
| Type | Description |
|---|
| Array.<Game_Battler> | The array of targets for opponents |
Test applying the action to the target
Returns:
| Type | Description |
|---|
| boolean | True if the action has an effect |
testItemEffect(target)boolean
Test the item effect on the target
Returns:
| Type | Description |
|---|
| boolean | True if the action has an effect |
testLifeAndDeath(target)boolean
Test applying the action to the target for life and death states
Returns:
| Type | Description |
|---|
| boolean | True if the action has an effect that works on the target's alive status |
Update the last subject id
Update the last target id
Update the last used skill or item id