梦幻西游中关于高级内丹双星爆和催心浪哪个加成更多以及哪个更有用这么多年来玩家一直争论不休,近日有大佬为测试双星爆和催心浪的效果写了一排代码模拟测试了100万次数据,小编看后简直惊呆了,大佬请收下我的膝盖。
如果催心浪波动区间是线性的(即出现区间内任意数据的几率相等),大佬的模拟测试结果是这样的:
以下是大佬写的测试代码,不知道你们看不看得懂,反正小编是文盲,只认得几个简单的int定义以及循环之类的。
package Chap5_ThinkJava;
public class TestCxlSxb {
public static void main(String[] args){
System.out.println("无发波法连的情况下:平均伤害是3000");
normal(1000000);
cxlTest(1000000);
sxbTest(1000000);
}
public static void normal(int n){
double clxAve =0;
for(int i = 0; i <= n; i++ ){
int spells = (int)(Math.random()*101);
if(spells>30){
int fabo1 = (int)(Math.random()*101)+50;
//System.out.print(" "+ fabo1*10+" ");
int fabo2 = (int)(Math.random()*101)+50;
//System.out.print(fabo2*10 +" ");
int fabo3 = (int)(Math.random()*101)+50;
//System.out.print(fabo3*10 +" ");
int sum = fabo1 +fabo2+fabo3;
clxAve = clxAve + sum*10;
//System.out.println("伤害总和为: "+ sum*10);
}else{
int fabo1 = (int)(Math.random()*101)+50;
//System.out.print(" "+ fabo1*15+" ");
int fabo2 = (int)(Math.random()*101)+50;
//System.out.print(fabo2*15 +" ");
int fabo3 = (int)(Math.random()*101)+50;
//System.out.print(fabo3*15 +" ");
int fabo4 = (int)(Math.random()*101)+50;
//System.out.print(" "+ fabo1*15+" ");
int fabo5 = (int)(Math.random()*101)+50;
//System.out.print(fabo2*15 +" ");
int fabo6 = (int)(Math.random()*101)+50;
//System.out.print(fabo3*15 +" ");
int sum = fabo1*10 +fabo2*10 + fabo3*10 + fabo4*5 +fabo5*5 + fabo6*5;
clxAve = clxAve + sum;
//System.out.println("伤害总和为: "+ sum*15);
}
//System.out.println((int)(Math.random()*101)+50);
}
System.out.println("正常发波加法连,不带内丹平均伤害为:"+ clxAve/n);
double up = (clxAve/n-3000)/30;
System.out.println("正常发波加法连,不带内丹提升百分比为:" + up);
}
public static void cxlTest(int n){
double clxAve =0;
for(int i = 0; i <= n; i++ ){
int spells = (int)(Math.random()*101);
if(spells>30){
int fabo1 = (int)(Math.random()*101)+50;
if(fabo1<75){
fabo1=75;
}
//System.out.print(" "+ fabo1*10+" ");
int fabo2 = (int)(Math.random()*101)+50;
if(fabo2<75){
fabo2=75;
}
//System.out.print(fabo2*10 +" ");
int fabo3 = (int)(Math.random()*101)+50;
if(fabo3<75){
fabo3=75;
}
//System.out.print(fabo3*10 +" ");
int sum = fabo1 +fabo2+fabo3;
clxAve = clxAve + sum*10;
//System.out.println("伤害总和为: "+ sum*10);
}else{
int fabo1 = (int)(Math.random()*101)+50;
if(fabo1<75){
fabo1=75;
}
//System.out.print(" "+ fabo1*15+" ");
int fabo2 = (int)(Math.random()*101)+50;
if(fabo2<75){
fabo2=75;
}
//System.out.print(fabo2*15 +" ");
int fabo3 = (int)(Math.random()*101)+50;
if(fabo3<75){
fabo3=75;
}
//System.out.print(fabo3*15 +" ");
int fabo4 = (int)(Math.random()*101)+50;
if(fabo4<75){
fabo4=75;
}
//System.out.print(" "+ fabo1*15+" ");
int fabo5 = (int)(Math.random()*101)+50;
if(fabo5<75){
fabo5=75;
}
//System.out.print(fabo2*15 +" ");
int fabo6 = (int)(Math.random()*101)+50;
if(fabo6<75){
fabo6=75;
}
//System.out.print(fabo3*15 +" ");
int sum = fabo1*10 +fabo2*10 + fabo3*10 + fabo4*5 +fabo5*5 + fabo6*5;
clxAve = clxAve + sum;
//System.out.println("伤害总和为: "+ sum*15);
}
//System.out.println((int)(Math.random()*101)+50);
}
System.out.println("正常发波加法连,摧心浪内丹平均伤害为:"+ clxAve/n);
double up = (clxAve/n-3000)/30;
System.out.println("正常发波加法连,摧心浪内丹提升百分比为:" + up);
}
public static void sxbTest(int n){
double clxAve =0;
for(int i = 0;
i <= n; i++ ){
int spells = (int)(Math.random()*101);
if(spells>30){
int fabo1 = (int)(Math.random()*101)+50;
//System.out.print(" "+ fabo1*10+" ");
int fabo2 = (int)(Math.random()*101)+50;
//System.out.print(fabo2*10 +" ");
int fabo3 = (int)(Math.random()*101)+50;
//System.out.print(fabo3*10 +" ");
int sum = fabo1 +fabo2+fabo3;
clxAve = clxAve + sum*10;
//System.out.println("伤害总和为: "+ sum*10);
}else{
int fabo1 = (int)(Math.random()*101)+50;
//System.out.print(" "+ fabo1*15+" ");
int fabo2 = (int)(Math.random()*101)+50;
//System.out.print(fabo2*15 +" ");
int fabo3 = (int)(Math.random()*101)+50;
//System.out.print(fabo3*15 +" ");
int fabo4 = (int)(Math.random()*101)+50;
//System.out.print(" "+ fabo1*15+" ");
int fabo5 = (int)(Math.random()*101)+50;
//System.out.print(fabo2*15 +" ");
int fabo6 = (int)(Math.random()*101)+50;
//System.out.print(fabo3*15 +" ");
double sum = fabo1*10 +fabo2*10 + fabo3*10 + fabo4*6.6 +fabo5*6.6 + fabo6*6.6;
clxAve = clxAve + sum;
//System.out.println("伤害总和为: "+ sum*15);
}
//System.out.println((int)(Math.random()*101)+50);
}
System.out.println("正常发波加法连,双星爆内丹平均伤害为:"+ clxAve/n);
double up = (clxAve/n-3000)/30;
System.out.println("正常发波加法连,双星爆内丹提升百分比为:" + up);
}
}
玩个游戏弄成这样估计也是没谁了,大家怎么看呢?
热搜词
标签: fab out pri rand o1 o2 bo3 内丹 bo5 星爆 双星 pel spell 正常 代码 bli 模拟 stat 西游