public static void main(String[] args) {
Random a = new Random();
int x = a.nextInt(9001) + 1000;
System.out.println("boos出现,血量:" + x);
System.out.println("我是勇士");
Scanner b = new Scanner(System.in);
while (true) {
System.out.print("请选择 ");
System.out.print("1: 物理攻击 ");
System.out.print("2: 魔法攻击");
System.out.println();
int y = b.nextInt();
System.out.println();
if (y == 2) {
// 目前两者伤害都是随机产生
System.out.println("魔法攻击");
int z = a.nextInt(150) + 1;
x = x - z;
System.out.println("boos血量" + x);
System.out.println("对boos伤害" + z);