From 97a1a908b9e6e6d3516628c139c9b64262b4fe08 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 18 Jun 2026 20:26:03 -0400 Subject: feat: crafting roughly implemented (leather, gems, gold, clay, spinning). --- internal/game/action_talk.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'internal/game/action_talk.go') diff --git a/internal/game/action_talk.go b/internal/game/action_talk.go index 30bf206..2d4a814 100644 --- a/internal/game/action_talk.go +++ b/internal/game/action_talk.go @@ -210,4 +210,10 @@ func (g *Game) applyNodeAction(sess *net.Session, na *action.NodeAction) { g.AccountStore.SaveCharacter(p) sess.WriteLine(fmt.Sprintf("You regain %d hitpoints.", na.Heal)) } + if na.Cost > 0 { + if p.Credits >= na.Cost { + p.Credits -= na.Cost + g.AccountStore.SaveCharacter(p) + } + } } -- cgit v1.2.3