public class Equipment {
public Equipment() {}
String[] mozhan=new String[]{"魔战套装部件肩甲","魔战套装部件胸甲","魔战套装部件上衣","魔战套装部件裤子","魔战套装部件鞋"};
String [] tianyu=new String[]{"天御套装部件肩甲","天御套装部件胸甲","天御套装部件上衣","天御套装部件裤子","天御套装部件鞋"};
String [] wanshi=new String[]{"万世套装部件肩甲","万世套装部件胸甲","万世套装部件上衣","万世套装部件裤子","万世套装部件鞋"};
String [] baidu=new String[]{"百毒套装部件肩甲","百毒套装部件胸甲","百毒套装部件上衣","百毒套装部件裤子","百毒套装部件鞋"};
String [] zhanshu=new String[]{"战术之王部件肩甲","战术之王套装部件胸甲","战术之王套装部件上衣","战术之王套装部件裤子","战术之王套装部件鞋"};
//可录入需要的史诗套
}
public class Gailv {
List mozhan_set=new ArrayList();
List tianyu_set=new ArrayList();
List wanshi_set=new ArrayList();
List baidu_set=new ArrayList();
List zhanshu_set=new ArrayList();
List mozhan_set1=new ArrayList();
List tianyu_set1=new ArrayList();
List wanshi_set1=new ArrayList();
List baidu_set1=new ArrayList();
List zhanshu_set1=new ArrayList();
double probability=0.01; //基础概率
double random_probability=0.0; //未出货,随机几率增加
double C_probability=0.0;
String[] epic=new String[100000]; //史诗装备
//爆出史诗装备的件数
int epicNum=0;
int mozhan_num=0; //魔战套件爆出的个数
int tianyu_num=0; //天御
int wanshi_num=0; //万世
int baidu_num=0; //百毒
int zhanshu_num=0; //战术
Random in=new Random();
public void product(double num,double progress_probability,double poll_probability){
//伪随机,连续对多次未出货 随机 几率提高;
int _random=99;
// int _random=9;
Equipment eq=new Equipment();
for(int i=0;i
// double No_product_probability=in.nextInt(_random)+1;
double No_product_probability=Math.random()*100;
if(i==40){
C_probability=0.01; //连续对多次未出货 随机 几率提高; 对应机制四
}
if((No_product_probability)/1000<(probability+progress_probability+poll_probability+C_probability)){
//爆出一件史诗
switch (this.getRandom(35)) { //假定地下城一共有史诗套装35套
case 1: //魔战套
int random_equiment_mozhan=this.getRandom(5);
System.out.println(eq.mozhan[random_equiment_mozhan]);
mozhan_num++;
mozhan_set.add(eq.mozhan[random_equiment_mozhan]);
epicNum++;
break;
case 2: //天御套装
int random_equiment_tianyu=this.getRandom(5);
System.out.println(eq.tianyu[random_equiment_tianyu]);
epicNum++;
tianyu_num++;
tianyu_set.add(eq.tianyu[random_equiment_tianyu]);
break;
case 3: //万世套装
int random_equiment_wanshi=this.getRandom(5);
System.out.println(eq.wanshi[random_equiment_wanshi]);
wanshi_num++;
wanshi_set.add(eq.wanshi[random_equiment_wanshi]);
epicNum++;
break;
case 4: //百毒套装
int random_equiment_baidu=this.getRandom(5);
System.out.println(eq.baidu[random_equiment_baidu]);
epicNum++;
baidu_set.add(eq.baidu[random_equiment_baidu]);
baidu_num++;
break;
case 5: //战术之王套装
int random_equiment_zhanshu=this.getRandom(5);
System.out.println(eq.zhanshu[random_equiment_zhanshu]);
epicNum++;
zhanshu_set.add(eq.zhanshu[random_equiment_zhanshu]);
zhanshu_num++;
default:
System.out.println("目前未录入系统的装备套装");
epicNum++;
break;
}
}
}
// System.out.println(probability+progress_probability+poll_probability);
System.out.println("魔战套组件:"+mozhan_num+"天御套装组件:"+tianyu_num+"万世套装"+wanshi_num+"战术之王套装"+zhanshu_num+"百毒套装"+baidu_num);
System.out.println("魔战套一共出货:"+mozhan_set);
System.out.println("天御套一共出货:"+tianyu_set);
System.out.println("万世套一共出货:"+wanshi_set);
System.out.println("百毒套一共出货:"+baidu_set);
System.out.println("战术之王套一共出货:"+zhanshu_set);
System.err.println("共爆出"+epicNum+"件史诗装备"+"\t\t其史诗件爆出的概率为:"+(double)epicNum/num);
for(int i=0;i<5;i++){
if(mozhan_set.contains(eq.mozhan[i])){
mozhan_set1.add(eq.mozhan[i]);
}
}
int mozhannum=mozhan_set1.size();
System.out.println("已集齐魔战套\t:"+mozhannum+"\t\t出齐"+mozhannum+"件的概率为:"+(double)mozhannum/epicNum);
// this.getPosition(tianyu_set,1);
for(int i=0;i<5;i++){
if(tianyu_set.contains(eq.tianyu[i])){
this.tianyu_set1.add(eq.tianyu[i]);
}
}
int tianyunum=tianyu_set1.size();
System.out.println("已集齐天御套\t:"+tianyunum+"\t\t出齐"+tianyunum+"件的概率为:"+(double)tianyunum/epicNum);
for(int i=0;i<5;i++){
if(wanshi_set.contains(eq.wanshi[i])){
this.wanshi_set1.add(eq.wanshi[i]);
}
}
int wanshi_setnum=wanshi_set1.size();
System.out.println("已集齐万世套\t:"+wanshi_setnum+"\t\t出齐"+wanshi_setnum+"件的概率为:"+(double)wanshi_setnum/epicNum);
for(int i=0;i<5;i++){
if(baidu_set.contains(eq.baidu[i])){
this.baidu_set1.add(eq.baidu[i]);
}
}
int baidunum=baidu_set1.size();
System.out.println("已集齐百毒套\t:"+baidunum+"\t\t出齐"+baidunum+"件的概率为:"+(double)baidunum/epicNum);
for(int i=0;i<5;i++){
if(zhanshu_set.contains(eq.zhanshu[i])){
this.zhanshu_set1.add(eq.zhanshu[i]);
}
}
int zhanshunum=zhanshu_set1.size();
System.out.println("已集齐战术套\t:"+zhanshunum+"\t\t出齐"+zhanshunum+"件的概率为:"+(double)zhanshunum/epicNum);
// System.out.println("已集齐天御套\t:"+tianyu_set1.size());
// System.out.println("已集齐万世套\t:"+wanshi_set1.size());
// System.out.println("已集齐百毒套\t:"+baidu_set1.size());
// System.out.println("已集齐战术套\t:"+zhanshu_set1.size());
System.out.println("队友或自身携带的深渊票少于1张");
}
public int getRandom(int i){
int random=in.nextInt(i);
return random;
}
}
public class SSTotal01 {
static Scanner in=new Scanner(System.in);
static double progress_probability;
static double poll_probability;
public static void main(String[] args) {
SSTotal01 ss=new SSTotal01();
Gailv gl=new Gailv();
progress_probability=ss.exchangeMoney();
System.out.println();
if(progress_probability>=0){
System.out.print("请显示你所持有的地下城门票:");
int num=in.nextInt();
poll_probability=ss.poll(num);
int count =num/25;
System.err.println("当前可进入次数为:"+count);
gl.product(count,progress_probability,poll_probability);
long gameMoney=(int)num*30000;
System.out.println("所持有的的深渊票换算成游戏币为:\t"+gameMoney);
long money=(gameMoney/(100*10000))*2;
System.out.println("你已消耗"+num+"张深渊票\t总计人民币为:"+money);
// System.out.println(Math.random()*100);
}
}
//充钱:返回充值金额,提高爆率 机制之一
public double exchangeMoney(){
int _money=0;
double progress_probability=0.0; //充值返现的爆率
System.out.print("是否充值(可提高爆率):");
String str=in.next();
if("Y".equals(str)){
System.out.print("充的多少影响着你账号的爆率,请输入你所要充值的金额:");
_money=in.nextInt();
if(_money>50000){
progress_probability+=0.006;
}else if(_money>10000){
progress_probability+=0.005;
}else if(_money>5000){
progress_probability+=0.003;
}else if(_money>1000){
progress_probability+=0.002;
}else{
progress_probability+=0.001;
}//你的这个充值的概率将会根据你充值的时间长短来回调
}
return progress_probability;
}
public double poll(int _poll){ //入场劵机制
double poll_probability=0.0;
if(_poll<25){
System.out.println("你在搞笑?");
}else if(_poll>10000){
poll_probability-=0.0006;
}else if(_poll>5000){
poll_probability-=0.0005;
}else if(_poll>1000){
poll_probability-=0.0004;
}else {
poll_probability+=0.005;
}
return poll_probability;
}
}