Commit 0d6fb841 authored by pa's avatar pa

Little stats tweaks

parent 31e02a18
......@@ -19,7 +19,7 @@ public :
Alive(Agent::Type type, TextureHolder const& Textures, int HP, Entity::Side side);
int getHP() const{return mHP;}
void heal(){++mHP;}
void heal(){mHP = std::min(mHP+4,8);}
State getState() const{return mState;}
virtual void updateCurrent(sf::Time dt);
......
......@@ -106,8 +106,8 @@ void Alive::onCollideWith(SceneNode& collider){
void Alive::loot(){
float rf = random_float();
if(rf <= 0.1) drop(Collectible::Key);
else if(rf <= 0.5) drop(Collectible::Dagger);
else if(rf <= 0.9) drop(Collectible::Poison);
else if(rf <= 0.4) drop(Collectible::Dagger);
else if(rf <= 0.7) drop(Collectible::Poison);
else drop(Collectible::Coin);
}
......
#include "../headers/game.hpp"
Game::Game() : mWindow(sf::VideoMode(1920, 1080), "Tests"), mWorld(mWindow), mHUD(mWindow,mWorld.getHUDLocator()){
Game::Game() : mWindow(sf::VideoMode(1920, 1080), "LSV Fighters"), mWorld(mWindow), mHUD(mWindow,mWorld.getHUDLocator()){
TimePerFrame = sf::seconds(1.f/60.f);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment