aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_attack.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/cmd_attack.go
parent17e7725f252c7f5d3be2e9c37d62751c631f196f (diff)
downloadthehouseoficarus-97a1a908b9e6e6d3516628c139c9b64262b4fe08.tar.gz
feat: crafting roughly implemented (leather, gems, gold, clay, spinning).
Diffstat (limited to 'internal/game/cmd_attack.go')
-rw-r--r--internal/game/cmd_attack.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/game/cmd_attack.go b/internal/game/cmd_attack.go
index 51ac54a..4c6941a 100644
--- a/internal/game/cmd_attack.go
+++ b/internal/game/cmd_attack.go
@@ -332,7 +332,8 @@ func (g *Game) endCombat(sess *net.Session, p *player.Player, mob *world.MobInst
if !mob.Unique {
dropper = "The " + mob.Name
}
- sess.WriteLine(g.colorize(sess, "drop_message", fmt.Sprintf(" %s drops: %s", dropper, name)))
+ coloredName := g.itemColorize(sess, def, name)
+ sess.WriteLine(fmt.Sprintf(" %s %s", g.colorize(sess, "drop_message", dropper+" drops:"), coloredName))
}
if len(mob.Drops.Loot) > 0 {
@@ -352,10 +353,11 @@ func (g *Game) endCombat(sess *net.Session, p *player.Player, mob *world.MobInst
if !mob.Unique {
dropper = "The " + mob.Name
}
+ coloredName := g.itemColorize(sess, def, name)
if qty > 1 {
- sess.WriteLine(g.colorize(sess, "drop_message", fmt.Sprintf(" %s drops: %d x %s", dropper, qty, name)))
+ sess.WriteLine(fmt.Sprintf(" %s %d x %s", g.colorize(sess, "drop_message", dropper+" drops:"), qty, coloredName))
} else {
- sess.WriteLine(g.colorize(sess, "drop_message", fmt.Sprintf(" %s drops: %s", dropper, name)))
+ sess.WriteLine(fmt.Sprintf(" %s %s", g.colorize(sess, "drop_message", dropper+" drops:"), coloredName))
}
}
}