Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- using namespace std;
- class demon{
- private:
- bool status;
- int HP;
- int DMG;
- int DDG;
- int DEF;
- public:
- demon(){
- status = true;
- cout << "This demon is REAL!!!" << endl;
- }
- void input_data();
- void show_data();
- void die();
- void ressurection();
- };
- void demon::input_data(){
- cout << "Enter HP your demon: ";
- cin >> this->HP;
- cout << "Enter DMG your demon: ";
- cin >> this->DMG;
- cout << "Enter DDG your demon: ";
- cin >> this->DDG;
- cout << "Enter DEF your demon: ";
- cin >> this->DEF;
- }
- void demon::show_data(){
- cout << "HP your demon: " << this->HP << endl;
- cout << "DMG your demon: " << this->DMG << endl;
- cout << "DDG your demon: " << this->DDG << endl;
- cout << "DEF your demon: " << this->DEF << endl;
- }
- void demon::die(){
- if (this->HP == 0){
- this->status = false;
- cout << "Pomerla sila nechistaya!" << endl;
- }
- }
- void demon::ressurection(){
- }
- int main(){
- vector<demon> demons;
- int a;
- demon lox;
- do{
- cin >> a;
- switch (a){
- case 1: lox.input_data();
- demons.push_back(lox);
- break;
- case 2: int b;
- cout << "Enter id your demon's: ";
- cin >> b;
- if (b > demons.size()){
- cout << "You debil!!!";
- break;
- }
- demons[b]
- }
- } while (a != 0)
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement