From 3724a3121ede38584c6aa0785739205271f57530 Mon Sep 17 00:00:00 2001
From: Tamir Atias <engine.games@gmail.com>
Date: Sun, 5 Feb 2012 22:09:07 +0200
Subject: [PATCH] [Add] Ways of death. [Add] Generation area is now larger.

---
 src/Unuk/Player.cpp                 | 18 ++++++++++++++++--
 src/Unuk/Player.h                   |  2 +-
 src/libUnuk/Engine/WorldManager.cpp | 27 ++++++++++++++++++++++++++-
 src/libUnuk/LevelGen/LevelGen.h     |  4 ++--
 4 files changed, 45 insertions(+), 6 deletions(-)

diff --git a/src/Unuk/Player.cpp b/src/Unuk/Player.cpp
index 47a7848..3098abf 100644
--- a/src/Unuk/Player.cpp
+++ b/src/Unuk/Player.cpp
@@ -6,7 +6,7 @@
 const float Player::PLAYER_SPEED = Character::CHARACTER_SPEED + 0.5f;
 
 // Amount of Exp needed every level
-const int Player::EXP_TABLE[10] = {
+const int Player::EXP_TABLE[MAX_LEVEL] = {
 	10,
 	30,
 	90,
@@ -16,7 +16,17 @@ const int Player::EXP_TABLE[10] = {
 	1000,
 	2000,
 	3500,
-	5000
+	5000,
+  6500,
+  8500,
+  10250,
+  12000,
+  15000,
+  25000,
+  50000,
+  65000,
+  80000,
+  100000
 };
 
 Player::Player(LevelGen *mapArg) : Character(mapArg) {
@@ -122,6 +132,10 @@ void Player::SetLevel(int level) {
 	if(_exp < 0) {
 		_exp = 0;
 	}
+  if(_level == MAX_LEVEL) {
+    eventHistory->LogEvent("YOU BEAT IT! I'M SO PROUD!");
+    eventHistory->LogEvent("*Sheds Tear*");
+  }
 }
 
 void Player::SetExp(int exp) {
diff --git a/src/Unuk/Player.h b/src/Unuk/Player.h
index 42f6b57..d2d9972 100644
--- a/src/Unuk/Player.h
+++ b/src/Unuk/Player.h
@@ -27,7 +27,7 @@ public:
   void SetExpLiteral(int exp) { _exp = exp; }
   void SetHealthLiteral(int health) { _health = health; }
   
-  static const int MAX_LEVEL = 10;
+  static const int MAX_LEVEL = 20;
   static const int EXP_TABLE[MAX_LEVEL];
   
 protected:
diff --git a/src/libUnuk/Engine/WorldManager.cpp b/src/libUnuk/Engine/WorldManager.cpp
index 8636beb..0578f69 100644
--- a/src/libUnuk/Engine/WorldManager.cpp
+++ b/src/libUnuk/Engine/WorldManager.cpp
@@ -138,7 +138,32 @@ void WorldManager::OnPlayerAttack(Player* player) {
     npc->OnAttack();
 
     if(npc->GetHealth() <= 0) {
-      eventHistory->LogEvent("Killed Bald Naked Dude!");
+      
+      // Please note:
+      // Naked dudes are known to be sensitive to spicy food.
+      
+      char* waysOfDeath[] = {
+        "Choked Naked Dude!",
+        "Stabbed Naked Dude!",
+        "Urinated Acid on Naked Dude!",
+        "Killed Naked Dude with a dildo!",
+        "Poured Tabasco on Naked Dude!",
+        "Threw Acid on Naked Dude!",
+        "Slapped Naked Dude with Dead Fish!",
+        "Killed Naked Dude with a Pistol!",
+        "Ate Naked Dude's brain!",
+        "Slaughtered Naked Dude!",
+        "Roasted Naked Dude!",
+        "Paper Sprayed Naked Dude!",
+        "Stoned Naked Dude!",
+        "Slayed Naked Dude with a Katana!",
+        "Thew Chili Peppers on Naked Dude!",
+        "Used Karate on Naked Dude!",
+        "Beat the shit out of Naked Dude!",
+        "FUS RO DAH!"
+      };
+      
+      eventHistory->LogEvent(waysOfDeath[rand() % (sizeof(waysOfDeath)/sizeof(char*))]);
       
       int expGain = 3 + (rand() % 2);
       player->SetExp(player->GetExp() + expGain);
diff --git a/src/libUnuk/LevelGen/LevelGen.h b/src/libUnuk/LevelGen/LevelGen.h
index 60073c3..9b1ec6e 100644
--- a/src/libUnuk/LevelGen/LevelGen.h
+++ b/src/libUnuk/LevelGen/LevelGen.h
@@ -63,8 +63,8 @@ private:
   static const int TILE_ARRAY_SIZE = 150;
   MapTile _tile[TILE_ARRAY_SIZE][TILE_ARRAY_SIZE];
   
-  static const int BOUNDARIES_X = (SCREEN_WIDTH / TILE_WIDTH) - 2;
-  static const int BOUNDARIES_Y = (SCREEN_HEIGHT / TILE_HEIGHT) - 1;
+  static const int BOUNDARIES_X = (SCREEN_WIDTH / TILE_WIDTH);
+  static const int BOUNDARIES_Y = (SCREEN_HEIGHT / TILE_HEIGHT);
 
   TextureManager _tileTextures;
   TextureManager _entityTextures;