I'm trying to create a method called beercanblitz that will double my attacks such as punch() which returns the value of 20. Also when I double my attacks with beercanblitz I lose 25 health. I want this attack beercanblitz to only be able to be used once. Any Ideas how I can do this??
Code:class senior:public teacher{ public: int headbutt(); int beercanblitz(punch())); void setHealth(); senior(); ~senior(); }; senior::senior(){ health = 100; name = "SuperSeniors!"; } senior::~senior(){ } int senior::beercanblitz(senior.punch()){ return senior.punch()*2; }Code:else if{(enemyAttack == 5){ f5.beercanblitz(f5.punch()); // f5.kick(f5.beercanblitz()); // f5.headbutt(f5.beercanblitz()) } cout<<"Super Human Senior USES BEER CAN BLITZ!!"<<endl; cout<<"Your Health: "; f1.showHealth(); }



LinkBack URL
About LinkBacks


