untitledcyberbonk2077/player.py

29 lines
569 B
Python
Raw Normal View History

2025-01-12 16:19:11 +01:00
class Player:
2025-01-20 21:21:47 +01:00
"""
2025-01-22 07:52:04 +01:00
Zmienna BODY - wykorzystywana do ubioru bohatera, trzymania broni etc.
2025-01-20 21:21:47 +01:00
"""
BODY = {
"HEAD": 0,
"CHEST": 0,
"LEFT_HAND": 0,
"RIGHT_HAND": 0,
"LEFT_LEG": 0,
"RIGHT_LEG": 0
2025-01-12 16:19:11 +01:00
}
HP = 0
HP_MAX = 0
2025-01-20 21:21:47 +01:00
2025-01-12 16:19:11 +01:00
def __init__(self, name):
self.HP = 35
self.HP_MAX = 35
self.name = name
2025-01-20 21:21:47 +01:00
def show_stats(self, stats=None):
2025-01-12 16:19:11 +01:00
print(f"Name: {self.name}")
print(f"HP: {self.HP}/{self.HP_MAX}")
2025-01-20 21:21:47 +01:00
for k, v in stats.items():
print(k, v)