Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
struct_cym
游戏编写
提交
a6d44896
游
游戏编写
项目概览
struct_cym
/
游戏编写
通知
5
Star
2
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
游
游戏编写
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a6d44896
编写于
9月 11, 2021
作者:
struct_cym
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update ao.cpp
上级
fc7e3647
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
59 addition
and
44 deletion
+59
-44
ao.cpp
ao.cpp
+59
-44
未找到文件。
ao.cpp
浏览文件 @
a6d44896
...
...
@@ -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
equip
s
();
//装备 未完成
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
();
equip
s
();
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
+=
1
0
){
for
(
int
i
=
10
0
;
i
<=
10000
;
i
+=
10
0
){
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
();
equip
s
();
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
()
%
1
0
+
1
;
int
n
=
rand
()
%
2
0
+
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录