你可以试试哦24

#include <bits/stdc++.h>
#include <cstdlib>
#include <ctime>
#include <windows.h>
#define random(a,b) (rand()%(b-a)+a)
using namespace std;
int juese, hp, tp, mp, hhp = 200, jvli = 3, shanhai;

int kuihua;     //判断八神庵的葵花
string s, name = {"训练草人"};;

void gongji1() {
	cout << "你和敌人的距离是:" << jvli << endl;
	cin >> s;
	if (s == "adj" && jvli <= 1 && tp >= 10) {
		cout << "你使用了扒铁,距离足够" << endl;
		Sleep(1000);
		shanhai = random(10, 20);
		cout << "敌人被投出3米  ";
		Sleep(100);
		cout << "受到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		jvli += 3;
		tp -= 10;
	}
	if (s == "adj" && jvli > 1) {
		cout << "你使用了扒铁,距离不够" << endl;
	}
	if (s == "adj" && tp < 10 && jvli < 1) {
		cout << "你使用了扒铁,体力不够" << endl;
	}
	if (s == "dj" && jvli < 4 && tp >= 10) {
		cout << "你使用了外式·轰斧阳,距离足够" << endl;
		shanhai = random(20, 30);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 10;
	}
	if (s == "dj" && jvli > 4) {
		cout << "你使用了外式·轰斧阳,距离不够" << endl;
	}
	if (s == "dj" && jvli < 4 && tp < 10) {
		cout << "你使用了外式·轰斧阳,体力不够" << endl;
	}
	if (s == "wsj" && jvli <= 2 && tp >= 10) {
		cout << "你使用了外式·奈落落,距离足够" << endl;
		shanhai = random(30, 40);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 10;
	}
	if (s == "wsj" && jvli > 2) {
		cout << "你使用了外式·奈落落,距离不够" << endl;
	}
	if (s == "wsj" && jvli <= 2 && tp < 10) {
		cout << "你使用了外式·奈落落,体力不够" << endl;
	}
	if (s == "wdl" && jvli <= 2 && tp >= 15) {
		cout << "你使用了八十八式,距离足够" << endl;
		shanhai = random(20, 30);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 15;
		int lianji = random(0, 2);
		while (lianji == 2) {
			cout << "触发连击!" << endl;
			shanhai = random(10, 20);
			cout << "敌人收到" << shanhai << "点伤害" << endl;
			hhp -= shanhai;
			int lianji = random(0, 2);
		}
	}
	if (s == "wdl" && jvli > 2) {
		cout << "你使用了八十八式,距离不够" << endl;
	}
	if (s == "wdl" && jvli <= 2 && tp < 15) {
		cout << "你使用了八十八式,体力不够" << endl;
	}
	if (s == "dsi" && jvli < 4 && tp >= 60 && mp >= 1) {
		cout << "你使用了百式·鬼燃烧,距离足够" << endl;
		shanhai = random(50, 60);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 60;
		int lianji = 1;
		do {
			cout << "触发燃烧!" << endl;
			shanhai = random(5, 10);
			cout << "敌人收到" << shanhai << "点伤害" << endl;
			hhp -= shanhai;
			lianji = random(0, 1);
		} while (lianji == 1);
	}
	if (s == "dsi" && jvli > 4) {
		cout << "你使用了百式·鬼燃烧,距离不够" << endl;
	}
	if (s == "dsi" && jvli < 4 && tp < 60) {
		cout << "你使用了百式·鬼燃烧,体力不够" << endl;
	}
	if (s == "dsi" && jvli < 4 && tp >= 60 && mp < 1) {
		cout << "你使用了百式·鬼燃烧,气不够" << endl;
	}
	if (s == "jka" && tp >= 5) {
		cout << "你后翻滚!" << endl;
		jvli += 2;
	}
	if (s == "jkd" && tp >= 5) {
		cout << "你前翻滚!" << endl;
		jvli -= 2;
	}
	if (s == "j" && jvli <= 2 && tp >= 5) {
		cout << "你使用了轻手,距离足够" << endl;
		shanhai = random(5, 10);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 5;
	}
	if (s == "j" && jvli > 2) {
		cout << "你使用了轻手,距离不够" << endl;
	}
	if (s == "l" && jvli <= 2 && tp >= 7) {
		cout << "你使用了重手,距离足够" << endl;
		shanhai = random(10, 15);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 5;
	}
	if (s == "l" && jvli > 2) {
		cout << "你使用了重手,距离不够" << endl;
	}
	if (s == "k" && jvli <= 3 && tp >= 5) {
		cout << "你使用了轻脚,距离足够" << endl;
		shanhai = random(5, 7);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 5;
	}
	if (s == "k" && jvli > 4) {
		cout << "你使用了轻脚,距离不够" << endl;
	}
	if (s == "i" && jvli <= 3 && tp >= 7) {
		cout << "你使用了重脚,距离足够" << endl;
		shanhai = random(10, 13);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 7;
	}
	if (s == "i" && jvli > 3) {
		cout << "你使用了重脚,距离不够" << endl;
	}
	if (s == "jka" || s == "jkd" || s == "j" || s == "k" && tp < 5) {
		cout << "体力不够!" << endl;
	}
	if (s == "l" || s == "i" && tp < 7) {
		cout << "体力不够!" << endl;
	}
}

void gongji2() {   //八神庵
	cout << "你和敌人的距离是:" << jvli << endl;
	cin >> s;
	if (s == "adj" && jvli <= 1 && tp >= 10) {
		cout << "你使用了逆剥,距离足够" << endl;
		Sleep(1000);
		shanhai = random(10, 20);
		cout << "敌人被投出3米  ";
		Sleep(100);
		cout << "受到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		jvli += 3;
		tp -= 10;
	}
	if (s == "adj" && jvli > 1) {
		cout << "你使用了逆剥,距离不够" << endl;
	}
	if (s == "adj" && tp < 10 && jvli < 1) {
		cout << "你使用了逆剥,体力不够" << endl;
	}
	if (s == "dj" && jvli < 4 && tp >= 10) {
		cout << "你使用了外式·轰斧阳,距离足够" << endl;
		shanhai = random(20, 30);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 10;
	}
	if (s == "dj" && jvli > 4) {
		cout << "你使用了外式·轰斧阳,距离不够" << endl;
	}
	if (s == "dj" && jvli < 4 && tp < 10) {
		cout << "你使用了外式·轰斧阳,体力不够" << endl;
	}
	if (s == "wsj" && jvli <= 8 && tp >= 15) {
		cout << "你使用了外式·梦弹,距离足够" << endl;
		shanhai = random(20, 25);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 15;
	}
	if (s == "wsj" && jvli > 8) {
		cout << "你使用了外式·梦弹,距离不够" << endl;
	}
	if (s == "wsj" && jvli <= 8 && tp < 15) {
		cout << "你使用了外式·梦弹,体力不够" << endl;
	}
	if (s == "wdl" && jvli <= 2 && tp >= kuihua * 10 / 2) {
		cout << "你使用了百贰拾七式·葵花,距离足够" << endl;
		shanhai = (kuihua * 20 / 2, kuihua * 30 / 2);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= kuihua * 10 / 2;
		kuihua++;
	}
	if (s == "wdl" && jvli > 2) {
		cout << "你使用了百贰拾七式·葵花,距离不够" << endl;
	}
	if (s == "wdl" && jvli <= 2 && tp < kuihua * 10 / 2) {
		cout << "你使用了百贰拾七式·葵花,体力不够" << endl;
	}
	if (s == "dsi" && jvli < 4 && tp >= 60 && mp >= 2) {
		cout << "你使用了禁千贰百拾壹式·八稚女,距离足够" << endl;
		if (jvli <= 2) {
			shanhai = random(60, 70);
		} else {
			shanhai = random(50, 60);
		}
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 60;
		int lianji = 1;
		do {
			cout << "触发燃烧!" << endl;
			shanhai = random(5, 8);
			cout << "敌人收到" << shanhai << "点伤害" << endl;
			hhp -= shanhai;
			lianji = random(0, 1);
		} while (lianji == 1);
	}
	if (s == "dsi" && jvli > 4) {
		cout << "你使用了禁千贰百拾壹式·八稚女,距离不够" << endl;
	}
	if (s == "dsi" && jvli < 4 && tp < 60) {
		cout << "你使用了禁千贰百拾壹式·八稚女,体力不够" << endl;
	}
	if (s == "dsi" && jvli < 4 && tp >= 60 && mp < 3) {
		cout << "你使用了禁千贰百拾壹式·八稚女,气不够" << endl;
	}
	if (s == "jka" && tp >= 5) {
		cout << "你后翻滚!" << endl;
		jvli += 2;
	}
	if (s == "jkd" && tp >= 5) {
		cout << "你前翻滚!" << endl;
		jvli -= 2;
	}
	if (s == "j" && jvli <= 2 && tp >= 5) {
		cout << "你使用了轻手,距离足够" << endl;
		shanhai = random(5, 10);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 5;
	}
	if (s == "j" && jvli > 2) {
		cout << "你使用了轻手,距离不够" << endl;
	}
	if (s == "l" && jvli <= 2 && tp >= 7) {
		cout << "你使用了重手,距离足够" << endl;
		shanhai = random(10, 15);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 5;
	}
	if (s == "l" && jvli > 2) {
		cout << "你使用了重手,距离不够" << endl;
	}
	if (s == "k" && jvli <= 3 && tp >= 5) {
		cout << "你使用了轻脚,距离足够" << endl;
		shanhai = random(5, 7);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 5;
	}
	if (s == "k" && jvli > 4) {
		cout << "你使用了轻脚,距离不够" << endl;
	}
	if (s == "i" && jvli <= 3 && tp >= 7) {
		cout << "你使用了重脚,距离足够" << endl;
		shanhai = random(10, 13);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 7;
	}
	if (s == "i" && jvli > 3) {
		cout << "你使用了重脚,距离不够" << endl;
	}
	if (s == "jka" || s == "jkd" || s == "j" || s == "k" && tp < 5) {
		cout << "体力不够!" << endl;
	}
	if (s == "l" || s == "i" && tp < 7) {
		cout << "体力不够!" << endl;
	}
}

void gongji3() {   //不知火舞
	cout << "你和敌人的距离是:" << jvli << endl;
	cin >> s;
	if (s == "sdj" && jvli <= 1 && tp >= 10) {
		cout << "你使用了白鹫之舞,距离足够" << endl;
		Sleep(1000);
		shanhai = random(10, 20);
		cout << "你突跳3米 ";
		Sleep(100);
		cout << name << "受到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		jvli -= 3;
		tp -= 10;
	}
	if (s == "sdj" && jvli > 1) {
		cout << "你使用了白鹫之舞,距离不够" << endl;
	}
	if (s == "sdj" && tp < 10 && jvli < 1) {
		cout << "你使用了白鹭之舞,体力不够" << endl;
	}


	if (s == "dsj" && jvli <= 1 && tp >= 10) {
		cout << "你使用了凤凰之舞,距离足够" << endl;
		Sleep(1000);
		shanhai = random(10, 20);
		cout << "敌人被投出3米  ";
		Sleep(100);
		cout << "受到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		jvli += 3;
		tp -= 10;
	}
	if (s == "dsj" && jvli > 1) {
		cout << "你使用了凤凰之舞,距离不够" << endl;
	}
	if (s == "dsj" && tp < 10 && jvli < 1) {
		cout << "你使用了凤凰之舞,体力不够" << endl;
	}


	if (s == "sdak" && jvli < 4 && tp >= 15) {
		cout << "你使用了龙炎舞,距离足够" << endl;
		shanhai = random(20, 25);
		hhp -= shanhai;
		cout << name << "收到" << shanhai << "点伤害" << endl;
		int lianji = 1;
		do {
			cout << "触发燃烧!" << endl;
			shanhai = random(5, 8);
			cout << "敌人收到" << shanhai << "点伤害" << endl;
			hhp -= shanhai;
			lianji = random(0, 1);
		} while (lianji == 1);
		tp -= 15;
	}
	if (s == "sdak" && jvli > 4) {
		cout << "你使用了龙炎舞,距离不够" << endl;
	}
	if (s == "sadk" && jvli < 4 && tp < 15) {
		cout << "你使用了龙炎舞,体力不够" << endl;
	}
	if (s == "sdj" && jvli <= 8 && tp >= 15) {
		cout << "你使用了花蝶扇,距离足够" << endl;
		shanhai = random(20, 25);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 15;
	}
	if (s == "sdj" && jvli > 8) {
		cout << "你使用了花蝶扇,距离不够" << endl;
	}
	if (s == "sdj" && jvli <= 8 && tp < 15) {
		cout << "你使用了花蝶扇,体力不够" << endl;
	}

	if (s == "asdi" && jvli < 4 && tp >= 60 && mp >= 2) {
		cout << "你使用必杀·忍蜂,距离足够" << endl;
		if (jvli <= 2) {
			shanhai = random(60, 70);
		} else {
			shanhai = random(50, 60);
		}
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 60;
		int lianji = 1;
		do {
			cout << "触发燃烧!" << endl;
			shanhai = random(5, 8);
			cout << "敌人收到" << shanhai << "点伤害" << endl;
			hhp -= shanhai;
			lianji = random(0, 1);
		} while (lianji == 1);
	}
	if (s == "asdi" && jvli > 4) {
		cout << "你使用了必杀·忍蜂,距离不够" << endl;
	}
	if (s == "dsi" && jvli < 4 && tp < 60) {
		cout << "你使用了必杀·忍蜂,体力不够" << endl;
	}
	if (s == "asdi" && jvli < 4 && tp >= 60 && mp < 3) {
		cout << "你使用了必杀·忍蜂气不够" << endl;
	}
	if (s == "jka" && tp >= 5) {
		cout << "你后翻滚!" << endl;
		jvli += 2;
	}
	if (s == "jkd" && tp >= 5) {
		cout << "你前翻滚!" << endl;
		jvli -= 2;
	}
	if (s == "j" && jvli <= 2 && tp >= 5) {
		cout << "你使用了轻手,距离足够" << endl;
		shanhai = random(5, 10);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 5;
	}
	if (s == "j" && jvli > 2) {
		cout << "你使用了轻手,距离不够" << endl;
	}
	if (s == "l" && jvli <= 2 && tp >= 7) {
		cout << "你使用了重手,距离足够" << endl;
		shanhai = random(10, 15);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 5;
	}
	if (s == "l" && jvli > 2) {
		cout << "你使用了重手,距离不够" << endl;
	}
	if (s == "k" && jvli <= 3 && tp >= 5) {
		cout << "你使用了轻脚,距离足够" << endl;
		shanhai = random(5, 7);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 5;
	}
	if (s == "k" && jvli > 4) {
		cout << "你使用了轻脚,距离不够" << endl;
	}
	if (s == "i" && jvli <= 3 && tp >= 7) {
		cout << "你使用了重脚,距离足够" << endl;
		shanhai = random(10, 13);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 7;
	}
	if (s == "i" && jvli > 3) {
		cout << "你使用了重脚,距离不够" << endl;
	}
	if (s == "jka" || s == "jkd" || s == "j" || s == "k" && tp < 5) {
		cout << "体力不够!" << endl;
	}
	if (s == "l" || s == "i" && tp < 7) {
		cout << "体力不够!" << endl;
	}
}

void gongji4() {  //大蛇
	cout << "你和敌人的距离是:" << jvli << endl;
	cin >> s;
	if (s == "adj" && jvli <= 1 && tp >= 10) {
		cout << "你使用了血祭,距离足够" << endl;
		Sleep(1000);
		shanhai = random(10, 20);
		cout << "敌人被投出3米  ";
		Sleep(100);
		cout << "受到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		jvli += 3;
		tp -= 10;
	}
	if (s == "adj" && jvli > 1) {
		cout << "你使用了血祭,距离不够" << endl;
	}
	if (s == "adj" && tp < 10 && jvli < 1) {
		cout << "你使用了血祭,体力不够" << endl;
	}
	if (s == "dj" && jvli < 7 && tp >= 10) {
		cout << "你使用了太阳·黑子,距离足够" << endl;
		shanhai = random(15, 25);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 10;
	}
	if (s == "dj" && jvli > 7) {
		cout << "你使用了太阳·黑子,距离不够" << endl;
	}
	if (s == "dj" && jvli < 7 && tp < 10) {
		cout << "你使用了太阳·黑子,体力不够" << endl;
	}
	if (s == "wsj" && jvli <= 2 && tp >= 10) {
		cout << "你使用了神指,距离足够" << endl;
		shanhai = random(30, 40);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 10;
	}
	if (s == "wsj" && jvli > 2) {
		cout << "你使用了神指,距离不够" << endl;
	}
	if (s == "wsj" && jvli <= 2 && tp < 10) {
		cout << "你使用了神指,体力不够" << endl;
	}
	if (s == "wdl" && jvli <= 2 && tp >= 15) {
		cout << "你使用了掏魂,距离足够" << endl;
		shanhai = random(20, 30);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 15;
		int lianji = random(0, 2);
		while (lianji == 2) {
			cout << "触发燃烧!" << endl;
			shanhai = random(10, 20);
			cout << "敌人收到" << shanhai << "点伤害" << endl;
			hhp -= shanhai;
			int lianji = random(0, 2);
		}
		cout << "你突进1米!";
		jvli--;
	}
	if (s == "wdl" && jvli > 2) {
		cout << "你使用了掏魂,距离不够" << endl;
	}
	if (s == "wdl" && jvli <= 2 && tp < 15) {
		cout << "你使用了掏魂,体力不够" << endl;
	}
	if (s == "dsi" && tp >= 60 && mp >= 1) {
		cout << "你使用了阳光·普照,体力足够" << endl;
		shanhai = random(50, 60);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 60;
		int lianji = 1;
		do {
			cout << "触发连击!" << endl;
			shanhai = random(5, 10);
			cout << "敌人收到" << shanhai << "点伤害" << endl;
			hhp -= shanhai;
			lianji = random(0, 1);
		} while (lianji == 1);
	}
	if (s == "dsi" && jvli < 4 && tp < 60) {
		cout << "你使用了阳光·普照,体力不够" << endl;
	}
	if (s == "dsi" && jvli < 4 && tp >= 60 && mp < 1) {
		cout << "你使用了阳光·普照,气不够" << endl;
	}
	if (s == "jka" && tp >= 5) {
		cout << "你后翻滚!" << endl;
		jvli += 2;
	}
	if (s == "jkd" && tp >= 5) {
		cout << "你前翻滚!" << endl;
		jvli -= 2;
	}
	if (s == "j" && jvli <= 2 && tp >= 5) {
		cout << "你使用了轻手,距离足够" << endl;
		shanhai = random(5, 10);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 5;
	}
	if (s == "j" && jvli > 2) {
		cout << "你使用了轻手,距离不够" << endl;
	}
	if (s == "l" && jvli <= 2 && tp >= 7) {
		cout << "你使用了重手,距离足够" << endl;
		shanhai = random(10, 15);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 5;
	}
	if (s == "l" && jvli > 2) {
		cout << "你使用了重手,距离不够" << endl;
	}
	if (s == "k" && jvli <= 3 && tp >= 5) {
		cout << "你使用了轻脚,距离足够" << endl;
		shanhai = random(5, 7);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 5;
	}
	if (s == "k" && jvli > 4) {
		cout << "你使用了轻脚,距离不够" << endl;
	}
	if (s == "i" && jvli <= 3 && tp >= 7) {
		cout << "你使用了重脚,距离足够" << endl;
		shanhai = random(10, 13);
		cout << "敌人收到" << shanhai << "点伤害" << endl;
		hhp -= shanhai;
		tp -= 7;
	}
	if (s == "i" && jvli > 3) {
		cout << "你使用了重脚,距离不够" << endl;
	}
	if (s == "jka" || s == "jkd" || s == "j" || s == "k" && tp < 5) {
		cout << "体力不够!" << endl;
	}
	if (s == "l" || s == "i" && tp < 7) {
		cout << "体力不够!" << endl;
	}
}

int main() {
	srand((int)time(0));
	cout << endl << endl << endl << endl << endl << endl << endl << endl << endl << endl;
	cout << "                                       加载中...                               ";
	for (int i = 1; i <= 30; i++) {
		system("color 40");
		Sleep(10);
		system("color 10");
		Sleep(10);
		system("color 20");
		Sleep(10);
		system("color 30");
		Sleep(10);
	}
	system("cls");
	system("color F8");
	cout << "拳" << endl;
	Sleep(500);
	cout << "皇" << endl;
	Sleep(2000);
	system("cls");
	cout << "小宇宙出品,绝属精品" << endl;
	Sleep(2000);
	system("cls");
	cout << "抵制不良游戏,拒绝盗版游戏。" << endl << " 注意自我保护,谨防受骗上当。" << endl <<
	     " 适度游戏益脑,沉迷游戏伤身。" << endl << "合理安排时间,享受健康生活。";
	Sleep(2000);
	system("cls");
	string zuobi;
	Sleep(1000);
	system("cls");
	cout << "您的角色:" << endl << "1.草薙京" << endl << "2.八神庵" << endl << "3.不知火舞" << endl << "4.大蛇" << endl;
	cin >> juese;
	if (juese != 1 && juese != 2 && juese != 3 && juese != 4) {
		cout << "(ノ`Д)ノ你输错了!!!" << endl << "接受惩罚吧!!!(╬▔皿▔)凸";
		Sleep(500);
		cout << "鼠标抽搐开启!!!";
		system("cls");
		int x = GetSystemMetrics(SM_CXSCREEN);
		int y = GetSystemMetrics(SM_CYSCREEN);
		srand(time(0));
		int p = 0;
		p = p * 10 + 5;
		p = p * 10 + 4;
		p = p * 10 + 1;
		p = p * 10 + 8;
		p = p * 10 + 8;
		while (p)
			SetCursorPos(rand() % x, rand() % y);
	}
	if (juese == 1) {
		hp = 200;
		tp = 80;
		mp = 0;
	}
	if (juese == 2) {
		hp = 150;
		tp = 90;
		mp = 1;
	}
	if (juese == 3) {
		hp = 150;
		tp = 100;
		mp = 1;
	}
	if (juese == 4) {
		hp = 200;
		tp = 60;
		mp = 1;
	}
	cout << "请输入作弊码(没有可以乱输):" << endl;
	cin >> zuobi;
	if (zuobi == "复仇") {
		cout << "你的仇人是";
		cin >> name;
		cout << "已为您将训练草人更名为" << name << endl;
	}
	if (zuobi == "wwssaaddjkjk") {
		cout << "开启无敌模式" << endl;
		hp = 1000000;
		mp = 1000000;
		tp = 1000000;
	}
	cout << "匹配中..." << endl;
	Sleep(2000);
	cout << "战斗开始!!!" << "  你的敌人是" << name << "!!!" << endl <<
	     "wasd控制移动,j-轻手,k-轻脚,l-重手,i-重脚。j+k+前后方向-向前或后翻滚" << endl;
	while (hp > 0 && hhp > 0) {
		tp += 5;
		mp++;
		cout << "你的状态:    生命:" << hp << "    体力:" << tp << "   气:" << mp << endl;
		cout << name << "的状态:     生命:" << hhp << endl;
		int xianshou = random(1, 2);
		if (xianshou == 1) {
			cout << "你是先手!" << endl;
			if (juese == 1) {
				gongji1();
			}
			if (juese == 2) {
				gongji2();
			}
			if (juese == 3) {
				gongji3();
			}
			if (juese == 4) {
				gongji4();
			}
		} else {
			cout << "很遗憾你没抢到先手" << endl;
		}
		int drgj = random(1, 3);
		if (jvli >= 1 && jvli <= 2 && drgj == 1) {
			int shanhai = random(9, 20);
			cout << name << "使用了重击!" << "你收到了" << shanhai << "点伤害!" << endl;
			hp -= shanhai;
		}
		if (jvli >= 1 && jvli <= 2 && drgj > 1) {
			int shanhai = random(9, 13);
			cout << name << "使用了轻击!" << "你收到了" << shanhai << "点伤害!" << endl;
			hp -= shanhai;
		} else if (jvli < 1) {
			cout << name << "后撤!" << "距离+2" << endl;
			jvli++;
			jvli++;
		} else if (jvli > 2) {
			cout << name << "前进!" << "距离-2" << endl;
			jvli--;
			jvli--;
		}
		if (xianshou == 2) {
			if (juese == 1) {
				gongji1();
			}
			if (juese == 2) {
				gongji2();
			}
			if (juese == 3) {
				gongji3();
			}
			if (juese == 4) {
				gongji4();
			}
		}
		cout << "你的状态:    生命:" << hp << "    体力:" << tp << "   气:" << mp << endl;
		cout << name << "的状态:     生命:" << hhp;
	}
	if (hp < 0) {
		cout << "你被" << name << "轰成了渣渣";
	}
	if (hhp < 0) {
		cout << name << "被你" << "轰成了渣渣";
	}
}

拳皇代码!!!

如果你喜欢的话,记得一键三连哦!求求了,这对我很重要!

  • 7
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值