From 50b5552da8360c65bc1ccc73a1ec1804b526ba5a Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 7 Dec 2019 23:32:22 -0500 Subject: [PATCH] Points system added. --- monkeyspank | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/monkeyspank b/monkeyspank index ef1fff3..8d4528c 100755 --- a/monkeyspank +++ b/monkeyspank @@ -24,6 +24,7 @@ def monkey_taunt(): def player_action(monkey, reaction): if monkey != reaction: return True + global points global spanks left = 0.7 right = 0.7 @@ -32,6 +33,7 @@ def player_action(monkey, reaction): p = pygame.mixer.Channel(2) p.play(sounds['spank-hit']) p.set_volume(left, right) + points += 10 spanks += 1 return False @@ -103,6 +105,7 @@ def game(mode): message.append("You averaged " + str(round(spanks / (totalTime - startTime), 2)) + " monkey spanks per second.") except: message.append("You averaged 0.00 monkey spanks per second.") + message.append("You scored " + str(points) + " points.") time.sleep(0.1) display_text(message) return "menu" @@ -111,6 +114,7 @@ def game(mode): mode = game_menu("start game", "instructions", "donate", "credits", "learn sounds", "exit_game") while mode != "exit_game": spanks = 0 + points = 0 if mode == "menu": mode = game_menu("start game", "instructions", "donate", "credits", "learn sounds", "exit_game") if mode == "start game": mode = game(mode) if mode == "learn sounds": mode = learn_sounds(sounds)