Effects

Effects can occur:

Types of Effects

All Concrete Effects inherit from EffectBase:

diagram

EffectBase

Base class for effects.

Every effect has the field "Target" and this is an extremely complex field to understand as it depends on the context that the effect is being used in AND on the concrete type of effect.

EffectApplyBuff

Applies a buff. BuffCount field: If the buffCount field is greater than 1 then it will this many times try to apply one stack of the buff. Resulting in the logic that the buff is applied up to the maxStacks count and only applications beyond the maximum will fail.

Target: Point is invalid here.

EffectCreateUnit

Creates a Unit. If the unit is an item (the item field of the unit is not empty) the target flag is considered. If the target flag is:

  • Caster: the item is created in the inventory of the casting unit.

  • Target: this is invalid in this case and gets considered Point.

  • Point: creates the item at a point. (For this to work, the effect must be on a target ability).

If the unit is not an item:

  • Caster: the unit is created besides the caster.

  • Target: invalid ⇒ Point

  • Point: creates the unit at a point.

EffectCreateItem

Creates an item inside the inventory of the casting unit. This means that the target of create item effects is always the caster. Items created in this way can never be dropped in the world as they have no unit linked.

EffectDamage

Applies Damage.

EffectHeal

Applies healing.

EffectModifyUnit

Modifies a Unit

EffectSet

This contains a List of Effects. The effects in the List are executed in the order in which they appear in the List.

EffectCreatePersistent

Has

  • Period Count

  • Period Durations

  • Period Effects

Period Durations and Effects are treated as sequences that start over at the beginning when they have reached their end. This means that it is enough to only give one duration and one effect.

Period Count is initialized with 1. The first Effect plays immediately. Then it waits for the first period duration. Then sets the count to 2 and executes the second effect.

EffectSearchArea

Search Area Effects search an Area for units to apply their effect. When selecting a valid target, they FIRST check their Search Filter and SECOND their Validators

EffectTransferItem