aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_attack.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-21 03:46:25 -0400
committerhistoria <[not public]>2026-06-21 03:46:25 -0400
commit84072ffe6365ad57c4976e9272762aa6db41de7e (patch)
treed911389fd91e129871c23ec539e67a2666d9f78a /internal/game/cmd_attack.go
parente4bc2de6e6aa507044a6a75b4c1954974539a857 (diff)
downloadthehouseoficarus-84072ffe6365ad57c4976e9272762aa6db41de7e.tar.gz
feat: better score output
Diffstat (limited to 'internal/game/cmd_attack.go')
-rw-r--r--internal/game/cmd_attack.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/game/cmd_attack.go b/internal/game/cmd_attack.go
index 1ede21f..703b9ac 100644
--- a/internal/game/cmd_attack.go
+++ b/internal/game/cmd_attack.go
@@ -539,6 +539,7 @@ func (g *Game) endCombat(sess *net.Session, p *player.Player, mob *world.MobInst
}
}
p.DeactivateAllTechs()
+ p.Stats.RecordDeath()
sess.WriteLine(g.colorize(sess, "death", "\nOh dear, you are dead!"))
p.ClearMoveState()
g.dropItemsOnDeath(p)
@@ -554,6 +555,7 @@ func (g *Game) endCombat(sess *net.Session, p *player.Player, mob *world.MobInst
}
if mob != nil && mob.HP <= 0 {
+ p.Stats.RecordMobKill(mob.DefID)
sess.WriteLine(g.colorize(sess, "victory", fmt.Sprintf("\nYou have defeated %s!", mobDisplayName(mob, true))))
g.onAssassinKill(sess, p, mob)