diff options
Diffstat (limited to 'internal/game/utils.go')
| -rw-r--r-- | internal/game/utils.go | 13 |
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 { |
