Spawn also items

This commit is contained in:
Yohann D'ANELLO
2020-11-11 16:23:27 +01:00
parent d75f4290ff
commit 2b5d82db57
5 changed files with 21 additions and 7 deletions

View File

@ -16,6 +16,10 @@ class Item(Entity):
self.held = True
class Heart(Item):
name = "heart"
class Bomb(Item):
name = "bomb"
damage: int = 5

View File

@ -36,7 +36,8 @@ class Player(FightingEntity):
self.max_xp = self.level * 10
self.health = self.maxhealth
# TODO Remove it, that's only fun
self.map.spawn_random_entities(randint(self.level, self.level * 5))
self.map.spawn_random_entities(randint(3 * self.level,
10 * self.level))
def add_xp(self, xp: int) -> None:
"""