From a3821676f4d29a0665c616cd033ad94a99fcd67e Mon Sep 17 00:00:00 2001 From: eichhornchen Date: Thu, 19 Nov 2020 16:17:02 +0100 Subject: [PATCH] The strength of the player is now increased when he levels up --- squirrelbattle/entities/player.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/squirrelbattle/entities/player.py b/squirrelbattle/entities/player.py index 873da32..a36f21e 100644 --- a/squirrelbattle/entities/player.py +++ b/squirrelbattle/entities/player.py @@ -28,7 +28,8 @@ class Player(FightingEntity): def move(self, y: int, x: int) -> None: """ - When the player moves, move the camera of the map. + Moves the view of the map (the point on which the camera is centered) + according to the moves of the player. """ super().move(y, x) self.map.currenty = y @@ -44,6 +45,7 @@ class Player(FightingEntity): self.current_xp -= self.max_xp self.max_xp = self.level * 10 self.health = self.maxhealth + self.strength = self.strength + 1 # TODO Remove it, that's only fun self.map.spawn_random_entities(randint(3 * self.level, 10 * self.level)) @@ -62,7 +64,7 @@ class Player(FightingEntity): """ If the player tries to move but a fighting entity is there, the player fights this entity. - It rewards some XP if it is dead. + If the entity dies, the player is rewarded with some XP """ # Don't move if we are dead if self.dead: