1 #include<stdlib.h> 2 #include<stdio.h> 3 #include<time.h> //suiji 4 #include<string.h> 5 #include<windows.h> //SLEEP函数 6 struct Player //玩家结构体,并初始化player 7 { 8 char name[21]; 9 int attack; 10 int defense; 11 int health; 12 long int max_health; 13 int level; 14 int exp; 15 int range_exp; 16 long int max_exp; 17 }player={"勇者",50,40,100,100,1,0,0,100}; 18 struct Enemy //怪的结构体,并初始化各种怪 19 { 20 char name[20]; 21 char wupin[12]; 22 int attack; 23 int defense; 24 int health; 25 int money; 26 long int exp; 27 int wupin_sign; 28 int wupinpro; 29 int double_attack; 30 int miss; 31 }strongman={"森林巨人","黄金圣衣",40,50,350,200,100,1,2,1,0}, 32 witch={"森林女巫","银甲",25,15,100,50,50,2,2,1,1}, 33 xiyi={"森林蜥蜴","铁甲",18,10,50,30,35,3,3,2,2}, 34 big_strongman={"森林巨人王","巨人之臂",40*5,50*5,350*5,200*5,100*5,4,4,2,0}, 35 lion={"草原雄狮","绝世好剑",60,30,280,200,100,5,2,1,0}, 36 horse={"草原野马","碧血剑",28,12,90,50,50,6,2,1,1}, 37 bee={"草原黄蜂","长剑",17,11,60,30,35,7,3,2,2}, 38 shitu={"使徒","