-
Notifications
You must be signed in to change notification settings - Fork 0
/
entity_factories.py
102 lines (96 loc) · 2.63 KB
/
entity_factories.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
import graphics.our_colors
from components import consumable, equippable
from components.ai import EnemySupplyScavenger
from components.equipment import Equipment
from components.fighter import Fighter
from components.inventory import Inventory
from components.level import Level
from entity import Actor, Item
# New defines
##########################################################
supplies = Item(
char="!",
color=graphics.our_colors.supplies,
name="Supplies",
consumable=consumable.Supplies(),
)
# fireball_scroll = Item(
# char="~",
# color=(255, 0, 0),
# name="Fireball Scroll",
# consumable=consumable.FireballDamageConsumable(damage=12, radius=3),
# )
# Old defines
##########################################################
# Friendlies
player = Actor(
char="X",
color=(255, 255, 255),
name="Player",
ai_cls=EnemySupplyScavenger,
equipment=Equipment(),
fighter=Fighter(hp=30, base_defense=1, base_power=2),
inventory=Inventory(capacity=26),
level=Level(level_up_base=200),
)
# Enemies
orc = Actor(
char="o",
color=(63, 127, 63),
name="Orc",
ai_cls=EnemySupplyScavenger,
equipment=Equipment(),
fighter=Fighter(hp=10, base_defense=0, base_power=3),
inventory=Inventory(capacity=0),
level=Level(xp_given=35),
)
troll = Actor(
char="T",
color=(0, 127, 0),
name="Troll",
ai_cls=EnemySupplyScavenger,
equipment=Equipment(),
fighter=Fighter(hp=16, base_defense=1, base_power=4),
inventory=Inventory(capacity=0),
level=Level(xp_given=100),
)
# Items
# Consumables
confusion_scroll = Item(
char="~",
color=(207, 63, 255),
name="Confusion Scroll",
consumable=consumable.ConfusionConsumable(number_of_turns=10),
)
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",
consumable=consumable.HealingConsumable(amount=4),
)
lightning_scroll = Item(
char="~",
color=(255, 255, 0),
name="Lightning Scroll",
consumable=consumable.LightningDamageConsumable(damage=20, maximum_range=5),
)
# Equipment
dagger = Item(
char="/", color=(0, 191, 255), name="Dagger", equippable=equippable.Dagger()
)
sword = Item(char="/", color=(0, 191, 255), 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()
)