# Effects

Effects are activated if all conditions have been met. You can add as many effects as you want per file.

On this page you'll get all informations you need to create your effects.

## How it works ?

This is the pattern you have to follow to create your effects :

<mark style="color:blue;">**`level`**</mark>`[`<mark style="color:orange;">**`all`**</mark>`]:`<mark style="color:yellow;">**`player`**</mark>`[`<mark style="color:red;">**`exp_mul_1+0.3*%level%`**</mark>`]`

The <mark style="color:blue;">**first**</mark> argument is the type of value that is expected inside the "\[ ]". For power orbs and enchants, this has to be **level** and for sets, it has to be **set**.

The <mark style="color:orange;">**second**</mark> argument is either the enchant level (for enchantment), orb level (for power orbs) or the amount of set parts (for sets). The parameters allowed here are **all** (verified in all cases) and numerical values (1,2,3,...). You can put here one or multiple numerical values separated by commas.

The <mark style="color:yellow;">**third**</mark> argument is either **player** (the effect will be applied to the player) or **ennemy** (the effect will be applied to the enemy).

{% hint style="danger" %}
Only triggers that deal with enemies can be receive a "**ennemy**" argument in the effects list, otherwise the effect will be ignored. As an example, the break\_block trigger cannot use "**ennemy**" argument as there's no enemy in the scope.

Triggers dealing with enemies are **hit**, **distance\_hit**, **receive\_damage**, **death**, **shield\_block**
{% endhint %}

The <mark style="color:red;">**fourth**</mark> argument is the effect. Effects won't be explained here as they will be individually in the subpages.

## Add a blocking condition

Nebula also allow you to check if the ennemy is blocking or not with a shield (must be a trigger with enemy in the scope). To do so you can add a blocking condition at the end :

`level[all]:player[exp_mul_1+0.3*%level%]#BLOCKING`

In this example, the effect will be applied only if the ennemy is blocking.

Available blocking conditions are :

**BLOCKING** : The enemy is blocking

**NON\_BLOCKING** : the enemy isn't blocking, this is the default condition, if the blocking condition is not specified, the **NON\_BLOCKING** will be applied.

**BOTH** : The effect will be activated all the time, no matter if the enemy is blocking or not

## Effects parameters

Some effects can have parameters to define the effect properties. They are separated from the effect name by underscores :&#x20;

`exp`**`_`**`mul`**`_`**`1+0.3*%level%`

Parameters will be explained for each effect in subpages.

{% hint style="danger" %}
If you need to put underscores in the effects (for example the name of a [material](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html) contains underscores), replace them with hyphens to not interfere with parameters.

***Correct example :***

*`blockdrop_transform_apple_enchanted-golden-apple`*

In this example, underscores between "**enchanted**", "**golden**" and "**apple**" keywords have been replaced by hyphens because it's one parameter.
{% endhint %}

{% hint style="info" %}
You can use `%level%` placeholder in the effects for **power orbs** and **enchants**, it will be replaced by the actual level of the enchantment / power orb. For **sets**, the keyword  that will be replaced by the amount of items is `%items%`.
{% endhint %}
