law Rewards.gain_health

gralha-bendquest@0.1.0.0 · rewards.bend:101

import gralha-bendquest@0.1.0.0/rewards.bend as Rewards
import Base
import gralha-bendquest@0.1.0.0/game.bend as G

101law Rewards.gain_health:
102  for +hero: G.Bq.Hero
103  for +xp: U32
104  for +gained: U32
105  for +hp: U32
106  for +ceiling: U32
107  for +valid: {G.Bq.Nat.le(U32.to_nat(hp), U32.to_nat(Rewards.maximum(hero, ceiling))) == True{} : Bool}
108  {G.Bq.Nat.le(U32.to_nat(hp), U32.to_nat(Rewards.maximum(Rewards.hero(Rewards.gain(hero, xp, gained)), ceiling))) == True{} : Bool}

Uses (11)

Used by (0)

No other definition uses this definition.