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?
ASCII_Game_Project/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.
69 lines (32 sloc)
1014 Bytes
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 AAA_HEADER | |
#define AAA_HEADER | |
#include<iostream> | |
#include "demons.h" | |
class Enemy : public Demon { | |
private: | |
std::string personality; | |
public: | |
bool friendly; | |
Enemy(std::string _flag, std::string _name, std::string _race, std::string _alignment, int _level, int _st, int _ma, int _vi, int _ag, int _lu, std::string _personality, bool _friendly) | |
: Demon(_flag, _name, _race, _alignment, _level, _st, _ma, _vi, _ag, _lu) { | |
personality = _personality; | |
friendly = _friendly; | |
} | |
// easy persona 5 style negotiation to get started | |
bool negotiate() { | |
int choice; | |
if (personality == "upbeat") { | |
std::cout << "This is a placeholder question?" << std::endl << "What do you think?\n" << "1.Yes\n2.No" << std::endl; | |
std::cin >> choice; | |
if (choice == 1) { | |
std::cout << "placeholder text accept" << std::endl; | |
friendly = true; | |
return friendly; | |
} | |
else{ | |
std::cout << "placeholder text decline" << std::endl; | |
} | |
} | |
} | |
}; | |
#endif |