diff options
Diffstat (limited to 'utils/types/objects.go')
-rw-r--r-- | utils/types/objects.go | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/utils/types/objects.go b/utils/types/objects.go new file mode 100644 index 0000000..a2fd941 --- /dev/null +++ b/utils/types/objects.go @@ -0,0 +1,58 @@ +package types + +func InitObjects() { + WEAPON_OLD_FAMILY_SWORD := Weapon{ + name: "Mjorrsword", + atk: 10, + meta: WeaponMetadata{ + info: "The Mjorrsword is an old sword, a legacy in your family. \nLast used in the Fjolrholmer Revolution, it is now yours to hold on to.", + } + } +} + +type Inventory struct { + weapons []Weapon + foods []Food + potions []Potion +} +type Player struct { + name string + inventory Inventory + effects []Effect + wallet []Currency +} + +type WeaponMetadata struct { + info string +} + +type Weapon struct { + name string + atk int + meta WeaponMetadata +} + +type Food struct { + name string + regen_health int +} +type Effect struct { + name string + effect func(p *Player) +} + +type Potion struct { + name string + effect Effect +} + +type Currency struct { + name string + prefix string + value int + amount int +} + +type Consumable interface { + Food | Potion +} |