aboutsummaryrefslogtreecommitdiff
path: root/internal/game/utils.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-19 02:08:55 -0400
committerhistoria <[not public]>2026-06-19 02:08:55 -0400
commit458916fb78dcef3ff77cb29b7ba98d9f646819fc (patch)
tree19cd8b8eef41a1aa00d155bf7953ad2770f91a4c /internal/game/utils.go
parent97a1a908b9e6e6d3516628c139c9b64262b4fe08 (diff)
downloadthehouseoficarus-458916fb78dcef3ff77cb29b7ba98d9f646819fc.tar.gz
feat: rough pharmacy skill added
Diffstat (limited to 'internal/game/utils.go')
-rw-r--r--internal/game/utils.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/internal/game/utils.go b/internal/game/utils.go
index 55e48c6..6a294c5 100644
--- a/internal/game/utils.go
+++ b/internal/game/utils.go
@@ -45,7 +45,18 @@ func mobDisplayName(m *world.MobInstance, definite bool) string {
}
func mobCombatLevel(m *world.MobInstance) int {
- return int(0.25*float64(m.Attack+m.Strength+m.Defense+m.MaxHP) + 0.5)
+ base := float64(m.Defense+m.MaxHP) / 4.0
+ melee := float64(m.Attack+m.Strength) / 4.0
+ ranged := float64(m.Ranged) * 3.0 / 8.0
+ science := float64(m.Science) * 3.0 / 8.0
+ best := melee
+ if ranged > best {
+ best = ranged
+ }
+ if science > best {
+ best = science
+ }
+ return int(base + best + 0.5)
}
func uniqueItemNames(matches []itemMatch) []string {