-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenemy.py
More file actions
107 lines (95 loc) · 2.69 KB
/
Copy pathenemy.py
File metadata and controls
107 lines (95 loc) · 2.69 KB
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
103
104
105
106
107
import random
taunts_vile = [
"You ever consider dying just to make this less embarrassing?",
"I've seen more action in a church basement.",
"Is that a sword or are you just happy to underperform.",
"You're not built for war, you're built for dissapointing women.",
"You've got the aura of someone who apologizes during sex.",
"You hit like your safe word is 'sorry.'",
"I'd ask if you trained for this, but clearly you didn't even show up to life.",
"I've met tissues with more fight than you.",
"Your entire existence feels like a bad rebound.",
"You look like you get ignored in group therapy."
]
class Enemy:
def __init__(self, name, hp, damage, taunts=None, xp_reward=10):
self.name = name
self.hp = hp
self.damage = damage
self.taunts = taunts or []
self.xp_reward = xp_reward
self.status_effect = None
self.status_duration = 0
def is_alive(self):
return self.hp > 0
def get_taunt(self):
if self.taunts:
return random.choice(self.taunts)
return None
enemy_templates = {
"skeleton": {
"hp": 30,
"damage": 10,
"taunts": ["Rattle rattle... you're next!"],
"xp_reward": 8
},
"goblin": {
"hp": 25,
"damage": 15,
"taunts": ["You're in my turf!"],
"xp_reward": 10
},
"zombie brute": {
"hp": 60,
"damage": 18,
"taunts": ["Uuuggghhh..."],
"xp_reward": 18
},
"ice spirit": {
"hp": 75,
"damage":12,
"taunts": ["You cannot freeze the frozen."],
"xp_reward": 15
},
"shield knight": {
"hp": 75,
"damage": 20,
"taunts": ["Try harder, mage."],
"xp_reward": 25
},
"frost golem": {
"hp": 90,
"damage": 25,
"taunts": ["You will shatter like ice."],
"xp_reward": 30
},
"flame wraith": {
"hp": 100,
"damage": 30,
"taunts": ["Ashes to ashes, mortal."],
"xp_reward": 40
},
"arcane sentinel": {
"hp": 120,
"damage": 25,
"taunts": ["None pass the seal!"],
"xp_reward": 50
},
"corrupted king": {
"hp": 120,
"damage": 35,
"taunts": ["Kneel... peasant!"],
"xp_reward": 100
}
}
def spawn_enemy(name):
data = enemy_templates.get(name.lower())
if not data:
raise ValueError(f"No enemy template found for '{name}'")
return Enemy(
name=name.title(),
hp=data["hp"],
damage=data["damage"],
taunts=data["taunts"],
xp_reward=data["xp_reward"]
)