def Rewards.add_gold

gralha-bendquest@0.1.0.0 · rewards.bend:151

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

151def Rewards.add_gold(hero: G.Bq.Hero, amount: U32) -> G.Bq.Hero:
152  match hero:
153    case G.Bq.Hero.Hero{inv, wea, arm, hel, charm, gold, level, strength, agility, vitality, points}:
154      G.Bq.Hero.Hero{inv, wea, arm, hel, charm, G.Bq.Nat.add(U32.to_nat(amount), gold), level, strength, agility, vitality, points}

Uses (4)

Used by (2)