Effects

Effects

> Game Rules

An effect can mean two things: a game mechanism, or one application of that mechanism.

Effects of weapons and chips

They are used in the description of a weapon or a chip. You can get them with getWeaponEffects and getChipEffects respectively. The passive effects of forgotten weapons can also be retrieved, in the same format, with the getWeaponPassiveEffects function. The result is a list of effects, in the form of an array of arrays. Each effect is made up of:

Type

Constant name Value Action

EFFECT_DAMAGE 1 Removes life points from an entity. Amplified by strength. Interacts with shields, life steal and damage return. Reduces maximum life points by 5% of the amount removed.

EFFECT_HEAL 2 Restores life points to an entity, up to its maximum life points. Amplified by wisdom.

EFFECT_BUFF_STRENGTH 3 Gives strength to an entity. Amplified by science.

EFFECT_AGILITY 4 Increases the target's agility. -->

EFFECT_BUFF_AGILITY 4 Gives agility to an entity. Amplified by science.

EFFECT_RELATIVE_SHIELD 5 Gives a relative shield, which reduces the life points removed by damage by a relative amount. Amplified by resistance.

EFFECT_ABSOLUTE_SHIELD 6 Gives absolute shield, which reduces the life points removed by damage by a fixed amount. Amplified by resistance.

EFFECT_BUFF_MP 7 Gives movement points to an entity. Amplified by science.

EFFECT_BUFF_TP 8 Gives action points to an entity. Amplified by science.

EFFECT_DEBUFF 9 Reduces the value of all the effects on an entity by a percentage.

EFFECT_TELEPORT 10 Changes the caster's position.

EFFECT_INVERT 11 Swaps the caster's position with that of the target entity.

EFFECT_BOOST_MAX_LIFE 12 Increases an entity's life points and maximum life points. Amplified by wisdom.

EFFECT_POISON 13 Removes life points from an entity. Amplified by magic. Reduces maximum life points by 10% of the amount removed.

EFFECT_SUMMON 14 Summons a bulb. No effect if the team's summon limit has been reached.

EFFECT_RESURRECT 15 Resurrects an entity (max life = half of its max life before resurrection, current life = a quarter of its max life before resurrection).

EFFECT_KILL 16 Removes all of an entity's life points.

EFFECT_SHACKLE_MP 17 Removes movement points from an entity. Amplified by magic.

EFFECT_SHACKLE_TP 18 Removes action points from an entity. Amplified by magic.

EFFECT_SHACKLE_STRENGTH 19 Removes strength from an entity. Amplified by magic.

EFFECT_DAMAGE_RETURN 20 Gives damage return to an entity: the entities that deal damage to it lose life points. Amplified by agility. Reduces maximum life points by 5% of the amount removed.

EFFECT_BUFF_RESISTANCE 21 Gives resistance to an entity. Amplified by science.

EFFECT_BUFF_WISDOM 22 Gives wisdom to an entity. Amplified by science.

EFFECT_ANTIDOTE 23 Removes all poisons (EFFECT_POISON) from a target.

EFFECT_SHACKLE_MAGIC 24 Removes magic from an entity. Amplified by magic.

EFFECT_AFTEREFFECT 25 Removes life points from an entity. Amplified by science. Reduces maximum life points by 5% of the amount removed.

EFFECT_VULNERABILITY 26 Removes relative shield from an entity. Not amplified. Increases the life points removed by damage by a relative amount.

EFFECT_ABSOLUTE_VULNERABILITY 27 Removes absolute shield from an entity. Not amplified. Increases the life points removed by damage by a fixed amount.

EFFECT_LIFE_DAMAGE 28 Removes life points based on a percentage of the caster's life. Interacts with shields and damage return. Reduces maximum life points by 5% of the amount removed.

EFFECT_STEAL_ABSOLUTE_SHIELD 29 Removes absolute shield (EFFECT_ABSOLUTE_SHIELD) from the target and gives it to the caster.

EFFECT_NOVA_DAMAGE 30 Removes maximum life points. Amplified by science.

EFFECT_RAW_BUFF_MP 31 Gives movement points to an entity. Cannot be amplified.

EFFECT_RAW_BUFF_TP 32 Gives action points to an entity. Cannot be amplified.

EFFECT_POISON_TO_SCIENCE 33 Gives science based on the poison damage (EFFECT_POISON) received.

EFFECT_DAMAGE_TO_ABSOLUTE_SHIELD 34 Gives absolute shield (EFFECT_ABSOLUTE_SHIELD) based on the damage received (EFFECT_DAMAGE).

EFFECT_DAMAGE_TO_STRENGTH 35 Gives strength based on the damage received (EFFECT_DAMAGE).

EFFECT_NOVA_DAMAGE_TO_MAGIC 36 Gives magic based on the nova damage (EFFECT_NOVA_DAMAGE) received.

EFFECT_RAW_ABSOLUTE_SHIELD 37 Gives absolute shield, which reduces the life points removed by damage (EFFECT_DAMAGE) by a fixed amount. Cannot be amplified.

EFFECT_RAW_BUFF_STRENGTH 38 Gives strength to an entity. Cannot be amplified.

EFFECT_RAW_BUFF_MAGIC 39 Gives magic to an entity. Cannot be amplified.

EFFECT_RAW_BUFF_SCIENCE 40 Gives science to an entity. Cannot be amplified.

EFFECT_RAW_BUFF_AGILITY 41 Gives agility to an entity. Cannot be amplified.

EFFECT_RAW_BUFF_RESISTANCE 42 Gives resistance to an entity. Cannot be amplified.

EFFECT_PROPAGATION 43 Spreads to the entities next to the target at the end of its turn.

EFFECT_RAW_BUFF_WISDOM 44 Gives wisdom to an entity. Cannot be amplified.

EFFECT_NOVA_VITALITY 45 Increases the target's max life. Amplified by science.

EFFECT_ATTRACT 46 Pulls the first entity in line onto the target cell.

EFFECT_SHACKLE_AGILITY 47 Removes agility from an entity. Amplified by magic.

EFFECT_SHACKLE_WISDOM 48 Removes wisdom from an entity. Amplified by magic.

EFFECT_REMOVE_SHACKLES 49 Removes all shackles (EFFECT_SHACKLE_*) from the target.

EFFECT_MOVED_TO_MP 50 Increases the target entity's MP each time it is moved.

EFFECT_PUSH 51 Pushes the first entity in the line onto the target cell.

EFFECT_RAW_BUFF_POWER 52 Gives power to an entity. Not amplified. Used by the Maturation chip, as well as for the power gained in Battle Royale and by killing a chest.

EFFECT_REPEL 53 Pushes the target entity back a given number of cells in a straight line.

EFFECT_RAW_RELATIVE_SHIELD 54 Gives a relative shield, which reduces the life points removed by damage (EFFECT_DAMAGE) by a relative amount. Not amplified by resistance.

EFFECT_ALLY_KILLED_TO_AGILITY 55 Gives agility to the target for each ally that dies (summons excluded).

EFFECT_KILL_TO_TP 56 Increases the target's TP for each kill it makes.

EFFECT_RAW_HEAL 57 Restores life points to an entity, up to its maximum life points. Not amplified by wisdom.

EFFECT_CRITICAL_TO_HEAL 58 Heals for each critical hit made by the target entity.

EFFECT_ADD_STATE 59 Adds a state to the target entity.

EFFECT_TOTAL_DEBUFF 60 Removes 100% (130% on a critical hit) of the target's effects.

EFFECT_STEAL_LIFE 61 Heals its target for the total of the previous effect, up to its maximum life points (with EFFECT_MODIFIER_ON_CASTER, the target is the caster, as on the Quantum Rifle).

EFFECT_MULTIPLY_STATS 62 Multiplies the target's characteristics by the value of the effect.

EFFECT_DAMAGE_TO_RESISTANCE 63 Gives resistance based on the damage received (EFFECT_DAMAGE).

EFFECT_SUPERINFECTION 64 Converts a percentage of the target's poisons (EFFECT_POISON) into immediate damage. Each poison loses a turn.

Min and max values

All effects have a minimum and a maximum value. The final value is drawn at random between the minimum and the maximum.

If you want to be sure not to overestimate the value of the effect, use the min. If you're feeling lucky, go for the max. Can't decide? An average of the min and the max will do the trick.

It's up to you to decide what value you expect to get!

The following formula lets you choose a confidence coefficient: if it is 0, final_value will be equal to effect_min; if it is 1, final_value will be equal to effect_max. Here it is 0.5, to get the average.

Don't forget that the value of the effect can be multiplied by 1.3 on a critical hit!

Duration

This is the number of turns during which the effect stays active on the target.

For one-off effects (heals, poisons, damage), a value of 0 means that the effect takes place as soon as it is cast, and a non-zero value (1 or more) makes it act at the start of the target's turn.

Affected entities

The entities affected by an effect are encoded in binary: if the bit for a category of entities is 1, that category is affected by the effect.

To test whether an entity is affected, you then use the bitwise AND operator (symbol &), which here lets you check the state of a single bit of the given number (the == and === operators can't be used: several bits can be set at the same time).

Effect Value (binary) Value (numeric) Affected entities

EFFECT_TARGET_ENEMIES 00001 1 enemies of the entity applying the effect

EFFECT_TARGET_ALLIES 00010 2 entities allied with the one applying the effect

EFFECT_TARGET_CASTER 00100 4 the entity applying the effect

EFFECT_TARGET_NON_SUMMONS 01000 8 leeks, chests, turrets and mobs (anything that isn't a bulb)

EFFECT_TARGET_SUMMONS 10000 16 bulbs

For example, if the number representing the affected entities is 14 (in binary: 01110), the effect affects allied leeks, as well as the one applying it. So bulbs and enemies won't be affected.

The following code tests whether an effect affects enemy bulbs:

Modifiers

Like affected entities, modifiers are encoded in binary. These modifiers apply to the effect to change its target or its value.

EFFECT_MODIFIER_STACKABLE 00001 1 The effect is stackable

EFFECT_MODIFIER_MULTIPLIED_BY_TARGETS 00010 2 The effect is multiplied by the number of targets hit in the area

EFFECT_MODIFIER_ON_CASTER 00100 4 Always affects the caster.

EFFECT_MODIFIER_NOT_REPLACEABLE 01000 8 Not replaceable.

EFFECT_MODIFIER_IRREDUCTIBLE 10000 16 Irreducible.

The EFFECT_MODIFIER_STACKABLE modifier indicates that the effect is stackable, meaning that an entity can have several effects of this type applied by the same weapon or chip. For example, an entity can have several poison effects cast by the same chip, but can't have two absolute shield effects from the Helmet chip. If you try to cast Helmet again on a leek that already has the Helmet effect, the original effect will be replaced by the new one. Be careful not to lose protection by using Helmet with your Puny Bulb on a leek that already has a better Helmet!

The EFFECT_MODIFIER_MULTIPLIED_BY_TARGETS modifier multiplies the base value of the effect by the number of entities in the item's AoE.

The EFFECT_MODIFIER_ON_CASTER modifier indicates that this effect always applies to the caster. For example, it is on the strength boost effect of the Broadsword, which lets you strike thin air to gain strength.

The EFFECT_MODIFIER_NOT_REPLACEABLE modifier indicates that this effect won't be replaced if the target already has it (e.g., casting The Covid-19 on a leek that is already infected won't change the value of the poison it suffers from the Covid).

The EFFECT_MODIFIER_IRREDUCTIBLE modifier indicates that the value of this effect can't be reduced (for example with Liberation).

Effects applied to entities

They describe the detailed state of an entity. You can get them with getEffects. The result is a list of effects, in the form of an array of arrays. You can also get the list of effects applied by an entity with getLaunchedEffects: for example, this can help you decide to take it out if it is a key figure on the opposing side. Each effect is made up of the following information:

Unlike the effects you get from getWeaponEffects or getChipEffects, this is an effect that has already been cast and whose value is known: no estimate needed this time.

Note: an entity can't stack the same effect from the same weapon or chip several times, unless it is explicitly stackable. For example, say you have cast Armor on yourself: if your Metallic Bulb casts the same Armor chip on you, they won't add up. However, the duration counter will be reset.

Sequence of effects

At the start of each entity's turn, in order:

1. The poisons, aftereffects and heals over time it suffers (EFFECT_POISON, EFFECT_AFTEREFFECT, EFFECT_HEAL) take effect, in the order received, and each loses 1 turn. If it drops to 0 life points, it dies. 2. The other effects it has cast lose 1 turn. 3. Its AI runs.

An effect that reaches 0 turns disappears, along with its bonuses and penalties. So a poison, aftereffect or heal over time of N turns takes effect exactly N times, while a boost of N turns disappears at the start of its caster's N-th next turn.