adding cs142 code

This commit is contained in:
dm
2016-04-06 20:45:34 -07:00
parent 552d456d53
commit 8e52ce1982
174 changed files with 14064 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#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;
}