DNF增幅模拟器以增幅等级为主要通关条件,可以提示需要增幅多少次,会碎掉多少装备。模拟运气为实际增幅花费有预料。
import java.util.Random;
public class DNF {
public static void main(String[] args) {
// TODO Auto-generated method stub
//增幅等级
Random random = new Random();
int a = 0;
//摧毁装备数
int zb= 0;
//增幅次数
int i = 0;
//额外增加的增幅几率
int c=1;
System.out.println("-------------------------------DNF增幅模拟器----------------------------");
while(a <= 13) { //增幅等级
i++;
switch(a) {
case 0: a++;break;
case 1: a++;break;
case 2: a++;break;
case 3: a++;break;
case 4: if(random.nextInt(100)<=80+c){a++;}else{a--;}break;
case 5: if(random.nextInt(100)<=70+c){a++;}else{a--;}break;
case 6: if(random.nextInt(100)<=60+c){a++;}else{a--;}break;
case 7: if(random.nextInt(100)<=70+c){a++;}else{a=4;}break;
case 8: if(random.nextInt(100)<=60+c){a++;}else{a=5;}break;
case 9: if(random.nextInt(100)<=50+c){a++;}else{a=6;}break;
case 10: if(random.nextInt(100)<=40+c){a++;}else{a=0;zb++;}break;
case 11: if(random.nextInt(100)<=30+c){a++;}else{a=0;zb++;}break;
case 12: if(random.nextInt(100)<=20+c){a++;}else{a=0;zb++;}break;
case 13: if(random.nextInt(100)<=20+c){a++;}else{a=0;zb++;}break;
case 14: if(random.nextInt(100)<=20+c){a++;}else{a=0;zb++;}break;
case 15: if(random.nextInt(100)<=20+c){a++;}else{a=0;zb++;}break;
case 16: if(random.nextInt(100)<=20+c){a++;}else{a=0;zb++;}break;
case 17: if(random.nextInt(100)<=20+c){a++;}else{a=0;zb++;}break;
case 18: if(random.nextInt(100)<=20+c){a++;}else{a=0;zb++;}break;
case 19: if(random.nextInt(100)<=20+c){a++;}else{a=0;zb++;}break;
case 20: if(random.nextInt(100)<=20+c){a++;}else{a=0;zb++;}break;
case 21: if(random.nextInt(100)<=20+c){a++;}else{a=0;zb++;}break;
case 22: if(random.nextInt(100)<=20+c){a++;}else{a=0;zb++;}break;
case 23: if(random.nextInt(100)<=20+c){a++;}else{a=0;zb++;}break;
default: System.out.println(i+"---"+a+"---"+zb);
}
}
System.out.println("增幅+"+a+"太极天帝剑");
System.out.println("一共增幅了"+i+"次");
System.out.println("炸了"+zb+"把太极天帝剑");
}
}
演示效果结果: