欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

基于C语言开发的双人回合制拳皇游戏(Turn-Based KOF)

程序员文章站 2022-04-07 17:21:51
...


游戏有三个主要的代码文件:main.c/game.h/game. c
开发环境:VS2017
开发语言:C
版本号:v1.0.11

基于C语言开发的双人回合制拳皇游戏(Turn-Based KOF)

1) main.c

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<Windows.h>
#include"game.h"

void main(void)
{
	DosSize();								//创建特定分辨率的DOS窗口
	system("color f0");						//修改DOS背景色和字体色
	SetConsoleTitle("Turn-Based KOF");		//修改DOS窗口title

	char start_choice;
	static char back_choice;
	
	while (1)
	{
		WindowSize(7);		//创建主界面窗口

		SetPosition(LEFT_DISTANCE + 14, 2);
		printf("TURN-BASED KOF");
		SetPosition(LEFT_DISTANCE + 6, 4);
		printf("[1]开始游戏");
		SetPosition(LEFT_DISTANCE + 24, 4);
		printf("[2]游戏介绍");
		SetPosition(LEFT_DISTANCE + 6, 6);
		printf("[3]制作名单");
		SetPosition(LEFT_DISTANCE + 24, 6);
		printf("[4]退出游戏");

		SetPosition(LEFT_DISTANCE + 0, 9);		//移动光标至界面外

		fflush(stdin);			//清空缓冲区
		start_choice = getch();

		system("cls");

		switch (start_choice)
		{
			case '1':
				StartGame();
				system("cls");
				break;
			case '2':
				GameIntroduction();
				SetPosition(LEFT_DISTANCE + 4, 6);
				BackMenu(back_choice);
				break;
			case '3':
				MakerList();
				SetPosition(LEFT_DISTANCE + 4, 6);
				BackMenu(back_choice);
				break;
			case '4':
				ExitGame();
				break;
			case '5':
				ShowEgg();
				SetPosition(LEFT_DISTANCE + 4, 4);
				BackMenu(back_choice);
				system("color f0");
				break;
			default:
				system("cls");
				printf("非法输入!\n");
				break;
		}
	}
	system("pause");
}

2) game.c

/*//////////////////////////////////////////
//                                        //
//				函数的实现				  //
//                                        //
//////////////////////////////////////////*/

#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<Windows.h>
#include"game.h"

//{id, 姓名, 血量, 防御, 怒气值, {一技能名称, 一技能攻击力, 二技能名称, 二技能伤害}, 普通攻击伤害, 恢复能力}
struct people peoples[] = {		//定义人物属性
	{1001, "草薙京", 85, 4, 0, {"草薙流古武术", 15, "我流拳法", 16}, 11, 4},			//高攻击,低血量
	{1002, "大门五郎",100, 8, 0, {"柔道", 8, "我流格斗术",9}, 6, 7},					//高防御,高恢复能力,低攻击
	{1003, "哈迪伦", 130, 2, 0, {"MARTIAL ARTS", 13, "我流暗杀术", 14}, 10, 4},		//高血量,低防御
	{1004, "拉尔夫琼斯", 100, 4, 15, {"军技拳", 10, "哈迪伦流暗杀术", 11}, 8, 4}		//初始怒气值高,低攻击
};
int count = 4;//人数数量,增减人物时要记得更新

void StartGame()				//游戏开始函数
{
	int turnCount = 0;			//轮数计数变量

	int dice_1 = -1;			//玩家一的点数
	int dice_2 = -1;			//玩家二的点数
	
	int peopleChoice_1;			//玩家1对于人物的选择,用于转换
	int peopleChoice_2;			//玩家2对于人物的选择,用于转换

	SetPosition(LEFT_DISTANCE, 34);
	printf("玩家一选择人物:");
	SetPosition(LEFT_DISTANCE + 10, 34);
	peopleChoice_1 = SelectPeople();
	system("cls");
	
	SetPosition(LEFT_DISTANCE, 34);
	printf("玩家二选择人物:");
	do
	{
		peopleChoice_2 = SelectPeople();
		if (peopleChoice_1 != peopleChoice_2)
			break;
		else
		{
			SetPosition(LEFT_DISTANCE, 35);
			printf("人物不能选择重复!\n");
			continue;
		}
	}while(1);

	system("cls");
	PrintFrame();
	SetPosition(48, 31);
	printf("玩家一选择了%s", peoples[peopleChoice_1 - 1].name);
	SetPosition(48, 32);
	printf("玩家二选择了%s", peoples[peopleChoice_2 - 1].name);
	SetPosition(48, 34);
	printf("下面开始掷骰子来决定谁先攻击:");
	SetPosition(48, 36);
	system("pause");

	while (dice_1 == dice_2)
	{
		srand((unsigned int)time(NULL));
		dice_1 = rand() % 6 + 1;
		dice_2 = rand() % 6 + 1;
	}
	
	system("cls");
	PrintFrame();
	
	SetPosition(48, 31);
	printf("%s的点数为%d!", peoples[peopleChoice_1 - 1].name, dice_1);
	SetPosition(48, 32);
	printf("%s的点数为%d!", peoples[peopleChoice_2 - 1].name, dice_2);
	
	if (dice_1 > dice_2)
	{
		SetPosition(48, 34);
		printf("%s先攻击!", peoples[peopleChoice_1 - 1].name);
	}
	else
	{
		SetPosition(48, 34);
		printf("%s先攻击!", peoples[peopleChoice_2 - 1].name);
	}
	
	SetPosition(48, 36);
	system("pause");

	double peopleHP_1 = peoples[peopleChoice_1 - 1].hp;									//玩家一的血量
	double peopleHP_2 = peoples[peopleChoice_2 - 1].hp;									//玩家二的血量
	
	while (peopleHP_1 > 0 && peopleHP_2 > 0)		//好戏开始
	{
		if (dice_1 > dice_2)
		{
			system("cls");
			PrintFrame();
			SetPosition(2, 31);
			printf("第%d轮",turnCount + 1);
			
			PeopleFight(&peopleHP_1, &peopleHP_2, &peoples[peopleChoice_1 - 1].angryValue, &peoples[peopleChoice_2 - 1].angryValue, peopleChoice_1, peopleChoice_2, &turnCount);
			if (peopleHP_1 <= 0)//防止玩家血量出现负数
			{
				peopleHP_1 = 0;
				break;
			}
			if (peopleHP_2 <= 0)
			{
				peopleHP_2 = 0;
				break;
			}
			PrintBloodValue(&peopleHP_1, &peopleHP_2, peopleChoice_1, peopleChoice_2);
			
			SetPosition(48, 38);
			system("pause");
			system("cls");
			PrintFrame();
			SetPosition(2, 31);
			printf("第%d轮", turnCount + 1);
			turnCount++;
			
			PeopleFight(&peopleHP_2, &peopleHP_1, &peoples[peopleChoice_2 - 1].angryValue, &peoples[peopleChoice_1 - 1].angryValue, peopleChoice_2, peopleChoice_1, &turnCount);
			if (peopleHP_1 <= 0)//防止玩家血量出现负数
			{
				peopleHP_1 = 0;
				break;
			}
			if (peopleHP_2 <= 0)
			{
				peopleHP_2 = 0;
				break;
			}
			PrintBloodValue(&peopleHP_1, &peopleHP_2, peopleChoice_1, peopleChoice_2);
		
			SetPosition(48, 38);
			system("pause");
		}

		if (dice_1 < dice_2)
		{
			system("cls");
			PrintFrame();
			SetPosition(2, 31);
			printf("第%d轮", turnCount + 1);
			
			PeopleFight(&peopleHP_2, &peopleHP_1, &peoples[peopleChoice_2 - 1].angryValue, &peoples[peopleChoice_1 - 1].angryValue, peopleChoice_2, peopleChoice_1, &turnCount);
			if (peopleHP_1 <= 0)//防止玩家血量出现负数
			{
				peopleHP_1 = 0;
				break;
			}
			if (peopleHP_2 <= 0)
			{
				peopleHP_2 = 0;
				break;
			}
			PrintBloodValue(&peopleHP_1, &peopleHP_2, peopleChoice_1, peopleChoice_2);
			
			SetPosition(48, 38);
			system("pause");
			system("cls");
			PrintFrame();
			SetPosition(2, 31);
			printf("第%d轮", turnCount + 1);
			turnCount++;

			PeopleFight(&peopleHP_1, &peopleHP_2, &peoples[peopleChoice_1 - 1].angryValue, &peoples[peopleChoice_2 - 1].angryValue, peopleChoice_1, peopleChoice_2, &turnCount);
			if (peopleHP_1 <= 0)//防止玩家血量出现负数
			{
				peopleHP_1 = 0;
				break;
			}
			if (peopleHP_2 <= 0)
			{
				peopleHP_2 = 0;
				break;
			}
			PrintBloodValue(&peopleHP_1, &peopleHP_2, peopleChoice_1, peopleChoice_2);
		
			SetPosition(48, 38);
			system("pause");
		}

	}//好戏结束
	
	PrintBloodValue(&peopleHP_1, &peopleHP_2, peopleChoice_1, peopleChoice_2);
	SetPosition(48, 37);
	if (peopleHP_1 > peopleHP_2)
		printf("%s倒地以后就没有动弹,%s获得胜利!", peoples[peopleChoice_2 - 1].name, peoples[peopleChoice_1 - 1].name);
	if (peopleHP_1 == peopleHP_2)
		printf("biubiu~ 双方同时倒地了!");
	if (peopleHP_1 < peopleHP_2)
		printf("%s倒地以后就没有动弹,%s获得胜利!", peoples[peopleChoice_1 - 1].name, peoples[peopleChoice_2 - 1].name);
	
	SetPosition(48, 38);
	system("pause");
}

void GameIntroduction()		//游戏介绍函数
{
	WindowSize(7);

	SetPosition(LEFT_DISTANCE + 4, 2);
	printf("Name:TURN-BASED KOF");
	SetPosition(LEFT_DISTANCE + 4, 3);
	printf("开发环境:VS2017");
	SetPosition(LEFT_DISTANCE + 4, 4);
	printf("开发语言:C");

}

void MakerList()			//制作者名单函数
{
	WindowSize(7);

	SetPosition(LEFT_DISTANCE + 4, 2);
	printf("制作者:UP");
	SetPosition(LEFT_DISTANCE + 4, 3);
	printf("更新日期:2019/5/31");
	SetPosition(LEFT_DISTANCE + 4, 4);
	printf("版本号:v1.0.11");
}

void ExitGame()				//游戏退出函数
{
	exit(NULL);
}

int SelectPeople()
{
	int i;
	char charPeopleChoice;	//玩家一人物选择
	int peopleChoice;		//玩家1对于人物的选择,用于转换
	
	SetPosition(LEFT_DISTANCE, 0);
	printf("人物选择如下:\n\n");
	SetPosition(LEFT_DISTANCE, 1);
	PrintBar();
	for (i = 0; i < count; i++)//打印人物列表
	{
		SetPosition(LEFT_DISTANCE, i * 8 + 3);
		printf("[%d]%s\n", i + 1, peoples[i].name);
		SetPosition(LEFT_DISTANCE, i * 8 + 4);
		printf("   血量:%.1lf\t     ", peoples[i].hp);
		printf("   防御力:%.1lf\n", peoples[i].defense);
		SetPosition(LEFT_DISTANCE, i * 8 + 5);
		printf("   怒气值:%.1lf\t     ", peoples[i].angryValue);
		printf("   恢复能力:%.1lf\n", peoples[i].getWell);
		SetPosition(LEFT_DISTANCE, i * 8 + 6);
		printf("   %-16s\t伤害:%.1lf\n", peoples[i].movement_1, peoples[i].harm_1);
		SetPosition(LEFT_DISTANCE, i * 8 + 7);
		printf("   %-16s\t伤害:%.1lf\n", peoples[i].movement_2, peoples[i].harm_2);
		SetPosition(LEFT_DISTANCE, i * 8 + 8);
		printf("   普通攻击伤害:%.1lf\n\n", peoples[i].attack);
		SetPosition(LEFT_DISTANCE, i * 8 + 9);
		PrintBar();
	}

	while (1)
	{
		fflush(stdin);
		charPeopleChoice = getch();

		switch (charPeopleChoice)
		{
		case '1':
			peopleChoice = 1;
			break;
		case '2':
			peopleChoice = 2;
			break;
		case '3':
			peopleChoice = 3;
			break;
		case '4':
			peopleChoice = 4;
			break;
		default:
			break;
		}

		if (charPeopleChoice == '1' || charPeopleChoice == '2' || charPeopleChoice == '3' || charPeopleChoice == '4')
			break;
		if (charPeopleChoice != '1' || charPeopleChoice != '2' || charPeopleChoice != '3' || charPeopleChoice != '4')
			printf("输入错误!请重新输入!\n");
	}
	
	return peopleChoice;
}

void PrintBar()			//打印游戏中的分割线
{
	int i;
	printf("+");
	for (i = 0; i < 40; i++)
		printf("=");
	printf("+\n");
}

void PrintFrame()
{
	int i;
	SetPosition(0, 30);
	printf("++=============================================+=============================================++\n");
	for (i = 0; i < 8; i++)
	{
		printf("||\t\t\t\t\t       |\t\t\t\t\t     ||\n");
	}
	printf("++=============================================+=============================================++\n");
}

void BackMenu(char back_choice)		//返回主菜单函数
{
	printf("[0]返回主菜单");
	while (1)
	{
		fflush(stdin);
		back_choice = getch();
		
		if (back_choice == '0')
		{
			system("cls");
			break;
		}
		else
			continue;
	}
}

void ShowEgg()				//彩蛋函数
{
	system("color C0");
	WindowSize(5);
	
	SetPosition(LEFT_DISTANCE + 4, 2);
	printf("他...如同死神再生...");

	double *harm_1;					//改变技能一攻击力
	harm_1 = &peoples[0].harm_1;
	*harm_1 = 99999;
	
	double *harm_2;					//改变技能二攻击力
	harm_2 = &peoples[0].harm_2;
	*harm_2 = 99999;

	double *attack;					//改变普通攻击攻击力
	attack = &peoples[0].attack;
	*attack = 99999;
}

void DosSize()			//DOS窗口分辨率修改函数
{
	HWND h;
	char szConsoleTitle[100];
	GetConsoleTitle(szConsoleTitle, 100);
	h = FindWindow(NULL, szConsoleTitle);
	SetWindowPos(h, HWND_TOP, 350, 100, 800, 700, SWP_SHOWWINDOW);
}

void WindowSize(int width_y)			//界面窗口创建函数
{
	int i;
	
	SetPosition(LEFT_DISTANCE, 0);
	PrintBar();
	for (i = 0;i < width_y;i++)
	{
		SetPosition(LEFT_DISTANCE, i + 1);
		printf("|\t\t\t\t\t    |\n");
	}
	SetPosition(LEFT_DISTANCE, width_y + 1);
	PrintBar();
}

void SetPosition(int x, int y)			//光标位置固定函数
{
	HANDLE winHandle;	//句柄
	COORD position = { x, y };
	winHandle = GetStdHandle(STD_OUTPUT_HANDLE);
	SetConsoleCursorPosition(winHandle, position);
}

void SetColor(int foreColor, int backColor)		//语句颜色,背景色设置函数
{
	/*
	 *0 - 黑色;1 - 蓝色;   2 - 绿色;   3 - 浅绿色;  4 - 红色;   5 - 紫色;   6 - 黄色;   7 - 白色;
	 *8 - 灰色;9 - 浅蓝色;10 - 淡绿色;11 - 淡浅绿色;12 - 淡红色;13 - 淡紫色;14 - 淡黄色;15 - 亮白色
	 */
	HANDLE winHandle;		//句柄
	winHandle = GetStdHandle(STD_OUTPUT_HANDLE);
	SetConsoleTextAttribute(winHandle, foreColor + backColor * 0x10);//设置文字颜色
}

void PeopleFight(double *ptr_HP_1, double *ptr_HP_2, double *ptr_peopleAngryValue_1, double *ptr_peopleAngryValue_2, int peopleChoice_1, int peopleChoice_2, int *turnCount)
{
	char charMovementChoice;
	int movementChoice;
	
	if (*ptr_peopleAngryValue_1 >= 100)
	{
		SetPosition(48, 31);
		printf("%s抛出了一片二向箔!", peoples[peopleChoice_1 - 1].name);
		SetPosition(48, 32);
		printf("忽略了%s的防御!额外打出了%.1lf点伤害!", peoples[peopleChoice_2 - 1].name, peoples[peopleChoice_1 - 1].attack * 1.5);
		*ptr_HP_2 -= (peoples[peopleChoice_1 - 1].attack * 1.5);
		*ptr_peopleAngryValue_1 = 0;
		
		SetPosition(48, 38);
		system("pause");
		system("cls");
		PrintFrame();
		SetPosition(2, 31);
		printf("第%d轮", *turnCount + 1);
	}

	SetPosition(14, 33);
	printf("%s选择招式:\n\n", peoples[peopleChoice_1 - 1].name);
	SetPosition(2, 35);
	printf("\t[1]%-12s\t[2]%-12s", peoples[peopleChoice_1 - 1].movement_1, peoples[peopleChoice_1 - 1].movement_2);
	SetPosition(2, 37);
	printf("\t[3]普通攻击\t[4]血量恢复");

	do
	{
		fflush(stdin);
		charMovementChoice = getch();
		
		switch (charMovementChoice)
		{
		case '1':
			movementChoice = 1;
			break;
		case '2':
			movementChoice = 2;
			break;
		case '3':
			movementChoice = 3;
			break;
		case '4':
			movementChoice = 4;
			break;
		default:
			break;

		}
		if (charMovementChoice == '1' || charMovementChoice == '2' || charMovementChoice == '3' || charMovementChoice == '4')
			break;
		if (charMovementChoice != '1' || charMovementChoice != '2' || charMovementChoice != '3' || charMovementChoice != '4')
		{
			SetPosition(48, 31);
			printf("输入错误!");
		}
	} while (1);

	switch (movementChoice)//1.招式一 2.招式二 3.普通攻击 4.血量恢复
	{
	case 1:
		SetPosition(48, 31);
		printf("%s选择了%s!", peoples[peopleChoice_1 - 1].name, peoples[peopleChoice_1 - 1].movement_1);
		SetPosition(48, 33);
		printf("打出了%.1lf点伤害!", peoples[peopleChoice_1 - 1].harm_1 - peoples[peopleChoice_2 - 1].defense * 0.5);
		*ptr_HP_2 -= (peoples[peopleChoice_1 - 1].harm_1 - peoples[peopleChoice_2 - 1].defense * 0.5);
		*ptr_peopleAngryValue_2 += (peoples[peopleChoice_1 - 1].harm_1 - peoples[peopleChoice_2 - 1].defense * 0.5) * 1.5;
		break;
	case 2:
		SetPosition(48, 31);
		printf("%s选择了%s!", peoples[peopleChoice_1 - 1].name, peoples[peopleChoice_1 - 1].movement_2);
		SetPosition(48, 33);
		printf("打出了%.1lf点伤害!", peoples[peopleChoice_1 - 1].harm_2 - peoples[peopleChoice_2 - 1].defense * 0.5);
		*ptr_HP_2 -= (peoples[peopleChoice_1 - 1].harm_2 - peoples[peopleChoice_2 - 1].defense * 0.5);
		*ptr_peopleAngryValue_2 += (peoples[peopleChoice_1 - 1].harm_2 - peoples[peopleChoice_2 - 1].defense * 0.5) * 1.5;
		break;
	case 3:
		SetPosition(48, 31);
		printf("%s选择了普通攻击!", peoples[peopleChoice_1 - 1].name);
		SetPosition(48, 33);
		printf("打出了%.1lf点伤害!", peoples[peopleChoice_1 - 1].attack - peoples[peopleChoice_2 - 1].defense * 0.5);
		*ptr_HP_2 -= (peoples[peopleChoice_1 - 1].attack - peoples[peopleChoice_2 - 1].defense * 0.5);
		*ptr_peopleAngryValue_2 += (peoples[peopleChoice_1 - 1].attack - peoples[peopleChoice_2 - 1].defense * 0.5) * 1.5;
		break;
	case 4:
		SetPosition(48, 31);
		printf("%s选择了血量恢复!", peoples[peopleChoice_1 - 1].name);
		if ((*ptr_HP_1 + peoples[peopleChoice_1 - 1].getWell) <= peoples[peopleChoice_1 - 1].hp)
		{
			SetPosition(48, 33);
			printf("%s恢复了%.1lf点血量!", peoples[peopleChoice_1 - 1].name, peoples[peopleChoice_1 - 1].getWell);
			*ptr_HP_1 += peoples[peopleChoice_1 - 1].getWell;
		}
		else
		{
			SetPosition(48, 33);
			printf("恢复失败!\n%s回合跳过!\n\n", peoples[peopleChoice_1 - 1].name);
		}
		break;
	default:
		break;
	}
}

void PrintBloodValue(double *ptr_HP_1, double *ptr_HP_2, int peopleChoice_1, int peopleChoice_2)
{
	SetPosition(48, 35);
	printf("%s还有%.1lf点血量!", peoples[peopleChoice_1 - 1].name, *ptr_HP_1);
	SetPosition(48, 36);
	printf("%s还有%.1lf点血量!", peoples[peopleChoice_2 - 1].name, *ptr_HP_2);
}

3) game.h

/*//////////////////////////////////////////
//										  //
//			  函数与结构的声明			  //
//										  //
//////////////////////////////////////////*/

#pragma once

#include<stdio.h>
#include<stdlib.h>

#define LEFT_DISTANCE 27	//距窗口左边框的距离

struct ability
{
	char movement_1[50];	//1技能名称
	double harm_1;			//1技能伤害
	
	char movement_2[50];	//2技能名称
	double harm_2;			//2技能伤害
};

struct people
{
	int id;					//人物id
	char name[50];			//人物姓名
	double hp;				//人物血量
	double defense;			//人物防御
	double angryValue;		//人物怒气值
	struct ability;			//人物技能
	double attack;			//人物普通攻击伤害
	double getWell;			//血量恢复能力
};
//游戏开始函数
void StartGame();			

//游戏介绍函数
void GameIntroduction();	

//制作者名单函数
void MakerList();			

//游戏退出函数
void ExitGame();			

//人物选择函数
int SelectPeople();			

//另一种分割线打印函数
void PrintBar();			

//打印打斗界面
void PrintFrame();			

//返回主菜单函数
void BackMenu(char back_choice);				

//彩蛋函数
void ShowEgg();									

//修改DOS窗口分辨率函数
void DosSize();									

//游戏界面创建函数
void WindowSize(int width_y);

//光标位置固定函数
void SetPosition(int x, int y);					

//语句颜色,背景色设置函数
void SetColor(int foreColor, int backcolor);	

//人物攻击函数,谁先攻击就把谁的数值的放前面
void PeopleFight(double *ptr_HP_1, double *ptr_HP_2, 
	double *ptr_peopleAngryValue_1, double *ptr_peopleAngryValue_2, 
	int peopleChocie_1, int peopleChoice_2,
	int *turnCount);	

//血量打印函数,打印各人物的血量
void PrintBloodValue(double *ptr_HP_1, double *ptr_HP_2, 
	int peopleChoice_1, int peopleChoice_2);

4) 开发日志与记录


 笔记或者是日志
 
 多个人物:struct数组--id,姓名,血量,怒气值,技能,普通攻击,血量恢复
 
 游戏流程:
 [1]开始游戏 GameStart()
 		p1人物选择 -> p2人物选择 -> 通过双方掷色子来判断谁先出招 -> p1(假设)出招 -> p2(假设)出招 -> 循环上述两个步骤
		-> 在循环中如果怒气值达到了100,则使出暴击 -> p1(假设)死亡 -> p2(假设)获胜
 [2]游戏介绍 GameIntroduction()
 
 [3]制作者名单 MakerList()
 
 [4]退出游戏 ExitGame()
 
 [5]彩蛋 ShowEgg()

//////////////////////////////////////////////////////////////////////////////////

游戏中出现的公式:
 
 防御力抵抗计算公式:  
 		自己受到的伤害 = 对方伤害 - 自己的防御 * 0.5 
 
 血量计算公式:
 		自己现在的血量 = 自己之前的血量 - (对方伤害 - 自己的防御 * 0.5)
 
 怒气值计算公式:
 		自己怒气值的增加 = 对方受到的的伤害 * 1.5
 
 暴走伤害计算公式:
 		对方因自己暴走的伤害 = 自己的普通攻击 * 1.5(暴走伤害忽略防御)

//////////////////////////////////////////////////////////////////////////////////

bugs:
1.血量根本不能恢复(done 2019/2/14)
2,当玩家们选择相同人物时会有血量同时下降的bug(done 2019/2/17)

//////////////////////////////////////////////////////////////////////////////////

更新日志

2019/1/30	v1.0.1beta
1.开始Turn-based KOF的重构工作
2.完成Turn-based KOF总体的重构框架,封装了基本函数
3.GameStart()框架仍没有完成
4.游戏界面仍不友好

2019/1/31	v1.0.1beta
1.优化 人物选择过程,有效防止了玩家的非法输入
2.优化 玩家的招式选择

2019/2/1	v1.0.1beta
1.优化 整体游戏的框架构造工作,游戏已经可以正常运行
2.优化 人物选择时的界面
3.优化 人物的属性,使玩家在挑选人物时更具有多样性
4.修复 血量显示错误的bug

2019/2/14	v1.0.1beta
1.修复 游戏玩家无法恢复血量的bug

2019/2/17	v1.0.1beta
1.修复 人物选择相同时造成血量同时下降的bug

2019/2/17	v1.0.2
1.我要宣布这游戏终于能玩了哈哈哈哈哈哈哈
2.美化 游戏页面

2019/2/20	v1.0.3
1.优化 代码逻辑,精简了main(),并且去除了饱受诟病的goto语句
2.修复 大门五郎招式名字显示错位的bug
3.优化 主菜单界面
4.埋入了彩蛋~并单独对彩蛋界面进行优化

2019/2/21	v1.0.4
1.修复 骰子显示错误的bug
2.优化 为窗体增加标题,不再显示文件路径名

2019/2/23	v1.0.5
1.优化 升级代码,使之容易维护
2.优化 界面显示逻辑
3.优化 利用新函数极大的优化了界面
4.优化 修改了原始窗口分辨率,利于显示

2019/2/24	v1.0.6
1.优化 界面,调整显示逻辑

2019/2/25	v1.0.7
1.优化 界面显示
2.明天一定要对代码进行大改!!!自己看着都难受啊!!!

目前问题:
1.StartGame()中人物选择过程,玩家打斗过程代码混乱,后期代码维护费时且十分困难。
2.StartGame()中代码重复太多。
3.打斗界面的显示,想加入一些低分辨率的人物显示
4.后期想利用acllib实现与用户的鼠标交互

2019/2/26	v1.0.8
1.修复 人物选择过程中代码混乱重复的问题
2.添加 打斗界面

2019/3/2	v1.0.9
1.解决了最让我头疼的打斗混乱代码问题,精简了代码,便于维护
2.删掉了大概180行代码,功能保持不变
3.优化 打斗界面的显示
4.修复 打斗结束时自动回到主界面的bug
5.修复 打斗结束时乱码的bug

2019/3/26	v1.0.10
1.修改小部分代码,移除了一些无意义的变量,添加一些必要注释

2019/5/31	v1.0.11
UP回归来修复bug了!
1.修复 第一回合选择恢复血量时文字显示串行的bug
相关标签: 游戏