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安全函数phpinfo()
phpinfo() 功能描述:输出 PHP 环境信息以及相关的模块.WEB 环境等信息. 危险等级:中 passthru() 功能描述:允许执行一个外部程序并回显输出,类似于 exec(). 危险等级 ...
- mongo VUE 操作
一 修改字段名称 db.rc_配置_付款限额_消费.update({ "生效标识" : 1, "$atomic" : "true" },{ ...
- ecshop搜索出现相关商品的效果滑动下拉效果
ecshop搜索栏效果如下 所需要的样式我们可以复制到style.css里: /*搜索滑动效果*/ .Menu { position:absolute; top:30px; left:7px; wid ...
- ECshop中TemplateBeginEditable 和后台编辑讲解
在ecshop的dwt文件里面经常发现有“<!-- TemplateBeginEditable name="doctitle" -->和<!-- #BeginLi ...
- [UML]转:UML类图集中关系的总结
转:http://blog.csdn.net/dragonpeng2008/article/details/6836448 在UML类图中,常见的有以下几种关系: 泛化(Generalization) ...
- 利用Selenium自动化web测试
简介: Selenium 是一个没有正式指导手册的开源项目,这让测试人员的问题调查很费时间.本文为基于 Selenium 1.0(发布于 2009 年 6 月)的测试期间的常见问题提供最佳实践. 简介 ...
- 如何在 Eclipse 中连接源码
1:首先在window 中 打开首选项(preferences) 找到如下java -- 已安装的JRE
- Java学习之路(五)
1:补充: 使用super也可以调用父类的成员函数 格式 : super.函数名(); 2:抽象类与抽象函数 抽象函数的定义: 只有函数的定义,没有函数体的函数被称为抽象函数 抽象类的定义: 使用 ...
- tensorflow安装
Ubuntu安装tensorflow先安装python-dev,再安装tensorflow就好了$ sudo apt-get install python-dev$ pip install https ...
- C++实现的屏幕截图软件 v1.0
之前用win32做的屏幕截图软件,使用了好久,非常好用. 在2.0版本中增加了屏幕尺和颜色拾取功能,并且改用屏幕和内存DC双缓冲,彻底消灭了闪屏,可惜代码丢失了 好不容易找到1.0版本的代码,以后再重 ...