NIP parser v2 (#17)

This commit is contained in:
Héctor Giménez
2024-05-05 12:15:08 +09:00
committed by GitHub
parent 0d5c108721
commit bb0ec2555d
28 changed files with 56618 additions and 1385 deletions

26
pkg/data/item/item.go Normal file
View File

@@ -0,0 +1,26 @@
package item
type Description struct {
ID int
Name string
Code string
NormalCode string // Normal
UberCode string // Exceptional
UltraCode string // Elite
InventoryWidth int
InventoryHeight int
MinDefense int
MaxDefense int
}
func (d Description) Tier() Tier {
if d.Code == d.UltraCode {
return TierElite
}
if d.Code == d.UberCode {
return TierExceptional
}
return TierNormal
}