用的是18年的强化几率,12上13随便写的数据,设置的强化100件+13,平均每件大概是失败7次左右。
int gl = 0;
int level = 0;
int s11 = 0;
int s12 = 0;
int s13 = 0;
int num = 0;
while(true) {
Random random = new Random();
switch(level){
case 0:gl = 100;break;
case 1:gl = 100;break;
case 2:gl = 100;break;
case 3:gl = 100;break;
case 4:gl = 90;break;
case 5:gl = 80;break;
case 6:gl = 60;break;
case 7:gl = 80;break;
case 8:gl = 90;break;
case 9:gl = 50;break;
case 10:gl = 26;break;
case 11:gl = 18;break;
case 12:gl = 13;break;
}
if(gl >= random.nextInt(100)) {
System.out.println("强化"+(level+1)+"成功");
level++;
}
else {
System.out.println("强化失败+"+(level+1)+"失败,我套你猴子");
if(level > 11) {
level = 0;
System.out.println("武器归0");
s13++;
}else if(level > 10) {
level -=4;
System.out.println("武器归"+level);
s12++;
}else if(level > 9) {
level -= 3;
System.out.println("武器归"+level);
s11++;
}
}
if(level == 13) {
System.out.println("你个老吊啊,你可算是成了");
System.out.println("上11失败了"+s11+"次\n"
+ "上12失败了"+s12+"次\n"
+ "上13失败了"+s13+"次");
num++;
}
if(num == 100) {
System.out.println("强化100件+13\n平均每件+11失败"+(s11/100)+"次\n强化+12失败了"+(s12/100)+"次\n强化+13失败"+(s13/100)+"次");
break;
}
}
强化穷三代,增幅毁一生,失败了不要灰心,再充五北球球币