aboutsummaryrefslogtreecommitdiff
path: root/internal/game/equip_stats.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/equip_stats.go')
-rw-r--r--internal/game/equip_stats.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/game/equip_stats.go b/internal/game/equip_stats.go
index 559671f..02b8348 100644
--- a/internal/game/equip_stats.go
+++ b/internal/game/equip_stats.go
@@ -29,3 +29,13 @@ func (g *Game) playerEquipBonuses(p *player.Player) object.ItemStats {
}
return totals
}
+
+func (g *Game) playerWeaponSpeed(p *player.Player) float64 {
+ if itemID, ok := p.Equipment[object.SlotMainHand]; ok {
+ def, err := g.ItemStore.Load(itemID)
+ if err == nil && def.Speed > 0 {
+ return def.Speed
+ }
+ }
+ return 5.0
+}