1.优化一键测试权重时每次压注的底注为随机

This commit is contained in:
2026-06-04 15:08:24 +08:00
parent 6ef3663957
commit 99949c4c3c
3 changed files with 24 additions and 14 deletions

View File

@@ -215,8 +215,12 @@ class WeightTestRunner
$isPaid = $item[0] === 'paid';
$dir = $item[1];
$playAnte = (int) $item[2];
if ($isPaid && $anteRandom) {
$playAnte = $this->pickRandomAnteMult($deptId);
if ($isPaid) {
if ($anteRandom) {
$playAnte = $this->pickRandomAnteMult($deptId);
} elseif ($playAnte <= 0) {
$playAnte = $ante > 0 ? $ante : 1;
}
} elseif ($playAnte <= 0) {
$playAnte = $ante > 0 ? $ante : 1;
}
@@ -244,6 +248,8 @@ class WeightTestRunner
}
$row = $playLogic->simulateOnePlay($cfg, $dir, $lotteryType, $playAnte, $customWeights, $deptId);
// 明细底注必须为 dice_ante_config.mult随机模式每局独立抽取后的值
$row['ante'] = $playAnte;
$winCoin = (float) ($row['win_coin'] ?? 0);
$paidAmount = (float) ($row['paid_amount'] ?? 0);
$perPlayProfit = $isPaid ? ($winCoin - $paidAmount) : $winCoin;