Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
struct_cym
游戏编写
提交
fc3e1471
游
游戏编写
项目概览
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,体验更适合开发者的 AI 搜索 >>
提交
fc3e1471
编写于
11月 17, 2021
作者:
道标 · 年
🙂
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update game.cpp
上级
1f0dfe56
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
77 addition
and
75 deletion
+77
-75
game.cpp
game.cpp
+77
-75
未找到文件。
game.cpp
浏览文件 @
fc3e1471
...
...
@@ -107,9 +107,9 @@ int fang(string shengfen)
int
a3
=
(
shengfen
[
8
]
-
'0'
)
*
10
;
int
s4
=
(
shengfen
[
9
]
-
'0'
)
*
1
;
year
=
a1
+
a2
+
a3
+
s4
;
cout
<<
year
<<
endl
;
cout
<<
"你出生在:"
<<
year
<<
endl
;
int
len
=
2021
-
year
;
cout
<<
len
<<
endl
;
cout
<<
"你现在:"
<<
len
<<
endl
;
if
(
len
<
18
)
{
return
0
;
...
...
@@ -169,7 +169,7 @@ void start()
cout
<<
"Welcome to AXX"
;
cout
<<
endl
;
cout
<<
"Please wait a moment"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"请输入你的名字"
<<
endl
;
cin
>>
name
;
}
...
...
@@ -222,7 +222,7 @@ void board()
cout
<<
endl
;
cout
<<
"攻击:"
<<
attack
[
grade
]
<<
endl
;
cout
<<
"防御:"
<<
defense
[
grade
]
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"1.地图 "
<<
"2.背包 "
<<
"3.精灵箱(已删除) "
<<
"4.合成台 "
<<
"5.技能板 "
<<
endl
;
}
...
...
@@ -271,7 +271,7 @@ void maps()
lu
();
main12
();
}
else
else
if
(
option
==
9
)
{
exits
=
1
;
}
...
...
@@ -329,7 +329,7 @@ void box()
cin
>>
option
;
if
(
option
==
1
)
{
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"请输入丢弃的序号"
;
cin
>>
option
;
for
(
int
i
=
0
;
i
<
100
;
i
++
)
...
...
@@ -398,19 +398,21 @@ int main12()
skill_board
();
system
(
"cls"
);
main12
();
}
else
{
main12
();
}
}
void
lingdong
()
{
cout
<<
"欢迎来到灵洞"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"1.刷级(等级高) 2.泡温泉"
;
cin
>>
option
;
if
(
option
==
1
)
{
cout
<<
"你遇见了——"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
savage
=
rand
()
%
2
;
if
(
savage
==
0
)
{
...
...
@@ -452,9 +454,9 @@ void lingdong()
int
y1
=
boss_shanghai
(
x
);
tema
-=
y1
+
jianshang
(
defense
[
grade
]);
cout
<<
"碧水金睛兽打出了"
<<
y1
<<
"点伤害"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
name
<<
"还剩"
<<
tema
<<
"滴血"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
if
(
tema
<=
0
)
{
cout
<<
"你落败了,等级-1"
<<
endl
;
...
...
@@ -492,9 +494,9 @@ void lingdong()
temb
-=
y2
;
temb
+=
jianshang
(
temf
);
cout
<<
name
<<
"打出了"
<<
y2
<<
"点伤害"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"碧水金睛兽还剩"
<<
temb
<<
"滴血"
;
Sleep
(
500
);
Sleep
(
1
);
sum
++
;
if
(
temb
<=
0
)
{
...
...
@@ -555,9 +557,9 @@ void lingdong()
int
y1
=
boss_shanghai
(
x
);
tema
-=
y1
+
jianshang
((
int
)
defense
[
grade
]);
cout
<<
"太古龙象打出了"
<<
y1
<<
"点伤害"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
name
<<
"还剩"
<<
tema
<<
"滴血"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
if
(
tema
<=
0
)
{
cout
<<
"你落败了,等级-1"
<<
endl
;
...
...
@@ -595,9 +597,9 @@ void lingdong()
int
y2
=
shanghai
((
int
)
attack
[
grade
]);
temb
-=
y2
+
jianshang
(
temf
);
cout
<<
name
<<
"打出了"
<<
y2
<<
"点伤害"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"太古龙象还剩"
<<
temb
<<
"滴血"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
if
(
temb
<=
0
)
{
cout
<<
"你赢了"
<<
endl
;
...
...
@@ -626,11 +628,11 @@ void lingdong()
for
(
int
i
=
1
;
i
<=
times
;
i
++
)
{
cout
<<
i
<<
" "
;
Sleep
(
500
);
Sleep
(
1
);
jinyan
++
;
}
cout
<<
"你加了"
<<
times
<<
"点经验"
;
Sleep
(
500
);
Sleep
(
1
);
}
else
{
...
...
@@ -710,20 +712,20 @@ void huo()
double
temg
=
5
;
double
temf
=
0
;
cout
<<
name
<<
"开始释放技能"
;
Sleep
(
500
);
Sleep
(
1
);
for
(
int
i
=
1
;
i
<=
5
;
i
++
)
{
if
(
jineng
[
i
]
&&
i
==
1
)
{
cout
<<
"火神术--"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"焚毁!"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
temb
-=
5
*
10
+
attack
[
grade
];
cout
<<
name
<<
"打出了"
<<
5
*
10
+
attack
[
grade
]
<<
"点伤害"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"熔岩虫还剩"
<<
temb
<<
"滴血"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
if
(
temb
<=
0
)
{
cout
<<
"你赢了"
<<
endl
;
...
...
@@ -739,9 +741,9 @@ void huo()
int
y1
=
shanghai
(
x
);
tema
-=
y1
+
jianshang
((
int
)
defense
[
grade
]);
cout
<<
"熔岩虫打出了"
<<
y1
<<
"点伤害"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
name
<<
"还剩"
<<
tema
<<
"滴血"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
if
(
tema
<=
0
)
{
cout
<<
"你落败了,等级-1"
<<
endl
;
...
...
@@ -770,9 +772,9 @@ void huo()
int
y2
=
shanghai
((
int
)
attack
[
grade
]);
temb
-=
y2
+
jianshang
(
temf
);
cout
<<
name
<<
"打出了"
<<
y2
<<
"点伤害"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"熔岩虫还剩"
<<
temb
<<
"滴血"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
sum
++
;
if
(
temb
<=
0
)
{
...
...
@@ -801,14 +803,14 @@ void huo()
if
(
jineng
[
i
]
&&
i
==
1
)
{
cout
<<
"火神术--"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"焚毁!"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
temb
-=
5
*
10
+
attack
[
grade
];
cout
<<
name
<<
"打出了"
<<
5
*
10
+
attack
[
grade
]
<<
"点伤害"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"熔岩地龙还剩"
<<
temb
<<
"滴血"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
if
(
temb
<=
0
)
{
cout
<<
"你赢了"
<<
endl
;
...
...
@@ -832,9 +834,9 @@ void huo()
int
y1
=
shanghai
(
x
);
tema
-=
y1
+
jianshang
((
int
)
defense
[
grade
]);
cout
<<
"熔岩地龙打出了"
<<
y1
<<
"点伤害"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
name
<<
"还剩"
<<
tema
<<
"滴血"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
if
(
tema
<=
0
)
{
cout
<<
"你落败了,等级-1"
<<
endl
;
...
...
@@ -872,9 +874,9 @@ void huo()
}
}
cout
<<
name
<<
"打出了"
<<
y2
<<
"点伤害"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"熔岩地龙还剩"
<<
temb
<<
"滴血"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
sum
++
;
if
(
temb
<=
0
)
{
...
...
@@ -948,77 +950,77 @@ void shu()
cout
<<
"恭喜你惹怒了 树神 "
<<
endl
;
grade
++
;
cout
<<
"但是树神早已被这里隐藏的恶魔折磨的虚弱不堪"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"他想让你干掉恶魔"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"他需要你"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
if
(
attribute
[
4
]
==
2
)
{
cout
<<
"因为你是木系"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"所以你获得了树神的传承 千手顶上化佛"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
jineng
[
2
]
=
1
;
}
else
{
cout
<<
"但是因为你不是木系"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
}
cout
<<
"所以树神命令你干掉恶魔"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"(你将要遇到的树魔是最高等级的boss)"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"你是否要逃跑"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"1.逃跑 2.加把油,干掉他"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cin
>>
option
;
if
(
option
==
1
)
{
cout
<<
"你成功逃跑"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"但是树神很生气"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
shushen
=
1
;
main12
();
}
else
{
cout
<<
"树神开心的笑了"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"它很赞赏你的勇气"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"你遇到了---"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"树魔神"
<<
" "
<<
"等级:"
<<
"神阶满级"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
endl
<<
endl
;
cout
<<
"树神面色剧变"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"它已经决定让你成为继承人了 它不能让你死"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"树神"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"开始释放技能"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"神阶·千手顶上化佛"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"树魔神已被击败"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"可是树神已经奄奄一息 它已早不是神阶 这个技能耗费掉了它所有的生命"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
if
(
attribute
[
2
]
!=
1
)
{
cout
<<
"树神:我的余力已经不足以培养你了"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"我余下的力量可赋予你的就只有这些了"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"恭喜你的属性变为双属性"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"恭喜你获得技能"
<<
" "
<<
"千手顶上化佛"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
grade
++
;
attribute
[
2
]
=
1
;
jineng
[
2
]
=
1
;
...
...
@@ -1050,20 +1052,20 @@ void shu()
double
temg
=
5
;
double
temf
=
0
;
cout
<<
name
<<
"开始释放技能"
;
Sleep
(
500
);
Sleep
(
1
);
for
(
int
i
=
1
;
i
<=
5
;
i
++
)
{
if
(
jineng
[
i
]
&&
i
==
1
)
{
cout
<<
"豪火球--"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"焚毁!"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
temb
-=
5
*
10
+
attack
[
grade
];
cout
<<
name
<<
"打出了"
<<
5
*
10
+
attack
[
grade
]
<<
"点伤害"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"树魔还剩"
<<
temb
<<
"滴血"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
if
(
temb
<=
0
)
{
cout
<<
"你赢了"
<<
endl
;
...
...
@@ -1136,9 +1138,9 @@ void shu()
int
y1
=
shanghai
(
x
);
tema
-=
y1
+
jianshang
((
int
)
defense
[
grade
]);
cout
<<
"树魔打出了"
<<
y1
<<
"点伤害"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
name
<<
"还剩"
<<
tema
<<
"滴血"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
if
(
tema
<=
0
)
{
cout
<<
"你落败了,等级-1"
<<
endl
;
...
...
@@ -1151,14 +1153,14 @@ void shu()
if
(
jineng
[
i
]
&&
i
==
1
&&
sum
%
5
==
0
)
{
cout
<<
"豪火球--"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"焚毁!"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
temb
-=
5
*
10
+
attack
[
grade
];
cout
<<
name
<<
"打出了"
<<
5
*
10
+
attack
[
grade
]
<<
"点伤害"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"树魔还剩"
<<
temb
<<
"滴血"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
if
(
temb
<=
0
)
{
cout
<<
"你赢了"
<<
endl
;
...
...
@@ -1228,9 +1230,9 @@ void shu()
int
y2
=
shanghai
((
int
)
attack
[
grade
]);
temb
-=
y2
+
jianshang
(
temf
);
cout
<<
name
<<
"打出了"
<<
y2
<<
"点伤害"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
cout
<<
"树魔还剩"
<<
temb
<<
"滴血"
<<
endl
;
Sleep
(
500
);
Sleep
(
1
);
sum
++
;
if
(
temb
<=
0
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录