> cat /wizhelp/objects
========================================================================
Creating Objects
========================================================================
Objects are weapons, armor, consumables placed in /lib/objects/
BASIC TEMPLATE:
```python
# /lib/objects/weapons/my_sword.py
from lib.models.objects import Weapon
def load():
return Weapon(
name="flaming sword",
description="A sword wreathed in flames.",
damage=40,
weight=8,
value=500
)
```
REAL EXAMPLES:
Weapon (battle_sword.py):
```python
def load():
return Weapon(
name="battle sword",
damage=40,
weight=10,
value=400
)
```
Heal (objects/consumables/heals.py):
```python
class Heal(Consumable):
def __init__(self, amount):
super().__init__(
name=f"Heal [{amount}]",
heal_amount=amount,
value=amount * 2
)
```
Special (mike/poison_glob.py):
```python
class PoisonGlob(Consumable):
def __init__(self, charges=1):
self.charges = charges
self.command_name = "glob"
# ... custom poison logic
```
CLONING:
clone battle_sword
clone mike/poison_glob
clone heal_200
DIRECTORIES:
/weapons/ - Swords, axes, etc
/armor/ - Armor, rings
/consumables/- Heals, wands
/special/ - Unique items
========================================================================
>
_