def Health.maximum_word

gralha-bendquest@0.1.0.0 · health.bend:494

import gralha-bendquest@0.1.0.0/health.bend as Health
import Base

494# Add the charm bonus before conversion. The server supplies U32 maximum
495# as the ceiling; keeping it explicit makes the theorem apply to any ceiling.
496def Health.maximum_word(+raw: Nat, bonus: U32, ceiling: U32) -> U32:
497  Health.cap_nat_word(Nat.add(U32.to_nat(bonus), raw), ceiling)

Uses (5)

Used by (2)