-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclassItem.py
More file actions
25 lines (21 loc) · 952 Bytes
/
classItem.py
File metadata and controls
25 lines (21 loc) · 952 Bytes
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
class Item:
def __init__(self, name, cost, health_effect, stamina_effect, power_effect, defense_effect, agility_effect, reflexes_effect, duration):
self.name = name
self.cost = cost
self.health_effect = health_effect
self.stamina_effect = health_stamina
self.power = power
self.defense = defense
self.agility = agility
self.reflexes = reflexes
self.duration = duration
def hp_up(self, character):
character.health += health_effect
print(f"{character.name}'s health healed by {self.health_effect}, raising it to {character.health}.")
def stamina_up(self, character):
character.stamina += stamina_effect
print(f"{character.name}'s stamina replenished by {self.health_effect}, raising it to {character.health}.")
def strength_up(self, character):
pass
def swiftness_up(self, character):
pass