You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
328 B
Go
16 lines
328 B
Go
package game
|
|
|
|
import "github.com/denisovdennis/autohero/internal/model"
|
|
|
|
// TownEffectiveLevel is the reference level for shop gear ilvl / quest bands (mid of town bracket).
|
|
func TownEffectiveLevel(t *model.Town) int {
|
|
if t == nil {
|
|
return 1
|
|
}
|
|
mid := (t.LevelMin + t.LevelMax) / 2
|
|
if mid < 1 {
|
|
return 1
|
|
}
|
|
return mid
|
|
}
|