1
0
python-roguelike/entity_factories.py

89 lines
2.0 KiB
Python
Raw Normal View History

2022-01-10 13:21:17 -05:00
from components.ai import HostileEnemy
from components import consumable, equippable
2022-01-10 13:21:17 -05:00
from components.fighter import Fighter
from components.inventory import Inventory
2022-01-25 15:51:59 -05:00
from components.level import Level
from entity import Actor, Item
2022-01-07 15:52:53 -05:00
2022-01-10 13:21:17 -05:00
player = Actor(
2022-01-07 15:52:53 -05:00
char="@",
color=(255, 255, 255),
2022-01-18 14:57:45 -05:00
name="Player",
2022-01-10 13:21:17 -05:00
ai_cls=HostileEnemy,
fighter=Fighter(hp=30, defense=2, power=5),
inventory=Inventory(capacity=26),
2022-01-25 15:51:59 -05:00
level=Level(level_up_base=200),
2022-01-07 15:52:53 -05:00
)
2022-01-10 13:21:17 -05:00
orc = Actor(
2022-01-07 15:52:53 -05:00
char="o",
color=(63, 127, 63),
name="Orc",
2022-01-10 13:21:17 -05:00
ai_cls=HostileEnemy,
fighter=Fighter(hp=10, defense=0, power=3),
2022-01-13 14:56:38 -05:00
inventory=Inventory(capacity=0),
2022-01-25 15:51:59 -05:00
level=Level(xp_given=35),
2022-01-07 15:52:53 -05:00
)
2022-01-10 13:21:17 -05:00
troll = Actor(
2022-01-07 15:52:53 -05:00
char="T",
color=(0, 127, 0),
name="Troll",
2022-01-10 13:21:17 -05:00
ai_cls=HostileEnemy,
fighter=Fighter(hp=16, defense=1, power=4),
2022-01-13 14:56:38 -05:00
inventory=Inventory(capacity=0),
2022-01-25 15:51:59 -05:00
level=Level(xp_given=100),
2022-01-07 15:52:53 -05:00
)
2022-01-14 16:45:07 -05:00
confusion_scroll = Item(
char="~",
color=(207, 63, 255),
name="Confusion Scroll",
consumable=consumable.ConfusionConsumable(number_of_turns=10),
)
2022-01-18 13:26:26 -05:00
fireball_scroll = Item(
char="~",
color=(255, 0, 0),
name="Fireball Scroll",
consumable=consumable.FireballDamageConsumable(damage=12, radius=3),
)
health_potion = Item(
char="!",
color=(127, 0, 255),
name="Health Potion",
2022-01-13 14:56:38 -05:00
consumable=consumable.HealingConsumable(amount=4),
)
lightning_scroll = Item(
char="~",
color=(255, 255, 0),
name="Lightning Scroll",
consumable=consumable.LightningDamageConsumable(damage=20, maximum_range=5),
)
dagger = Item(
char="/",
color=(0, 191, 255),
name="Dagger",
equippable=equippable.Dagger(),
)
sword = Item(
char="/",
color=(0, 191, 244),
name="Sword",
equippable=equippable.Sword(),
)
leather_armor = Item(
char="[",
color=(139, 69, 19),
name="Leather Armor",
equippable=equippable.LeatherArmor(),
)
chain_mail = Item(
char="[",
color=(139, 69, 19),
name="Chain Mail",
equippable=equippable.ChainMail(),
)