Doragon Kuesuto 1.0
#include<stdio.h>
#include<stdlib.h>
#include<time.h> int main()
{
int bloodD = ;
int bloodW = ;
int MP = ;
int action;
int tmp = ;
int tmp2 = ;
int score = ;
int round = ;
printf("Update by xkfx ( E-mail: wyzxk_fx@163.com ) 2016-10-26\n");
srand((int)time());
for(round = ; round <= ; round ++){
srand(rand());
//输出回合数
printf("---Details above------ Round - %d -----\n", round);
//输出恶龙血量
printf("<Deathwing> \n");
printf("HP = %d , MP = ??? \n", bloodD);
//输出勇者血量 与 MP
printf("<Warrior> \n");
printf("HP = %d , MP = %d \n", bloodW, MP);
printf("---------------------------------------\n");
//输出勇者的技能列表
//printf("\n");
printf("YOUR ACTIONS:\n");
printf(" 1 --- ATTACK --- 20 MP\n");
printf(" 2 --- DEFENSE --- 10 MP\n");
printf(" 3 --- GATHER STRENGTH --- 0 MP \n");
printf(" 4 -SWORD OF JUDGEMENT --- ALL HP \n");
printf("> Warrior , please choose your action:");
//选择下一步行动
scanf("%d", &action);
//计算下一回合数据
switch(action){
case :
tmp = + rand()%;
bloodD = bloodD - tmp - tmp2;
MP = MP - ;
printf("\nYour cause %d damage !\n", tmp+tmp2);
score = score + tmp+tmp2;
tmp2 = ;
break;
case :
tmp = + rand()%;
bloodW = bloodW + tmp;
MP = MP - ;
printf("\nYour recovery %d HP !\n", tmp);
break;
case :
tmp2 = tmp2 + rand()%;
printf("\nWarrior:I will find you and I will kill you...\n");
break;
case :
bloodW = ;
tmp = + rand()%;
score = score + tmp;
bloodD = bloodD - tmp;
printf("\nWarrior:SWORD OF JUDGEMENT!!!\n");
printf("Your cause %d damage !\n", tmp);
break;
default:
break;
}
printf("Deathwing:All will burn!\n");
tmp = +rand()%;
printf("You got a few injuries - %d HP\n", tmp);
bloodW = bloodW - tmp;
if((bloodD < ) || (bloodW < ))
break;
}
if(bloodD < && bloodW > ){
printf("...\n");
printf("......\n");
printf("You have kill the Dragon!\n");
printf(".....\n");
printf("What a brave Warrior!");
printf("Your final score: %d\n", + (-round)*+score);
printf("......\n");
}else if(bloodW < && bloodD > ){
printf("...\n");
printf("......\n");
printf("GAME OVER");
printf("Your final score: %d\n", round* +score);
}else
printf("The game ended in a draw");
//system("pause");
return ;
}
更多版本:
Doragon Kuesuto 1.0的更多相关文章
- Doragon Kuesuto 1.15
#include<stdio.h> #include<stdlib.h> #include<time.h> int main() { ; ; ; int actio ...
- Doragon Kuesuto 1.6
/* * <<D Q>> * * Author xkfx<wyzxk_fx@163.com> * * 游戏规则:利用适当的决策,在13回合内击杀恶龙取得胜利. * ...
- FIRST GAME.
-Doragon Kuesuto(.c) Doragon Kuesuto 1.0 Doragon Kuesuto 1.15 Doragon Kuesuto 1.6
- ZAM 3D 制作简单的3D字幕 流程(二)
原地址:http://www.cnblogs.com/yk250/p/5663907.html 文中表述仅为本人理解,若有偏差和错误请指正! 接着 ZAM 3D 制作简单的3D字幕 流程(一) .本篇 ...
- ZAM 3D 制作3D动画字幕 用于Xaml导出
原地址-> http://www.cnblogs.com/yk250/p/5662788.html 介绍:对经常使用Blend做动画的人来说,ZAM 3D 也很好上手,专业制作3D素材的XAML ...
- 微信小程序省市区选择器对接数据库
前言,小程序本身是带有地区选着器的(网站:https://mp.weixin.qq.com/debug/wxadoc/dev/component/picker.html),由于自己开发的程序的数据是很 ...
- osg编译日志
1>------ 已启动全部重新生成: 项目: ZERO_CHECK, 配置: Debug x64 ------1> Checking Build System1> CMake do ...
- 【AR实验室】OpenGL ES绘制相机(OpenGL ES 1.0版本)
0x00 - 前言 之前做一些移动端的AR应用以及目前看到的一些AR应用,基本上都是这样一个套路:手机背景显示现实场景,然后在该背景上进行图形学绘制.至于图形学绘制时,相机外参的解算使用的是V-SLA ...
- Elasticsearch 5.0 中term 查询和match 查询的认识
Elasticsearch 5.0 关于term query和match query的认识 一.基本情况 前言:term query和match query牵扯的东西比较多,例如分词器.mapping ...
随机推荐
- PHP中关于 basename、dirname、pathinfo 详解
basename(url) 返回路径中的文件名部分. dirname(url) 返回路径中的目录名称部分. pathinfo(url) 返回关于文件路径的信息. bas ...
- easyui常现错误
1.easyui-tabs:当data-options的属性设置为true时,其tab内部的内容显示不出来. 2.设置easyui-panel的title格式及字体大小无效 解决方法:在设置title ...
- symfony中twig的模板过滤器
过滤器 变量可以被过滤器修饰.过滤器和变量用(|)分割开.过滤器也是可以有参数的.过滤器也可以被多重使用. 通用过滤器 date过滤器 1.1版本新增时区支持,1.5版本增加了默认的日期格式.格式化时 ...
- html+css复习之第2篇 | javascript
1. java 中定义数组和对象: 数组(Array)字面量 定义一个数组: [40, 100, 1, 5, 25, 10] 对象(Object)字面量 定义一个对象: {firstName:&quo ...
- C#递归1~100的累加
public static int Accum(int m, int n) { //对于接受的参数,要考虑m >n,m=n,m<n三种情况. if (m < n) { return ...
- [转]Unity: make your lists functional with ReorderableList
原文地址:http://va.lent.in/unity-make-your-lists-functional-with-reorderablelist/ This article is reprod ...
- LINUX 产生PPM 驱动例子
APP: //author:DriverMonkey //phone:13410905075 //mail:bookworepeng@Hotmail.com //qq:196568501 #inclu ...
- 批发网加盟页面轮播Jquery jcarousellite插件效果
Jquery jcarousellite 插件的好处 其中: 参数说明: btnPrev string 上一个按钮的class名, 比如 btnPrev: ".prev" ...
- hdu 3826
Squarefree number Time Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Other ...
- ie调试工具
调试ie6真是疯掉了,要到一个包,类firbug,js写的不错. 链接:http://pan.baidu.com/s/1c2JOs0K 密码:fea8