feat: entity definitions — player classes, monsters, items
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
36
entity/item.go
Normal file
36
entity/item.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package entity
|
||||
|
||||
type ItemType int
|
||||
|
||||
const (
|
||||
ItemWeapon ItemType = iota
|
||||
ItemArmor
|
||||
ItemConsumable
|
||||
)
|
||||
|
||||
type Item struct {
|
||||
Name string
|
||||
Type ItemType
|
||||
Bonus int
|
||||
Price int
|
||||
}
|
||||
|
||||
type RelicEffect int
|
||||
|
||||
const (
|
||||
RelicHealOnKill RelicEffect = iota
|
||||
RelicATKBoost
|
||||
RelicDEFBoost
|
||||
RelicGoldBoost
|
||||
)
|
||||
|
||||
type Relic struct {
|
||||
Name string
|
||||
Effect RelicEffect
|
||||
Value int
|
||||
Price int
|
||||
}
|
||||
|
||||
func NewHPPotion() Item {
|
||||
return Item{Name: "HP Potion", Type: ItemConsumable, Bonus: 30, Price: 20}
|
||||
}
|
||||
Reference in New Issue
Block a user