1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-26 00:55:23 +00:00
OpenDiablo2/d2core/d2stats
lord 9e61079e93
Stats refactor (#617)
* 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

* d2stats + diablo2stats refactored again

- simplified `NewStat` provider function
- added initializer for stat values that sets the stringer functions, value types, and combination types for values when created
- removed redundant description functions
- added stat value combination types `sum` and `static`

`static` stat values which are not altered when stats are combined. this makes sense for stats like proc-on-hit or +skills to class

example:
	Stat A: `10% reanimate as: skeleton mage`
	Stat B: `8% reanimate as: skeleton archer`
	Stat C: `6% reanimate as: skeleton archer`

	A and B can not be combined
	B and C can be combined to `14% reanimate as: skeleton archer`
2020-07-23 22:12:48 -04:00
..
diablo2stats Stats refactor (#617) 2020-07-23 22:12:48 -04:00
doc.go Stat descriptions + tests, Skilldesc.txt loader (#590) 2020-07-17 18:50:45 -04:00
stat_list.go add interfaces for stats, added diablo 2 implementation (#614) 2020-07-23 19:03:58 -04:00
stat_value.go Stats refactor (#617) 2020-07-23 22:12:48 -04:00
stat.go add interfaces for stats, added diablo 2 implementation (#614) 2020-07-23 19:03:58 -04:00