提交 a6d44896 编写于 作者: struct_cym's avatar struct_cym

Update ao.cpp

上级 fc7e3647
......@@ -11,6 +11,7 @@ option:通用选择
*/
#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <string>
......@@ -26,7 +27,7 @@ void board();
void maps();
void bag();//bug 可以先看一下,不知道出了什么问题
void box();
void equip();//装备 未完成
void equips();//装备 未完成
void skill_board();//技能板 未完成
void lingdong();
void zhanchang();//未完成
......@@ -37,8 +38,10 @@ void jin();//未完成
void shu();//未完成
void lu();//未完成
void equip_bag();//未完成
int shanghai(int gong);
int jianshang(int fang);
int shanghai(double gong);
int jianshang(double fang);
int boss_shanghai(double gong);
void pretreatment();
const int N=1e3+10;
......@@ -72,10 +75,8 @@ string head,body,trousers,shoes;
int main(){
if(exits==1){
return 0;
}
start();
pretreatment();
cout<<endl<<"请输入你所要的属性"<<endl;
cout<<"1.金 2.木 3.水 4.火 5.土";
cin>>attribute;
......@@ -94,7 +95,7 @@ int main(){
box();
main12();
}else if(option==4){
equip();
equips();
main12();
}else if(option==5){
skill_board();
......@@ -114,7 +115,7 @@ void start(){
void pretreatment(){
int num=1;
for(int i=10;i<=110;i+=10){
for(int i=100;i<=10000;i+=100){
blood[num]=i;
experience[num]=i;
num++;
......@@ -122,13 +123,12 @@ void pretreatment(){
for(int i=1;i<=100;i++){
bags[i-1].cnn=i;
}
}
void board(){
cout<<endl<<endl<<endl;
cout<<"姓名:"<<name<<endl;
cout<<"境界"; //暂不开放
cout<<"境界"<<endl; //暂不开放
cout<<"等级:"<<grade<<endl;
cout<<"血量:"<<blood[grade]<<endl;
cout<<"属性:";
......@@ -244,6 +244,9 @@ int main12(){
grade++;
jinyan-=experience[grade-1];
}
if(exits==1){
return 0;
}
board();
cin>>option;
if(option==1){
......@@ -259,7 +262,7 @@ int main12(){
box();
main12();
}else if(option==4){
equip();
equips();
main12();
}else if(option==5){
skill_board();
......@@ -277,71 +280,82 @@ void lingdong(){
Sleep(1000);
savage=rand()%2;
if(savage==0){
int x=rand()%(100-80+1)+80;
cout<<"碧水金睛兽"<<" "<<"等级:"<<x;
double x=rand()%(100-80+1)+80;
cout<<"碧水金睛兽"<<" "<<"等级:"<<x<<endl;
int tema=blood[grade];
int temb=blood[x];
int temb=blood[(int)x];
double temg=attack*1.5;
double temf=defense*1.5;
while(true){
int y1=boss_shanghai(x);
tema-=y1+jianshang(defense);
cout<<"碧水金睛兽打出了"<<y1<<"点伤害"<<endl;
cout<<name<<"还剩"<<tema<<"滴血";
Sleep(1000);
cout<<name<<"还剩"<<tema<<"滴血"<<endl;
Sleep(1000);
if(tema<=0){
cout<<"你落败了,等级-1";
cout<<"你落败了,等级-1"<<endl;
grade--;
return;
}
int y2=shanghai(attack);
temb-=y2+jianshang(temf);
temb-=y2;
temb+=jianshang(temf);
cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
Sleep(1000);
cout<<"碧水金睛兽还剩"<<temb<<"滴血";
Sleep(1000);
if(temb<=0){
cout<<"你赢了";
int n=rand()%10+1;
int n=rand()%20+1;
if(n==1){
cout<<",你获得了碧水金睛兽一只";
}else{
cout<<",你获得了碧水珠";
}
jinyan+=(double)experience[x]/10;
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}else if(savage==1){
int x=rand()%(100-80+1)+80;
cout<<"太古龙象"<<" "<<"等级:"<<x;
double x=rand()%(100-80+1)+80;
cout<<"太古龙象"<<" "<<"等级:"<<x<<endl;
int tema=blood[grade];
int temb=blood[x];
int temb=blood[(int)x];
double temg=attack*1.5;
double temf=defense*1.5;
while(true){
int y1=boss_shanghai(x);
tema-=y1+jianshang(defense);
tema-=y1+jianshang((int)defense);
cout<<"太古龙象打出了"<<y1<<"点伤害"<<endl;
cout<<name<<"还剩"<<tema<<"滴血";
Sleep(1000);
cout<<name<<"还剩"<<tema<<"滴血"<<endl;
Sleep(1000);
if(tema<=0){
cout<<"你落败了,等级-1";
cout<<"你落败了,等级-1"<<endl;
grade--;
return;
}
int y2=shanghai(attack);
cout<<endl;
int y2=shanghai((int)attack);
temb-=y2+jianshang(temf);
cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
cout<<"太古龙象还剩"<<temb<<"滴血";
Sleep(1000);
cout<<"太古龙象还剩"<<temb<<"滴血"<<endl;
Sleep(1000);
if(temb<=0){
cout<<"你赢了";
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1){
cout<<",你获得了太古龙象一只";
cout<<",你获得了太古龙象一只"<<endl;
//加坐骑的属性
}else{
cout<<",你获得了 龙象牙";
cout<<",你获得了 龙象牙"<<endl;
}
jinyan+=(double)experience[x]/10;
jinyan+=(double)experience[(int)x]/10;
return;
}
cout<<endl;
}
}
}else if(option==2){
......@@ -350,15 +364,16 @@ void lingdong(){
for(int i=0;i<times;i++){
cout<<i<<" ";
Sleep(1000);
jinyan++;
}
}else{
exits=1;
return;
}
}
//void equip(){
void equips(){
cout<<"暂时为空";
// cout<<"头部:"<<head<<endl;
// cout<<"胸甲:"<<body<<endl;
// cout<<"裤子:"<<trousers<<endl;
......@@ -378,7 +393,7 @@ void lingdong(){
// }
//
// }
//}
}
void equip_bag(){
cout<<"暂时为空";
......@@ -388,9 +403,9 @@ void skill_board(){
cout<<"暂时为空";
}
//void zhanchang(){
// cout<<"暂时为空";
//}
void zhanchang(){
cout<<"删除";
}
void shenming(){
cout<<"暂时为空";
......@@ -404,17 +419,17 @@ void bin(){
cout<<"暂时为空";
}
//void jin(){
// cout<<"暂时为空";
//}
void jin(){
cout<<"删除";
}
void shu(){
cout<<"暂时为空";
}
//
//void lu(){
// cout<<"暂时为空";
//}
void lu(){
cout<<"删除";
}
int shanghai(double gong){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册