Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- #include <iostream>
- #include <cstdlib>
- #include "balrog.h"
- #include "demon.h"
- using namespace std;
- balrog::balrog()
- {
- }
- balrog::balrog(int inStrength, int inHitpoints) : demon(inStrength, inHitpoints) {
- }
- int balrog::getDamage() const{
- cout << "The balrog ";
- int damage = demon::getDamage();
- int damage2 = (rand() % getStrength()) + 1;
- cout << "Balrog speed attack inflicts " << damage2 << " additional damage points!" << endl;
- return damage + damage2;
- }
- string balrog::getSpecies() const{
- return "balrog";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement