Module vassals

Source
Expand description

Vassal behaviors: task/link reward stubs, task loyalty, and link loyalty decay.

Structs§

LoyaltyDecreaseCtx
Inputs for the vassal-link loyalty decay (code-dispatched).
VassalLoyaltyCtx
Inputs for the vassal-task loyalty slot (loyalty_fn config field).
VassalRewardCtx
Inputs for a vassal/suzerain reward fn (reward_fn config slots).

Functions§

loyalty_decrease_const_7
The shipped loyalty decay: a flat 7 per tick, ignoring elapsed time.
register
Register this module’s config-dispatched behaviors.
suzerain_reward_const
test_vassal_link_reward_42
Test suzerain/vassal link reward: a flat 42 of the soft currency.
test_vassal_task_loyalty_0_42
Test loyalty fn (template 05e915bf): good → 0, bad → 42.
test_vassal_task_loyalty_42_32
Test loyalty fn (template 7b4a7bf5): good → 42, bad → 32.
test_vassal_task_reward_0_42
Test vassal-task reward (template 05e915bf): good → 0, bad → 42.
test_vassal_task_reward_42_32
Test vassal-task reward (template 7b4a7bf5): good → 42, bad → 32.
vassal_reward_const
vassal_task_loyalty_const
The shipped vassal-task loyalty: a flat 10, regardless of outcome.
vassal_task_reward_const
Reward slots are stubs: no reward is currently granted. Kept as three distinct named fns (one per config slot) so a future real reward on any one slot can replace just that fn.

Type Aliases§

LoyaltyDecreaseFn
Signature of a loyalty-decay fn (i64 decrease per tick).
VassalLoyaltyFn
Signature of a vassal-task loyalty fn (i64 loyalty amount).
VassalRewardFn
Signature of a vassal/suzerain reward fn.