MongooseA text-based world full of questionable inventions.

All help topics · Link to this topic

Showing help on 'effects-programming-waif'

Effects: $effect
$effect:new(name, duration, ?intensity, ?source_name, ?modifiers)
Duration is seconds. Intensity defaults to 0.5; it has no enforced 1-10 range.
Templates supply modifiers and onset/expiry messages. Duration is supplied explicitly.
Use player:add_effect(effect) to apply and schedule expiry.
Fields: name, duration, remaining, intensity, source_name, target, modifiers.
::is_expired() checks remaining <= 0.
No source or disbanded field; use source_name.
Expiry uses elapsed time and $physics events. No global ticker.
Call player:settle_effects() before reading remaining time.
Ordinary same-name effects keep maximum remaining time and intensity.
THC doses add intensity; remaining time refreshes to the longer duration.
Set template dose_response to linear for additive dosage.
THC: calm +3*dose; wit 1-0.15*dose; speed 1-0.10*dose.
Linear dosage has no tolerance, cap, or diminishing returns.
After merging, read the resulting waif from player.active_effects.