Skip to main content

Module onkill

Module onkill 

Source
Expand description

A kill pays (spec-0074): what happens each time a body of a fight is killed.

on_kill is an optional property of waves[] and actors[] — one type on both. Its effects run once per body a player is credited with killing (vanilla’s minecraft:player_killed_entity), as that player, so a player-scoped datum pays the killer and a party-scoped one pays the party once. It is effect root R9 (crate::EffectRootKind::OnKill).

fires is the creator’s judgement on whether a body that comes back pays again. It is required exactly where the fight comes back after the party has met it (DW0915) and refused as inert where it does not (DW0914); both refusals read one compiler-side predicate (plan::fight_comes_back), which needs the campaign’s rest points.

This module holds the types (OnKill, KillFires) and the two refusals that need only the documents:

  • DW0100 — an empty effects list (the exported schema’s minItems: 1, which serde does not enforce);
  • DW0913 — a bundle on a body no player can be credited with killing: a wave no beat spawns (crate::fight::wave_area is None), or an actor no unleash-actor names that is not vulnerable (crate::fight::unleashed_actors).

Structs§

OnKill
What happens each time a body of this fight is killed (spec-0074): the on_kill of a wave or an actor.

Enums§

KillFires
Whether a body that comes back after a rest pays again (spec-0074 §4).

Functions§

on_kill_checks
The document-tier on_kill refusals (spec-0074 §8.1): DW0100 for an empty effects list and DW0913 for a bundle no credited kill can ever reach. A campaign that declares no bundle gets nothing.