分类: Java
2021-05-21 17:22:36
int flag=menulogin.Menulogin(); //游戏开始标记符;
Boolean red = false;
Boolean blue = false; //默认英雄初始是没有buff的
while (flag==3) {
Menuable menuable = new Menuable();
Menuyeguai menuyeguai = new Menuyeguai();
Menuzhuangbei menuzhuangbei = new Menuzhuangbei();
int res = menuable.Menuable(); //技能菜单
int[] arr = new int[4];
switch (res) { //技能生效操作
case 1:
System.out.println("当前使用一技能誓约之盾!");
arr = Firstable(red);
break;
case 2:
System.out.println("当前使用二技能回旋打击!");
arr = Secondable(red, blue);
break;
case 3:
System.out.println("当前使用二技能圣剑裁决!");
arr = Thirdable(red, blue);
break;
case 10:
int res1 = menuyeguai.Menuyeguai();
switch (res1){ //刷野生效操作
case 80:
case 100:
case 150:
case 200:
case 250:yase.setMoney(yase.getMoney()+res1);break;
case 1: red = true;break;
case 0: blue = true;break;
case 10:;
case 11:;
default:
System.out.println("系统错误");
}
break;
case 11:
int res2 = menuzhuangbei.Menuzhuangbei();
switch (res2){ //进入装备购买页面
case 1:
Shoe shoe = new Shoe();
if(yase.getMoney()>=200){
System.out.println(yase.name+"购买了"+shoe.name);
yase.phyfangyu+=shoe.getPhyattack();
yase.move+=shoe.getMove();
yase.money=yase.money-200;
}else{
System.out.println("金币不足,无法购买"+shoe.name);
};break;
case 2:
Fajia fajia = new Fajia();
if(yase.getMoney()>=1200){
System.out.println(yase.name+"购买了"+fajia.name);
yase.phyattack+=fajia.getPhyattack(); //攻击力+
yase.phyfangyu+=fajia.getPhyfanyu(); //防御力+
yase.money=yase.money-1200;
}else {
System.out.println("金币不足,无法购买"+fajia.name);
};break;
case 3:
Anyinzhanfu anyinzhanfu = new Anyinzhanfu();
if(yase.getMoney()>=2000){
System.out.println(yase.name+"购买了"+anyinzhanfu.name);
yase.phyattack+=anyinzhanfu.getPhyattack(); //攻击力+
yase.blood+=anyinzhanfu.getBlood(); //生命力+
yase.money=yase.money-2000;
}else {
System.out.println("金币不足,无法购买"+anyinzhanfu.name);
}
break;
case 10:
case 11:
default:
System.out.println("系统错误");
}
break;
case 4:
return;
default:
System.out.println("自动平A中。。。。");
break;
}
yase.setPhyattack(yase.getPhyattack()+arr[0]);
yase.setBlood(yase.getBlood()+arr[1]);
yase.setMove(yase.getMove()+arr[2]);
System.out.println(yase.getName()+"当前属性为"+" 金币 "+yase.getMoney()+" 物理攻击 "+yase.getPhyattack()+" 血量 "+yase.getBlood()+" 移速 "+yase.getMove()
+" 当前技能冷却时间 "+arr[3]+"ms");
}