//纯手写!想拷贝跟我说~
#include<bits/stdc++.h>
#include<iostream>
#include<string.h>
#include<windows.h>
using namespace std;
int main(){
cout<<"wyb制作(1.01版本)"<<endl;
cout<<"想要去赵老师网站请按1,开始请按2"<<endl;
int zls;
cin>>zls;
if(zls==1){
ShellExecute(NULL,"open","http://123.56.23.228/",NULL,NULL,SW_SHOWNORMAL);
cout<<"么么哒~"<<endl;
}
Sleep(1000);
cout<<"选择你的角色:1.杰哥2.阿伟3.彬彬4.阿媽5.淑慧阿姨"<<endl;
/*杰哥:被攻击后回血,并杰除封印,可连续攻击两次,持续一回合
阿伟:就是逊啊
彬彬:有50%概率逃过一杰,对杰哥无效
阿媽:攻击伤害有25%概率*2
淑慧阿姨:对杰哥防御力增加50%
注意:玩家优先攻击~*/
int wjjs;
cin>>wjjs;
srand(unsigned(time(NULL)));
int jghp=2500,awhp=3000,bbhp=3000,amhp=3000,shhp=2750;
int jgat=50,awat=50,bbat=50,amat=50,shat=50;
int ds,cds;//点数
string at;int wjgj,wjhp;int flag=0;
int drhp,dRhp,dRHp,dRHP;
switch(wjjs){
case 1:wjhp=jghp;drhp=awhp;dRhp=bbhp;dRHp=amhp;dRHP=shhp;break;
case 2:wjhp=awhp;drhp=jghp;dRhp=bbhp;dRHp=amhp;dRHP=shhp;break;
case 3:wjhp=bbhp;drhp=jghp;dRhp=awhp;dRHp=amhp;dRHP=shhp;break;
case 4:wjhp=amhp;drhp=jghp;dRhp=awhp;dRHp=bbhp;dRHP=shhp;break;
default:wjhp=shhp;drhp=jghp;dRhp=awhp;dRHp=bbhp;dRHP=amhp;break;
}
cout<<wjhp;
while(1){
if(wjhp<=0){
cout<<"你归西了!游戏结束~"<<endl;
Sleep(1000);
break;
}else if(drhp<=0&&dRhp<=0&&dRHp<=0&&dRHP<=0){
cout<<"太腻害了!你赢了!"<<endl;
Sleep(2000);
break;
}
cout<<"杰哥血量:"<<jghp<<"阿伟血量:"<<awhp<<"彬彬血量:"<<bbhp<<"阿媽血量:"<<amhp<<"淑慧阿姨血量:"<<shhp<<endl;
cout<<"友情提醒:角色对应的编号对应的是攻击命中(*20%)的概率"<<endl;
cds=rand()%6+1;
Sleep(100);
cout<<"选择你的攻击目标!1 2 3 4 5"<<endl;
Sleep(100);
if(wjjs==1){
if(flag==1){
wjhp+=20;
}
if(cds==1&&flag==1){
cout<<"攻击命中!请问你要攻击谁!(已启用双倍伤害!)"<<endl;
cin>>wjgj;
switch(wjgj){
case 1:cout<<"你是想自杀咩?本次攻击无效!"<<endl;break;
case 2:cout<<"听话!让我看看!阿伟被攻击!"<<endl;awhp-=2000;break;
case 3:cout<<"你看这个彬彬,啊,真的太逊了!彬彬被攻击!"<<endl;bbhp-=2000;break;
case 4:cout<<"阿媽被攻击!"<<endl;amhp-=2000;break;
case 5:cout<<"淑慧阿姨被攻击!"<<endl;shhp-=2000;break;//此为debug
}
flag=0;
}else if(cds==1&&flag!=1){
cout<<"攻击命中!请问你要攻击谁!"<<endl;
cin>>wjgj;
switch(wjgj){
case 1:cout<<"你是想自杀咩?本次攻击无效!"<<endl;break;
case 2:cout<<"听话!让我看看!阿伟被攻击!"<<endl;drhp-=50;break;
case 3:cout<<"你看这个彬彬,啊,真的太逊了!彬彬被攻击!"<<endl;dRhp-=50;break;
case 4:cout<<"阿媽被攻击!"<<endl;dRHp-=50;break;
case 5:cout<<"淑慧阿姨被攻击!"<<endl;dRHP-=25;break;
}
flag=0;
}else if(cds!=1){
cout<<"攻击未命中!抱歉~"<<endl;
}
}else if(wjjs==2){
cout<<"阿伟暂不支持攻击,谢谢,催更请按任意键"<<endl;
cin>>wjgj;
ShellExecute(NULL,"open","https://search.bilibili.com/upuser?keyword=%E6%9F%90%E5%85%A8%E6%98%8E%E6%98%9F-qwq",NULL,NULL,SW_SHOWNORMAL);
cout<<"请搜索'某全明星-qwq'并发消息,催更,如果关注就更好啦!"<<endl;
break;
}else if(wjjs==3){
cout<<"彬彬暂不支持攻击,谢谢,催更请按任意键"<<endl;
cin>>wjgj;
ShellExecute(NULL,"open","https://search.bilibili.com/upuser?keyword=%E6%9F%90%E5%85%A8%E6%98%8E%E6%98%9F-qwq",NULL,NULL,SW_SHOWNORMAL);
cout<<"请搜索'某全明星-qwq'并发消息,催更,如果关注就更好啦!"<<endl;
break;
}else if(wjjs==4){
cout<<"阿媽暂不支持攻击,谢谢,催更请按任意键"<<endl;
cin>>wjgj;
ShellExecute(NULL,"open","https://search.bilibili.com/upuser?keyword=%E6%9F%90%E5%85%A8%E6%98%8E%E6%98%9F-qwq",NULL,NULL,SW_SHOWNORMAL);
cout<<"请搜索'某全明星-qwq'并发消息,催更,如果关注就更好啦!"<<endl;
break;
}else if(wjjs==5){
cout<<"阿伟暂不支持攻击,谢谢,催更请按任意键"<<endl;
cin>>wjgj;
ShellExecute(NULL,"open","https://search.bilibili.com/upuser?keyword=%E6%9F%90%E5%85%A8%E6%98%8E%E6%98%9F-qwq",NULL,NULL,SW_SHOWNORMAL);
cout<<"请搜索'某全明星-qwq'并发消息,催更,如果关注就更好啦!"<<endl;
break;
}else{
cout<<"你想造反?"<<endl;
Sleep(100);
continue;
}
//正在做敌人的代码,催更请自便
switch(wjjs){//看到没!wjjs才是最重要的变量!hhh
case 1:for(int i=0;i<5;i++){
Sleep(500);
cds=rand()%5+1;
switch(cds){
case 1:cout<<"敌人选择了杰哥!"<<endl;jghp-=50;flag=1;break;
case 2:cout<<"敌人选择了阿伟!"<<endl;awhp-=50;break;
case 3:cout<<"敌人选择了彬彬!"<<endl;bbhp-=50;break;
case 4:cout<<"敌人选择了阿媽!"<<endl;amhp-=50;break;
case 5:cout<<"敌人选择了淑慧阿姨!"<<endl;shhp-=50;break;
}
}break;
case 2:for(int i=0;i<5;i++){
Sleep(500);
cds=rand()%5+1;
switch(cds){
case 1:cout<<"敌人选择了杰哥!"<<endl;jghp-=50;flag=1;break;
case 2:cout<<"敌人选择了阿伟!"<<endl;awhp-=50;break;
case 3:cout<<"敌人选择了彬彬!"<<endl;bbhp-=50;break;
case 4:cout<<"敌人选择了阿媽!"<<endl;amhp-=50;break;
case 5:cout<<"敌人选择了淑慧阿姨!"<<endl;shhp-=50;break;
}
}break;
case 3:for(int i=0;i<5;i++){
Sleep(500);
cds=rand()%5+1;
switch(cds){
case 1:cout<<"敌人选择了杰哥!"<<endl;jghp-=50;flag=1;break;
case 2:cout<<"敌人选择了阿伟!"<<endl;awhp-=50;break;
case 3:cout<<"敌人选择了彬彬!"<<endl;bbhp-=50;break;
case 4:cout<<"敌人选择了阿媽!"<<endl;amhp-=50;break;
case 5:cout<<"敌人选择了淑慧阿姨!"<<endl;shhp-=50;break;
}
}break;
case 4:for(int i=0;i<5;i++){
Sleep(500);
cds=rand()%5+1;
switch(cds){
case 1:cout<<"敌人选择了杰哥!"<<endl;jghp-=50;flag=1;break;
case 2:cout<<"敌人选择了阿伟!"<<endl;awhp-=50;break;
case 3:cout<<"敌人选择了彬彬!"<<endl;bbhp-=50;break;
case 4:cout<<"敌人选择了阿媽!"<<endl;amhp-=50;break;
case 5:cout<<"敌人选择了淑慧阿姨!"<<endl;shhp-=50;break;
}
}break;
default:for(int i=0;i<5;i++){
Sleep(500);
cds=rand()%5+1;
switch(cds){
case 1:cout<<"敌人选择了杰哥!"<<endl;jghp-=50;flag=1;break;
case 2:cout<<"敌人选择了阿伟!"<<endl;awhp-=50;break;
case 3:cout<<"敌人选择了彬彬!"<<endl;bbhp-=50;break;
case 4:cout<<"敌人选择了阿媽!"<<endl;amhp-=50;break;
case 5:cout<<"敌人选择了淑慧阿姨!"<<endl;shhp-=50;break;
}
}break;
}
}
return 0;
} //纯手写!想拷贝跟我说~
#include<bits/stdc++.h>
#include<iostream>
#include<string.h>
#include<windows.h>
using namespace std;
int main(){
cout<<"wyb制作(1.01版本)"<<endl;
cout<<"想要去赵老师网站请按1,开始请按2"<<endl;
int zls;
cin>>zls;
if(zls==1){
ShellExecute(NULL,"open","http://123.56.23.228/",NULL,NULL,SW_SHOWNORMAL);
cout<<"么么哒~"<<endl;
}
Sleep(1000);
cout<<"选择你的角色:1.杰哥2.阿伟3.彬彬4.阿媽5.淑慧阿姨"<<endl;
/*杰哥:被攻击后回血,并杰除封印,可连续攻击两次,持续一回合
阿伟:就是逊啊
彬彬:有50%概率逃过一杰,对杰哥无效
阿媽:攻击伤害有25%概率*2
淑慧阿姨:对杰哥防御力增加50%
注意:玩家优先攻击~*/
int wjjs;
cin>>wjjs;
srand(unsigned(time(NULL)));
int jghp=2500,awhp=3000,bbhp=3000,amhp=3000,shhp=2750;
int jgat=50,awat=50,bbat=50,amat=50,shat=50;
int ds,cds;//点数
string at;int wjgj,wjhp;int flag=0;
int drhp,dRhp,dRHp,dRHP;
switch(wjjs){
case 1:wjhp=jghp;drhp=awhp;dRhp=bbhp;dRHp=amhp;dRHP=shhp;break;
case 2:wjhp=awhp;drhp=jghp;dRhp=bbhp;dRHp=amhp;dRHP=shhp;break;
case 3:wjhp=bbhp;drhp=jghp;dRhp=awhp;dRHp=amhp;dRHP=shhp;break;
case 4:wjhp=amhp;drhp=jghp;dRhp=awhp;dRHp=bbhp;dRHP=shhp;break;
default:wjhp=shhp;drhp=jghp;dRhp=awhp;dRHp=bbhp;dRHP=amhp;break;
}
cout<<wjhp;
while(1){
if(wjhp<=0){
cout<<"你归西了!游戏结束~"<<endl;
Sleep(1000);
break;
}else if(drhp<=0&&dRhp<=0&&dRHp<=0&&dRHP<=0){
cout<<"太腻害了!你赢了!"<<endl;
Sleep(2000);
break;
}
cout<<"杰哥血量:"<<jghp<<"阿伟血量:"<<awhp<<"彬彬血量:"<<bbhp<<"阿媽血量:"<<amhp<<"淑慧阿姨血量:"<<shhp<<endl;
cout<<"友情提醒:角色对应的编号对应的是攻击命中(*20%)的概率"<<endl;
cds=rand()%6+1;
Sleep(100);
cout<<"选择你的攻击目标!1 2 3 4 5"<<endl;
Sleep(100);
if(wjjs==1){
if(flag==1){
wjhp+=20;
}
if(cds==1&&flag==1){
cout<<"攻击命中!请问你要攻击谁!(已启用双倍伤害!)"<<endl;
cin>>wjgj;
switch(wjgj){
case 1:cout<<"你是想自杀咩?本次攻击无效!"<<endl;break;
case 2:cout<<"听话!让我看看!阿伟被攻击!"<<endl;awhp-=2000;break;
case 3:cout<<"你看这个彬彬,啊,真的太逊了!彬彬被攻击!"<<endl;bbhp-=2000;break;
case 4:cout<<"阿媽被攻击!"<<endl;amhp-=2000;break;
case 5:cout<<"淑慧阿姨被攻击!"<<endl;shhp-=2000;break;//此为debug
}
flag=0;
}else if(cds==1&&flag!=1){
cout<<"攻击命中!请问你要攻击谁!"<<endl;
cin>>wjgj;
switch(wjgj){
case 1:cout<<"你是想自杀咩?本次攻击无效!"<<endl;break;
case 2:cout<<"听话!让我看看!阿伟被攻击!"<<endl;drhp-=50;break;
case 3:cout<<"你看这个彬彬,啊,真的太逊了!彬彬被攻击!"<<endl;dRhp-=50;break;
case 4:cout<<"阿媽被攻击!"<<endl;dRHp-=50;break;
case 5:cout<<"淑慧阿姨被攻击!"<<endl;dRHP-=25;break;
}
flag=0;
}else if(cds!=1){
cout<<"攻击未命中!抱歉~"<<endl;
}
}else if(wjjs==2){
cout<<"阿伟暂不支持攻击,谢谢,催更请按任意键"<<endl;
cin>>wjgj;
ShellExecute(NULL,"open","https://search.bilibili.com/upuser?keyword=%E6%9F%90%E5%85%A8%E6%98%8E%E6%98%9F-qwq",NULL,NULL,SW_SHOWNORMAL);
cout<<"请搜索'某全明星-qwq'并发消息,催更,如果关注就更好啦!"<<endl;
break;
}else if(wjjs==3){
cout<<"彬彬暂不支持攻击,谢谢,催更请按任意键"<<endl;
cin>>wjgj;
ShellExecute(NULL,"open","https://search.bilibili.com/upuser?keyword=%E6%9F%90%E5%85%A8%E6%98%8E%E6%98%9F-qwq",NULL,NULL,SW_SHOWNORMAL);
cout<<"请搜索'某全明星-qwq'并发消息,催更,如果关注就更好啦!"<<endl;
break;
}else if(wjjs==4){
cout<<"阿媽暂不支持攻击,谢谢,催更请按任意键"<<endl;
cin>>wjgj;
ShellExecute(NULL,"open","https://search.bilibili.com/upuser?keyword=%E6%9F%90%E5%85%A8%E6%98%8E%E6%98%9F-qwq",NULL,NULL,SW_SHOWNORMAL);
cout<<"请搜索'某全明星-qwq'并发消息,催更,如果关注就更好啦!"<<endl;
break;
}else if(wjjs==5){
cout<<"阿伟暂不支持攻击,谢谢,催更请按任意键"<<endl;
cin>>wjgj;
ShellExecute(NULL,"open","https://search.bilibili.com/upuser?keyword=%E6%9F%90%E5%85%A8%E6%98%8E%E6%98%9F-qwq",NULL,NULL,SW_SHOWNORMAL);
cout<<"请搜索'某全明星-qwq'并发消息,催更,如果关注就更好啦!"<<endl;
break;
}else{
cout<<"你想造反?"<<endl;
Sleep(100);
continue;
}
//正在做敌人的代码,催更请自便
switch(wjjs){//看到没!wjjs才是最重要的变量!hhh
case 1:for(int i=0;i<5;i++){
Sleep(500);
cds=rand()%5+1;
switch(cds){
case 1:cout<<"敌人选择了杰哥!"<<endl;jghp-=50;flag=1;break;
case 2:cout<<"敌人选择了阿伟!"<<endl;awhp-=50;break;
case 3:cout<<"敌人选择了彬彬!"<<endl;bbhp-=50;break;
case 4:cout<<"敌人选择了阿媽!"<<endl;amhp-=50;break;
case 5:cout<<"敌人选择了淑慧阿姨!"<<endl;shhp-=50;break;
}
}break;
case 2:for(int i=0;i<5;i++){
Sleep(500);
cds=rand()%5+1;
switch(cds){
case 1:cout<<"敌人选择了杰哥!"<<endl;jghp-=50;flag=1;break;
case 2:cout<<"敌人选择了阿伟!"<<endl;awhp-=50;break;
case 3:cout<<"敌人选择了彬彬!"<<endl;bbhp-=50;break;
case 4:cout<<"敌人选择了阿媽!"<<endl;amhp-=50;break;
case 5:cout<<"敌人选择了淑慧阿姨!"<<endl;shhp-=50;break;
}
}break;
case 3:for(int i=0;i<5;i++){
Sleep(500);
cds=rand()%5+1;
switch(cds){
case 1:cout<<"敌人选择了杰哥!"<<endl;jghp-=50;flag=1;break;
case 2:cout<<"敌人选择了阿伟!"<<endl;awhp-=50;break;
case 3:cout<<"敌人选择了彬彬!"<<endl;bbhp-=50;break;
case 4:cout<<"敌人选择了阿媽!"<<endl;amhp-=50;break;
case 5:cout<<"敌人选择了淑慧阿姨!"<<endl;shhp-=50;break;
}
}break;
case 4:for(int i=0;i<5;i++){
Sleep(500);
cds=rand()%5+1;
switch(cds){
case 1:cout<<"敌人选择了杰哥!"<<endl;jghp-=50;flag=1;break;
case 2:cout<<"敌人选择了阿伟!"<<endl;awhp-=50;break;
case 3:cout<<"敌人选择了彬彬!"<<endl;bbhp-=50;break;
case 4:cout<<"敌人选择了阿媽!"<<endl;amhp-=50;break;
case 5:cout<<"敌人选择了淑慧阿姨!"<<endl;shhp-=50;break;
}
}break;
default:for(int i=0;i<5;i++){
Sleep(500);
cds=rand()%5+1;
switch(cds){
case 1:cout<<"敌人选择了杰哥!"<<endl;jghp-=50;flag=1;break;
case 2:cout<<"敌人选择了阿伟!"<<endl;awhp-=50;break;
case 3:cout<<"敌人选择了彬彬!"<<endl;bbhp-=50;break;
case 4:cout<<"敌人选择了阿媽!"<<endl;amhp-=50;break;
case 5:cout<<"敌人选择了淑慧阿姨!"<<endl;shhp-=50;break;
}
}break;
}
}
return 0;
}