-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Currently stats are structure properties. This makes it hard to change or add new stats.
- Refactor
character.Statsinto a custom type ofmap[string]stats.StatInfo - Create
character.Stats.Get("strength")- Should return
0(zero) if stat does not exist. - Consider a stat definition
datafilethat can define supported stats and their behaviors such as:- Min/Max ranges, including negative numbers
- Whether value returned by
Get()is calculated logarithmically or linearly.
- Should return
- Create
character.Stats.Set("strength", 1)- This will overwrite and set the value of the stat to this value.
- Create
character.Stats.Modify("strength", 2)- This will adjust the stat by the provided int
Metadata
Metadata
Assignees
Labels
No labels