Expand description
script ports (behaviors::cast_ability / cast_projectile).
ones push add_entity_stat_mod(owner, stat, value), which the engine lowers
to add_entity_attr(owner, "{stat}.mod", value) → an EntityIncrAttribute
those reactions here, keyed by effect code (stable across ids):
| code | on_apply |
|---|---|
empower | add_entity_stat_mod(attack, +5000) |
weakness | add_entity_stat_mod(attack, -5000) |
protection | add_entity_stat_mod(received_damage, -5000) |
vulnerability | add_entity_stat_mod(received_damage, +5000) |
test_effect / stun / shield | print(...) — no events |
| (others) | no on_apply at all — no events |
on_change is only dispatched by remove_entity_effect (with
new_stacks = 0, old_stacks = current). That path is currently reached
from a behaviors native script — so the native on_change is, in
practice, not exercised today. It is nonetheless ported faithfully below
(rather than left a no-op) so that any future native caller stays
|—————|——————————————————|
| empower | add_entity_stat_mod(attack, (new-old)*500) |
| weakness | add_entity_stat_mod(attack, (new-old)*-500) |
| vulnerability| add_entity_stat_mod(received_damage, (new-old)*500)|
| protection | add_entity_stat_mod(received_damage, -5000) (flat) |
| (others) | no on_change — no events |
If a new effect with an event-producing reaction ships, extend the matches below.
Structs§
- Overlord
Effect Cb - Native effect-callback dispatcher keyed by effect code. Stateless.