From 3a58125d14bb307f861b38c6c5b0a63babde7e08 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 19 Jun 2026 13:28:06 -0400 Subject: feat: all skills kind of implemented, random prototype content added --- internal/game/cmd_eat.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'internal/game/cmd_eat.go') diff --git a/internal/game/cmd_eat.go b/internal/game/cmd_eat.go index 6a74979..e6a0386 100644 --- a/internal/game/cmd_eat.go +++ b/internal/game/cmd_eat.go @@ -111,6 +111,22 @@ func (g *Game) processConsumeQueue(p *player.Player, sess *net.Session) bool { itemID := qc.Args def, err := g.ItemStore.Load(itemID) + + if qc.Command == "drink" { + if err != nil || (def.PotionEffect == "" && def.HealValue <= 0) { + return false + } + if p.ConsumeCooldown > 0 { + return false + } + if !p.HasItem(itemID) { + sess.WriteLine("You no longer have that to drink.") + return false + } + g.applyPotion(sess, p, itemID, def) + return true + } + if err != nil || def.EatMessage == "" { return false } -- cgit v1.2.3