aboutsummaryrefslogtreecommitdiff
path: root/internal/game/action_talk.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-18 20:26:03 -0400
committerhistoria <[not public]>2026-06-18 20:26:03 -0400
commit97a1a908b9e6e6d3516628c139c9b64262b4fe08 (patch)
treed82953974edbfb4051dff1a48f1b264b9c264d28 /internal/game/action_talk.go
parent17e7725f252c7f5d3be2e9c37d62751c631f196f (diff)
downloadthehouseoficarus-97a1a908b9e6e6d3516628c139c9b64262b4fe08.tar.gz
feat: crafting roughly implemented (leather, gems, gold, clay, spinning).
Diffstat (limited to 'internal/game/action_talk.go')
-rw-r--r--internal/game/action_talk.go6
1 files changed, 6 insertions, 0 deletions
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)
+ }
+ }
}