Refactor the D&D spells module to apply deterministic fields where appropriate
This commit is contained in:
@@ -40,6 +40,10 @@ func (ref UnitRef) String() string {
|
||||
return strconv.Itoa(ref.value)
|
||||
}
|
||||
|
||||
func (ref UnitRef) Int() int {
|
||||
return ref.value
|
||||
}
|
||||
|
||||
func (ref *UnitRef) UnmarshalJSON(raw []byte) error {
|
||||
raw = bytes.TrimSpace(raw)
|
||||
if len(raw) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user