getWeaponEffects
getWeaponEffects
> Functions
Returns the effects of the weapon weapon.
Parameters
- weapon: The id of the weapon whose effects will be returned.
Return
- effects: An array containing the effects of the weapon weapon. Each effect is itself an array of the form
[type, min, max, turns, targets, modifiers].
- type is one of the effect constants: EFFECT_DAMAGE, EFFECT_HEAL, EFFECT_ABSOLUTE_SHIELD, EFFECT_RELATIVE_SHIELD, EFFECT_DEBUFF, EFFECT_BUFF_STRENGTH, EFFECT_BUFF_AGILITY, EFFECT_BUFF_MP, EFFECT_BUFF_TP, etc.
- min and max are the minimum and maximum values of the effect (as shown in the Market).
- turns is the duration of the effect, in turns.
- targets represents the entities that will be hit by this effect in the area. It is a bitwise combination of the constants:
- EFFECT_TARGET_ALLIES: Affects allies
- EFFECT_TARGET_ENEMIES: Affects enemies
- EFFECT_TARGET_CASTER: Affects the caster
- EFFECT_TARGET_SUMMONS: Affects summons
- EFFECT_TARGET_NON_SUMMONS: Affects non-summoned entities
- modifiers represents the modifiers of the effect. It is a bitwise combination of the constants:
- EFFECT_MODIFIER_STACKABLE: The effect is stackable.
- EFFECT_MODIFIER_MULTIPLIED_BY_TARGETS: The effect is multiplied by the number of targets hit in the area.
- EFFECT_MODIFIER_ON_CASTER: Always affects the caster.
Examples
Get the average damage of a weapon:
Read the targets:
Read the modifiers: This value can be read as follows: