#include <iostream>
using namespace std;
int blood=10000;
class hero{
protected:
string name;
int hp;
int attack;
public:
hero(){}
hero(string name,int hp,int attack):name(name),hp(hp),attack(attack){}
virtual void Atk(){blood-=0;}
};
class mage:public hero{
int ap_atk=50;
public:
mage():hero(){}
mage(string name,int hp,int attack):hero(name,hp,attack){}
virtual void Atk(){blood-=attack+ap_atk;}
};
class adc:public hero{
int ac_atk=100;
public:
adc():hero(){}
adc(string name,int hp,int attack):hero(name,hp,attack){}
virtual void Atk(){blood-=(attack+ac_atk);}
};
int main()
{
while(blood>0){
mage b("妖姬",4000,78);
b.Atk();
cout<<"妖姬砍了一刀,造成50伤害,boss剩余blood="<<blood<<endl;
if(blood<=0){
cout<<"怪物已死,最后一刀为mage"<<endl;
break;
}else{
adc c("亚非利欧",3000,100);
c.Atk();
cout<<"亚非砍了一刀,造成100伤害,boss剩余blood="<<blood<<endl;
if(blood<=0){
cout<<"怪物已死,最后一刀为adc"<<endl;
break;
}
}
}
return 0;
}