### Effects

Versatile recursively-defined effects affecting the game world. They are defined as nested, parametrized blocks. Some of them affect children (meta-effets), other cause a direct effect, e.g. damage (base effects). For example:

      <effect type="list">
        <effect type="timed">
          <time value="3.0" />
          <effect type="modify">
            <mod-aspect value="speed" />
            <amount value="2.0" />
          </effect>
        </effect>
        <effect type="graphical-effect">
          <time value="3.0" />
          <namevalue="trail" />
        </effect>
        <effect type="particle">
          <time value="0.8" />
          <particle value="shield" />
        </effect>
        <effect type="chance">
       	  <chance value="0.8" />
       	  <effect type="recastable">
       	    <recast value="1.0" />
       	    <time value="5.0" />
            <effect type="heal">
              <amount value="0.1" />
            </effect>
          </effect>
        </effect>
      </effect>

As you can see, there's one common effect format `<effect type="[...]">[parameters]</effect>`. The type is one of these listed below and parameters depend only on effect's type. The parameter's order doesn't matter. Parameters are mostly simple objects that look like `<name value="[...]" />`, but in some cases there's one (when using a meta-effect), or more (only `list`) sub-effects.

#### Base effects

- `damage` - parameters: aspect (string), amount. Deals damage.
- `heal` - parameters: aspect (string), amount, [show-amount (empty)]. Heals self.
- `modify` - parameters: aspect (string), amount, mod-aspect (string). Modifies one target's aspect.
- `AIState` - parameters: TODO?
- `restore-mana` - parameters: aspect (string), amount. Restores caster's mana.
- `drain-mana` - parameters: aspect (string), amount. Drains target's mana.
- `console` - parameters: text (string). Executes a console command.
- `bullet` - parameters: bullet emitter
- `stun` - parameters: none. If not used under `timed` meta-effect, duration defaults to 1 second.
- `graphical-effect` - parameters: time, name (string). Displays a graphical effect.
- `noEffect` - parameters: none. Does nothing, I don't know what is it for.
- `linked-graphical-effect` - parameters: time, name (string). Displays a graphical effect from the source to the victim, only on which works is "lightning".
- `knockback` - parameters: amount. Depends on the mass of an actor being knockbacked, but usually the value less than 2 is enough :)
- `jump` - parameters: TODO?
- `summon` - parameters: summoner
- `inject` - parameters: TODO?
- `transfer-life` - parameters: amount. Hurts mosters, heals caster.
- `transfer-mana` - parameters: amount. Like above, affects mana instead of health.
- `annihilate` - parameters: TODO?
- `increase-next-ability-level` - parameters: amount. Increases the effective level of next used ability.
- `heal-target` - parameters: amount. Heals target.

#### Meta-effects

- `timed` - parameters: time (float), sub-effect.
  Effect stops after a given amount of time. Not all effects work with this, e.g. sub-effect `time` doesn't. There is something called "default recast" of an effect - for life/mana gain it's 0 (fluently), for state changes +INF (only once), for the rest 1s (for example, with effect `bullet` bullets are spawned every second).
- `recastable` - parameters: time (float), recast (float), sub-effect.
  Works just like `timed`, but here you can change the "default recast time".
- `area` - parameters: area (float), filter (string), sub-effect.
  `area` is the area radius, and `filter` tells, which objects should be affected by sub-effect.
- `chance` - parameters: chance (float, 0 to 1). Effect will be executed with given probability - 0 means "never" and 1 "always".
- `list` - parameters: sub-effect, sub-effect2, [...].
  The only way to join effects into a group, two sub-effects won't work where there's only one expected.
- `delayed` - parameters: time (float), sub-effect.
  Delays the sub-effect's execution.
- `retarget` - parameters: target-chooser, sub-effect.
  Auto-targets the sub-effect.
- `non-cumulative` - parameters: sub-effect.
  Works only with `timed` or `recastable` effects, prevents the sub-effect from being cumulated.
- `check-level` - parameters: amount, sub-effect.
  Checks if the ability level is high enough. If not, sub-effect won't be executed.

#### Parameters

- `amount & all other float parameters` - can pass the exact value by `value` or calculate the formula from `calc`.
- `text` - can be either `<text>command</text>` for a single command or

      <text>[
        command1
        command2
        ...
      ]</text>

  for a block of commands. Notice the square brackets around the command block!
- `summoner` - defined as follows:

      <summoner>
        <ttl value="20"/>
        <min-radius value="1"/>
        <count value="2"/>
        <template value="data/physicals/healer-ghost.xml"/>
      </summoner>

  `ttl, min-radius, count` are float parameters, so they can be also used with `calc` instead of `value`.
  - `ttl` - the amount of time, after which the summons will die.
  - `min-radius` - describes the circle around the summoner, in which summoned creatures shouldn't spawn.
  - `count` - how many summons will be spawned?
  - `template` - summon's template file.
- `target-chooser` - defined as follows:

      <target-chooser>
        <filter value="hostiles"/>
        <range value="5.0" />
        <angle value="90"/>
        <aim-at-ground value="1"/>
      </target-chooser>

  `range` can be also used with `calc` instead of `value`.
  - `filter` - which type of targets should be choosed.
  - `range` - the maximum distance from the chosen target and the caster.
  - `angle` - cuts down the angle to prevent shooting back (degrees).
  - `aim-at-ground` - TODO?