package sanjiao;
import java.util.*;
public class sanjiao {
int s=(int)(Math.random()*(10));
int x1=100;
int x2=100;
int jib=0;
Scanner input=new Scanner(System.in);
int s1=(int)(Math.random()*(5));
public void xz(){
System.out.println("选择游戏是手动还是自动!
1.手动
2.自动");
int q=input.nextInt();
if(q==1){
dz1();
}else if(q==2){
dz();
}else{
System.out.println("输入错误,请重新输入!");
xz();
}
}
public void dz(){
do{
int s=(int)(Math.random()*(10));
int s1=(int)(Math.random()*(5));
if(s1==3){
System.out.println("a触发了暴击对你造成了双倍伤害!");
x1=x1-20;
}else if(s1==2){
System.out.println("a对你发动技能()伤害瞬间爆炸");
x1=x1-30;
}else{
System.out.println("a只是轻轻地打了你一下");
x1=x1-10;
}
if(s==3){
System.out.println("你触发了暴击对a造成了双倍伤害!");
x2=x2-20;
}else if(s==2){
System.out.println("你对a发动技能()伤害瞬间爆炸");
x2=x2-30;
}else{
System.out.println("你只是轻轻地打了a一下");
x2=x2-10;
}
}while (x1>0&&x2>0);
if(x1<=0){
System.out.println("你被a击杀");
}else if(x2<=0){
System.out.println("你击杀了a,获得10个金币");
jib=jib+10;
}
}
public void dz1(){
}
}