1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-02 17:27:23 -04:00
OpenDiablo2/d2core/d2stats/stat_list.go
lord c114ab9eb7
add interfaces for stats, added diablo 2 implementation (#614)
* add interface for stats, d2 is an implementation

* fix incorrect comment, remove ennecessary int

* simplified description functions, remove duplicates

* moved default stringer functions

* fixed incorrect stat combine method

* change `Create` to `New` in method names
2020-07-23 19:03:58 -04:00

17 lines
411 B
Go

package d2stats
// StatList is useful for reducing stats.
// They provide a context for stats to alter other stats or infer values
// during stat assignment/calculation
type StatList interface {
Index(idx int) Stat
Stats() []Stat
SetStats([]Stat) StatList
Clone() StatList
ReduceStats() StatList
RemoveStatAtIndex(idx int) Stat
AppendStatList(other StatList) StatList
Pop() Stat
Push(Stat) StatList
}