diff options
Diffstat (limited to 'src/main/cpp/RangedWeapon.cpp')
-rw-r--r-- | src/main/cpp/RangedWeapon.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/cpp/RangedWeapon.cpp b/src/main/cpp/RangedWeapon.cpp index 21feae4..6f24666 100644 --- a/src/main/cpp/RangedWeapon.cpp +++ b/src/main/cpp/RangedWeapon.cpp @@ -14,20 +14,25 @@ bool RangedWeapon::use(Actor &user, Actor &actor) actor.damage(user.attack() + _damage - actor.defence()); _charged = false; } + + return true; } bool RangedWeapon::reload(Actor &actor) { //TODO add bullet type std::list<Item*> inventory = actor.inventory(); - for (Item* item : inventory) { + for (Item *item : inventory) { if (item->type == Item::Type::BULLET) { //TODO get the bullet - //Bullet* bullet = dynamic_cast <Bullet*> (item); + // Bullet *bullet = dynamic_cast <Bullet*> (item); break; } } + // TODO remove + return true; + /* if (bullet->decreaseAmount(1)) { _charged = true; |