aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_eat.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-19 13:28:06 -0400
committerhistoria <[not public]>2026-06-19 13:28:06 -0400
commit3a58125d14bb307f861b38c6c5b0a63babde7e08 (patch)
treebd89e866447d55e6dffd447d8ef5fabf9b8fbe9d /internal/game/cmd_eat.go
parent575a71dcfed3b9fa44af244836f638a23df05a9a (diff)
downloadthehouseoficarus-3a58125d14bb307f861b38c6c5b0a63babde7e08.tar.gz
feat: all skills kind of implemented, random prototype content added
Diffstat (limited to 'internal/game/cmd_eat.go')
-rw-r--r--internal/game/cmd_eat.go16
1 files changed, 16 insertions, 0 deletions
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
}