[Add] Ways of death.
[Add] Generation area is now larger.
This commit is contained in:
parent
a24caab545
commit
3724a3121e
@ -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) {
|
||||
|
@ -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:
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user