mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-17 01:51:14 -05:00
c114ab9eb7
* 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
15 lines
372 B
Go
15 lines
372 B
Go
package d2stats
|
|
|
|
// Stat a generic interface for a stat. It is something which can be
|
|
// combined with other stats, holds one or more values, and handles the
|
|
// way that it is printed as a string
|
|
type Stat interface {
|
|
Name() string
|
|
Clone() Stat
|
|
Copy(Stat) Stat
|
|
Combine(Stat) (combined Stat, err error)
|
|
String() string
|
|
Values() []StatValue
|
|
SetValues(...StatValue)
|
|
}
|