Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Dungeon-Game/enemy.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
54 lines (46 sloc)
1.01 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef ENEMY | |
#define ENEMY | |
class Enemy{ | |
public: | |
int health; | |
int attack; | |
int defense; | |
int x; | |
int y; | |
char character; | |
std::string name; | |
Enemy(char enemy_char, int _health,int _attack, int _defense,std::string _name) | |
: character(enemy_char), health(_health), attack(_attack), defense(_defense), name(_name) {}; | |
char get_char(){return character;} | |
int get_enemy_x(){return x;} | |
int get_enemy_y(){return y;} | |
void set_enemypos(int _x, int _y); | |
}; | |
class Orc : public Enemy{ | |
public: | |
Orc() : Enemy('o',20,4,10,"Orc"){} | |
}; | |
class HighOrc : public Enemy | |
{ | |
public: | |
HighOrc():Enemy('H',30,5,15,"High Orc"){} | |
}; | |
class Undead : public Enemy{ | |
public: | |
Undead() : Enemy('u',5,1,0,"Undead"){} | |
}; | |
class UndeadKing : public Enemy | |
{ | |
public: | |
UndeadKing():Enemy('K',15,2,5,"Undead King"){} | |
}; | |
class Lizardman : public Enemy{ | |
public: | |
Lizardman() : Enemy('l',45,10,15,"Lizardman"){} | |
}; | |
class Dragon : public Enemy | |
{ | |
public: | |
Dragon():Enemy('D',60,12,25,"Dragon"){} | |
}; | |
#endif |