world.effect

applicable?

multimethod

defsystem [_]

An effect will only be done (with tx/do!) if this function returns truthy. Required system for every effect, no default.

check-update-ctx

(check-update-ctx {:keys [effect/source effect/target], :as ctx})

Call this on effect-context if the time of using the context is not the time when context was built.

effect-applicable?

(effect-applicable? effect)

effect-useful?

(effect-useful? effect)

npc-ctx

(npc-ctx eid)

player-ctx

(player-ctx eid)

render!

multimethod

defsystem [_]

Renders effect during active-skill state while active till done?. Default do nothing.

source

dynamic

target

dynamic

target-direction

dynamic

target-position

dynamic

useful?

multimethod

defsystem [_]

Used for NPC AI. Called only if applicable? is truthy. For example use for healing effect is only useful if hitpoints is < max. Default method returns true.

with-ctx

macro

(with-ctx ctx & body)