22 lines
418 B
C++
22 lines
418 B
C++
|
#include "archer.h"
|
||
|
archer::archer(string name, int max_hp, int strength, int speed, int magic) :
|
||
|
fighter(name, max_hp, strength, speed, magic), original_speed(speed) {}
|
||
|
|
||
|
int archer::getDamage() {
|
||
|
return speed;
|
||
|
}
|
||
|
|
||
|
void archer::reset() {
|
||
|
hp = max_hp;
|
||
|
speed = original_speed;
|
||
|
}
|
||
|
|
||
|
bool archer::useAbility() {
|
||
|
speed++;
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
int archer::get_original_speed() {
|
||
|
return original_speed;
|
||
|
}
|