5 #ifndef __RD_WEAPON_HPP__
6 #define __RD_WEAPON_HPP__
35 const std::string & getName()
const;
36 int getDamage()
const;
37 int getCurrentAmmo()
const;
39 int getMaxAmmo()
const;
60 #endif //__RD_WEAPON_HPP__
Weapon()
Constructs a default, dummy weapon. (That is invalid for the game, by the way)
Definition: Weapon.cpp:10
static const int SCOPE_X
X coordinate of the weapon's scope.
Definition: Weapon.hpp:42
The main, catch-all namespace for Robot Devastation.
Definition: groups.dox:4
static const int SCOPE_Y
Y coordinate of the weapon's scope.
Definition: Weapon.hpp:44
int damage
Damage that this weapon can inflict in one shot.
Definition: Weapon.hpp:50
Class that represents a weapon.
Definition: Weapon.hpp:22
Class that represents a target detected. This target is (or should be) associated to a player.
Definition: Target.hpp:18
bool canShootTarget(const Target &target)
Checks if the target is within the weapon's current range and can be hit by it.
Definition: Weapon.cpp:27
int current_ammo
Current ammount of ammo.
Definition: Weapon.hpp:53
int max_ammo
Maximum ammount of ammo.
Definition: Weapon.hpp:56
bool reload()
Increases the current ammo to max_ammo.
Definition: Weapon.cpp:46