Add ranged combat area effects and admin-authored mobs

This commit is contained in:
dingo
2026-09-09 05:26:31 -04:00
parent 7a4c6c9e9b
commit 0b4eaa153c
29 changed files with 2220 additions and 181 deletions
+5
View File
@@ -89,6 +89,8 @@ func (w *World) RefreshStats(c *Character) {
w.revalidateEquipment(c)
c.View.Stats = w.statValues(c, true)
w.refreshGathering(c)
attack := w.playerAttack(c)
c.View.Attack = &attack
c.View.Entity.MaxHP = c.View.Stats["healthPoints"].Final
c.View.Entity.HP = math.Min(c.View.Entity.HP, c.View.Entity.MaxHP)
c.View.Mana = math.Max(0, math.Min(c.View.Mana, c.View.Stats["manaPoints"].Final))
@@ -166,6 +168,9 @@ func (w *World) ApplyCatalog(catalog content.Catalog) error {
w.Balance.Gathering = catalog.Gathering
w.terrain.B.Gathering = catalog.Gathering
}
if catalog.Combat != nil {
w.Balance.Combat = catalog.Combat
}
w.Balance.Titles = catalog.Titles
w.Balance.Items = catalog.Items
w.Balance.Stats = &catalog.Stats