Add terrain biomes jumping and extensible gathering professions
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
func protocolModifiers(in []content.StatModifier) []p.StatModifier {
|
||||
out := make([]p.StatModifier, 0, len(in))
|
||||
for _, m := range in {
|
||||
out = append(out, p.StatModifier{Stat: m.Stat, Flat: m.Flat, Percent: m.Percent})
|
||||
out = append(out, p.StatModifier{Skill: stringPtr(m.Skill), Stat: m.Stat, Flat: m.Flat, Percent: m.Percent})
|
||||
}
|
||||
return out
|
||||
}
|
||||
@@ -88,6 +88,7 @@ func (w *World) RefreshStats(c *Character) {
|
||||
}
|
||||
w.revalidateEquipment(c)
|
||||
c.View.Stats = w.statValues(c, true)
|
||||
w.refreshGathering(c)
|
||||
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))
|
||||
@@ -161,6 +162,10 @@ func (w *World) ApplyCatalog(catalog content.Catalog) error {
|
||||
if err := catalog.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
if catalog.Gathering != nil {
|
||||
w.Balance.Gathering = catalog.Gathering
|
||||
w.terrain.B.Gathering = catalog.Gathering
|
||||
}
|
||||
w.Balance.Titles = catalog.Titles
|
||||
w.Balance.Items = catalog.Items
|
||||
w.Balance.Stats = &catalog.Stats
|
||||
|
||||
Reference in New Issue
Block a user