版本比较
me的名竞
正文
增加 35 行删除 35 行
107 行未改动全部展开10810911011111211211311411511642 行未改动15916016116216316316416516616716816816917017117217217317417517682 行未改动25926026126226326326426526626713 行未改动2812822832842852852862872882892 行未改动29229329429529629629729829930030130130230330430511 行未改动31731831932032132132232332432522 行未改动3483493503513523523533543553562 行未改动35936036136236336336436536636736836836937037137212 行未改动38538638738838938939039139239318 行未改动4124134144154164164174184194204214214224234244244254264274283 行未改动43243343443543643743843643743843944044144144244344344444544644744844844945045145245245345445545659 行未改动51651751851952052052152252352413 行未改动5385395405415425425435445455462 行未改动54955055155255355355455555655755855855956056156211 行未改动57457557657757857857958058158222 行未改动6056066076086096096106116126132 行未改动61661761861962062062162262362462562562662762862912 行未改动64264364464564664664764864965018 行未改动66967067167267367367467567667767867867968068168168268368468524 行未改动107 行未改动全部展开 else if(x==9) S="神剑"; else if(x==10) S="铁壁"; return S; return S;}int main(){ srand(time(0)); cout<<"随机种子(*2):"<<endl;42 行未改动 cin>>s1; cout<<"回合数"<<endl; n=read(); if(s1==s2){ cout<<"我**********,你**********"<<endl; cout<<"我**********,你**********"<<endl; return 0; } if(s1=="mhm"){ cout<<s1<<"秒杀了"<<s2; return 0; return 0; } if(s2=="mhm"){ cout<<s2<<"秒杀了"<<s1; return 0; return 0; } int l1=s1.size()-1,l2=s2.size()-1; for(int i=0;i<=l1;i++){ if(s1[i]=='+'){82 行未改动 bool hbgj1=0,bd1=0,mh1=0,fd1=0; bool hbgj2=0,bd2=0,mh2=0,fd2=0; cout<<"第"; write(c); cout<<"回合"<<endl; cout<<"回合"<<endl; cout<<s1<<" HP:"; write(a1.hp); cout<<" 攻击:"; write(a1.gj);13 行未改动 cout<<JNzh(jn1)<<endl; if(jn1==1){ fd1=1; int AA=3*a1.gj-a2.fy*2; if(AA<0)AA=0; if(AA<0)AA=0; cout<<s2<<"受到了"; write(AA); cout<<"点暴击伤害,HP变为了"; write(a2.hp-AA);2 行未改动 } else if(jn1==2){ fd1=1; cout<<s1<<"回避了攻击"<<endl; hbgj1=1; hbgj1=1; } else if(jn1==3&&a1.jn[3]==1){ fd1=1; int AA=2*a1.gj-a2.fy; if(AA<0)AA=0; if(AA<0)AA=0; cout<<s2<<"受到了"; write(AA); cout<<"点毒药伤害,HP变为了"; write(a2.hp-AA);11 行未改动 a1.hp=a1.hp+AA; } else if(jn1==5&&a1.jn[5]==1){ fd1=1; int AA=a1.gj; int AA=a1.gj; if(AA<0)AA=0; cout<<s2<<"受到了"; write(AA); cout<<"点火焰伤害,HP变为了";22 行未改动 cout<<JNzh(jn2)<<endl; if(jn2==1){ fd2=1; int AA=3*a2.gj-a1.fy*2; if(AA<0)AA=0; if(AA<0)AA=0; cout<<s1<<"受到了"; write(AA); cout<<"点暴击伤害,HP变为了"; write(a1.hp-AA);2 行未改动 } else if(jn2==2){ fd2=1; cout<<s2<<"回避了攻击"<<endl; hbgj2=1; hbgj2=1; } else if(jn2==3&&a2.jn[3]){ fd2=1; int AA=2*a2.gj-a1.fy; if(AA<0)AA=0; if(AA<0)AA=0; cout<<s1<<"受到了"; write(AA); cout<<"点毒药伤害,HP变为了"; write(a1.hp-AA);12 行未改动 } else if(jn2==5&&a2.jn[5]){ fd2=1; int AA=a2.gj; if(AA<0)AA=0; if(AA<0)AA=0; cout<<s1<<"受到了"; write(AA); cout<<"点火焰伤害,HP变为了"; write(a1.hp-AA);18 行未改动 if(fd1&&hbgj1==1); if(fd2&&hbgj2==1); if(!fd1&&!hbgj2){ int AA=a1.gj-a2.fy; if(AA<0)AA=0; if(AA<0)AA=0; cout<<s2<<"受到了"<<AA; cout<<"点伤害,HP变为了"; cout<<a2.hp-AA<<endl; a2.hp=a2.hp-AA; } } if(!fd2&&!hbgj1){ int AA=a2.gj-a1.fy; if(AA<0)AA=0; if(AA<0)AA=0; cout<<s1<<"受到了"<<AA; cout<<"点伤害,HP变为了"; cout<<a1.hp-AA<<endl; a1.hp=a1.hp-AA;3 行未改动 sleep(jg); } } else{ cout<<"第一个人的名字:"<<endl; cin>>s1; cout<<"第二个人的名字:"<<endl; cout<<"第一个人的名字:"<<endl; cin>>s1; cout<<"第二个人的名字:"<<endl; cin>>s2; cout<<"回合数"<<endl; n=read(); n=read(); if(s1==s2){ cout<<"我**********,你**********"<<endl; cout<<"我**********,你**********"<<endl; return 0; } if(s1=="mhm"){ cout<<s1<<"秒杀了"<<s2; return 0; return 0; } if(s2=="mhm"){ cout<<s2<<"秒杀了"<<s1; return 0; return 0; } int l1=s1.size()-1,l2=s2.size()-1; for(int i=0;i<=l1;i++){ if(s1[i]=='+'){59 行未改动 bool hbgj1=0,bd1=0,mh1=0,fd1=0; bool hbgj2=0,bd2=0,mh2=0,fd2=0; cout<<"第"; write(c); cout<<"回合"<<endl; cout<<"回合"<<endl; cout<<s1<<" HP:"; write(a1.hp); cout<<" 攻击:"; write(a1.gj);13 行未改动 cout<<JNzh(jn1)<<endl; if(jn1==1){ fd1=1; int AA=3*a1.gj-a2.fy*2; if(AA<0)AA=0; if(AA<0)AA=0; cout<<s2<<"受到了"; write(AA); cout<<"点暴击伤害,HP变为了"; write(a2.hp-AA);2 行未改动 } else if(jn1==2){ fd1=1; cout<<s1<<"回避了攻击"<<endl; hbgj1=1; hbgj1=1; } else if(jn1==3&&a1.jn[3]==1){ fd1=1; int AA=2*a1.gj-a2.fy; if(AA<0)AA=0; if(AA<0)AA=0; cout<<s2<<"受到了"; write(AA); cout<<"点毒药伤害,HP变为了"; write(a2.hp-AA);11 行未改动 a1.hp=a1.hp+AA; } else if(jn1==5&&a1.jn[5]==1){ fd1=1; int AA=a1.gj; int AA=a1.gj; if(AA<0)AA=0; cout<<s2<<"受到了"; write(AA); cout<<"点火焰伤害,HP变为了";22 行未改动 cout<<JNzh(jn2)<<endl; if(jn2==1){ fd2=1; int AA=3*a2.gj-a1.fy*2; if(AA<0)AA=0; if(AA<0)AA=0; cout<<s1<<"受到了"; write(AA); cout<<"点暴击伤害,HP变为了"; write(a1.hp-AA);2 行未改动 } else if(jn2==2){ fd2=1; cout<<s2<<"回避了攻击"<<endl; hbgj2=1; hbgj2=1; } else if(jn2==3&&a2.jn[3]){ fd2=1; int AA=2*a2.gj-a1.fy; if(AA<0)AA=0; if(AA<0)AA=0; cout<<s1<<"受到了"; write(AA); cout<<"点毒药伤害,HP变为了"; write(a1.hp-AA);12 行未改动 } else if(jn2==5&&a2.jn[5]){ fd2=1; int AA=a2.gj; if(AA<0)AA=0; if(AA<0)AA=0; cout<<s1<<"受到了"; write(AA); cout<<"点火焰伤害,HP变为了"; write(a1.hp-AA);18 行未改动 if(fd1&&hbgj1==1); if(fd2&&hbgj2==1); if(!fd1&&!hbgj2){ int AA=a1.gj-a2.fy; if(AA<0)AA=0; if(AA<0)AA=0; cout<<s2<<"受到了"<<AA; cout<<"点伤害,HP变为了"; cout<<a2.hp-AA<<endl; a2.hp=a2.hp-AA; } } if(!fd2&&!hbgj1){ int AA=a2.gj-a1.fy; if(AA<0)AA=0; if(AA<0)AA=0; cout<<s1<<"受到了"<<AA; cout<<"点伤害,HP变为了"; cout<<a1.hp-AA<<endl; a1.hp=a1.hp-AA;24 行未改动