test(compare): trace deterministic monthly seed progression
This commit is contained in:
+16
-7
@@ -1169,7 +1169,9 @@ function checkDelay()
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
//서버정보
|
||||
$now = new \DateTimeImmutable();
|
||||
// ng_compare can inject a deterministic semantic clock. Runtime limits
|
||||
// still use the wall clock; only delay normalization follows game time.
|
||||
$now = TimeUtil::nowDateTimeImmutable();
|
||||
$turntime = new \DateTimeImmutable($gameStor->turntime);
|
||||
$timeMinDiff = intdiv($now->getTimestamp() - $turntime->getTimestamp(), 60);
|
||||
|
||||
@@ -1293,12 +1295,19 @@ function triggerTournament(RandUtil $rng)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$tnmt_pattern) {
|
||||
// 0 : 전력전, 1 : 통솔전, 2 : 일기토, 3 : 설전
|
||||
//전력전 40%, 통, 일, 설 각 20%
|
||||
$tnmt_pattern = [0, 0, 1, 2, 3];
|
||||
shuffle($tnmt_pattern);
|
||||
}
|
||||
if (!$tnmt_pattern) {
|
||||
// 0 : 전력전, 1 : 통솔전, 2 : 일기토, 3 : 설전
|
||||
//전력전 40%, 통, 일, 설 각 20%
|
||||
$tnmt_pattern = [0, 0, 1, 2, 3];
|
||||
if (getenv('REF_DETERMINISTIC_INSTALL_ENABLED') === '1') {
|
||||
// The legacy global shuffle escapes the configured hidden seed.
|
||||
// The comparison branch keeps production behaviour untouched and
|
||||
// consumes the current month's deterministic RNG instead.
|
||||
$tnmt_pattern = $rng->shuffle($tnmt_pattern);
|
||||
} else {
|
||||
shuffle($tnmt_pattern);
|
||||
}
|
||||
}
|
||||
|
||||
$tnmt_type = array_pop($tnmt_pattern);
|
||||
$gameStor->setValue('tnmt_pattern', $tnmt_pattern);
|
||||
|
||||
Reference in New Issue
Block a user