Added ScrollOfLightning as an example. Not finished yet, confusion & fireball are still in part 9.
56 lines
1.3 KiB
Python
56 lines
1.3 KiB
Python
from entity import Entity
|
|
from ai import BaseAI, AggressiveWhenSeen
|
|
from stats import Stats
|
|
from inventory import Inventory
|
|
import useable
|
|
import colors
|
|
|
|
#player and utils
|
|
player = Entity(
|
|
char = "@",
|
|
color = colors.white,
|
|
name = "Player",
|
|
walkable = False,
|
|
ai_class = BaseAI, #TODO: remove this or dummy it out
|
|
stats = Stats(hp = 10, attack = 2, defense = 1),
|
|
inventory=Inventory(),
|
|
)
|
|
|
|
#monsters - gobbos
|
|
gobbo = Entity(
|
|
char = "g",
|
|
color = colors.lime,
|
|
name = "Gobbo",
|
|
walkable = False,
|
|
ai_class = AggressiveWhenSeen,
|
|
stats = Stats(hp = 5, attack = 1, defense = 0),
|
|
)
|
|
|
|
gobbo_red = Entity(
|
|
char = "g",
|
|
color = colors.red,
|
|
name = "Red Gobbo",
|
|
walkable = False,
|
|
ai_class = AggressiveWhenSeen,
|
|
stats = Stats(hp = 1, attack = 2, defense = 0), #this guy can't catch a break
|
|
)
|
|
|
|
#items - conumables
|
|
potion_of_healing = Entity(
|
|
char = "!",
|
|
color = colors.deep_sky_blue,
|
|
name = "Potion of Healing",
|
|
walkable = True,
|
|
useable=useable.PotionOfHealing(consumable=True, current_stack=1, maximum_stack=255),
|
|
)
|
|
|
|
scroll_of_lightning = Entity(
|
|
char = "!",
|
|
color = colors.goldenrod,
|
|
name = "Scroll of Lightning",
|
|
walkable = True,
|
|
useable=useable.ScrollOfLightning(consumable=True, current_stack=1, maximum_stack=255, minimum_range=0, maximum_range=6),
|
|
)
|
|
|
|
#TODO: scroll of confusion, using "confused AI"
|
|
#TODO: scroll of fireball, dealing AOE damage |