消費上限が大きいほど、1人追った場合と2人追った場合の消費ジュエル差は大きくなる。
11連ガチャ前提なので、1人追う場合でも2人当たるの確率はわずかにある。
追う人数 消費上限 1人当たる 2人当たる 平均消費 一人あたりの消費ジュエル 1 1000 42% 1% 820 1870 1 2000 67% 2% 1290 1870 1 3000 81% 2% 1560 1870 1 9999 99% 3% 1920 1870 2 1000 42% 5% 980 2046 2 2000 67% 17% 1880 2220 2 3000 81% 31% 2657 2360 2 9999 99% 86% 5070 2720
計算コード。
console.log(GatyaSim(1000, (result) => result.hit >= 1)); // 上限1000で、1人以上当たるまで回す
console.log(GatyaSim(1000, (result) => result.hit >= 2)); // 上限1000で、2人以上当たるまで回す
function GatyaSim(ishiMax, isStopFunc) {
var hit1 = 0;
var hit2 = 0;
var hit = 0;
var ishi = 0;
var MAX = 100000;
for (var i=0; i<MAX; i++) {
var result = GatyaSimOne(ishiMax, isStopFunc);
hit1 += result.hit >= 1 ? 1 : 0;
hit2 += result.hit >= 2 ? 1 : 0;
hit += result.hit;
ishi += result.ishi;
}
return {当たる率1: hit1 / MAX, 当たる率2: hit2 / MAX, 消費平均: ishi / MAX, 一人あたり: ishi / hit};
}
function GatyaSimOne(ishiMax, isStopFunc) {
var result = {hit: 0, ishi: 0};
var ritu = 0.01250;
for(var ishi = 250; ishi<=ishiMax; ishi+=250) {
result.ishi = ishi;
for (var i=0; i<11; i++) {
if (Math.random() < ritu) {
result.hit += 1;
ritu -= 0.00625;
}
}
if (isStopFunc(result)) { return result; }
}
return result;
}