Adding a new game buff

From ETC Public Wiki
Jump to: navigation, search

How to Add a New Status Effect

In order to add a new SE, you must first add an entry into /scripts/config/statusEffects.js. A status effect can only do one effect at once. In the future, we might decide adding multiple status effects to enemies, for now only one can be added. These fields need to be filled in:

StatEffectName - This is the name of the Effect to be referenced later by a character/enemy/hero power.
StatEffectType - This is the status that is changed. There will be a list of available stats below.
StatEffectAmount - The amount of the change. 1 means unchanged, 2 would be x2.
StatEffectDuration - The duration (in milliseconds) of an effect.
StatEffectUnique - Whether or not the status effect is unique. If true, then it cannot stack with itself.

Types (Defined in Global Vars):

STAT_EFFECT_NONE - nothing.
STAT_EFFECT_SPEED - A speed buff/debuff.
STAT_EFFECT_DAM_BUFF - A damage buff/debuff.
STAT_EFFECT_DEF_BUFF - A defense buff/debuff. (.75 amount would be 1/.75 or 133% damage taken)
STAT_EFFECT_DOT - A damage over time. Amount is the damage. (Damage might not be working)
STAT_EFFECT_NODEATH - If active, recipient of the buff cannot die.
STAT_EFFECT_RANGE - Range of attack.

The StatEffectName will then be referenced by the user of the effect. In the future, visual feedback of a SE is needed.