test: trace scenario 2400 monthly parity
This commit is contained in:
@@ -30,7 +30,8 @@ class che_상업투자 extends Command\GeneralCommand{
|
||||
static protected $actionName = '상업 투자';
|
||||
static protected $debuffFront = 0.5;
|
||||
|
||||
protected $reqGold;
|
||||
protected $reqGold;
|
||||
protected $baseTrace = [];
|
||||
|
||||
protected function argTest():bool{
|
||||
$this->arg = null;
|
||||
@@ -118,10 +119,21 @@ class che_상업투자 extends Command\GeneralCommand{
|
||||
throw new \sammo\MustNotBeReachedException();
|
||||
}
|
||||
|
||||
$score *= $trust / 100;
|
||||
$score *= getDomesticExpLevelBonus($general->getVar('explevel'));
|
||||
$score *= $rng->nextRange(0.8, 1.2);
|
||||
$score = $general->onCalcDomestic(static::$actionKey, 'score', $score);
|
||||
$adjustedStat = $score;
|
||||
$score *= $trust / 100;
|
||||
$expLevel = $general->getVar('explevel');
|
||||
$expBonus = getDomesticExpLevelBonus($expLevel);
|
||||
$score *= $expBonus;
|
||||
$randomMultiplier = $rng->nextRange(0.8, 1.2);
|
||||
$score *= $randomMultiplier;
|
||||
$score = $general->onCalcDomestic(static::$actionKey, 'score', $score);
|
||||
$this->baseTrace = [
|
||||
'adjustedStat' => $adjustedStat,
|
||||
'expLevel' => $expLevel,
|
||||
'expBonus' => $expBonus,
|
||||
'randomMultiplier' => $randomMultiplier,
|
||||
'domesticScore' => $score,
|
||||
];
|
||||
|
||||
return $score;
|
||||
}
|
||||
@@ -137,7 +149,8 @@ class che_상업투자 extends Command\GeneralCommand{
|
||||
|
||||
$trust = Util::valueFit($this->city['trust'], 50);
|
||||
|
||||
$score = Util::valueFit($this->calcBaseScore($rng), 1);
|
||||
$calculatedBaseScore = $this->calcBaseScore($rng);
|
||||
$score = Util::valueFit($calculatedBaseScore, 1);
|
||||
|
||||
['success'=>$successRatio, 'fail'=>$failRatio] = CriticalRatioDomestic($general, static::$statKey);
|
||||
if($trust < 80){
|
||||
@@ -160,11 +173,31 @@ class che_상업투자 extends Command\GeneralCommand{
|
||||
|
||||
$date = $general->getTurnTime($general::TURNTIME_HM);
|
||||
|
||||
$score *= CriticalScoreEx($rng, $pick);
|
||||
$score = Util::round($score);
|
||||
$criticalMultiplier = CriticalScoreEx($rng, $pick);
|
||||
$score *= $criticalMultiplier;
|
||||
$score = Util::round($score);
|
||||
|
||||
$exp = $score * 0.7;
|
||||
$ded = $score * 1.0;
|
||||
$ded = $score * 1.0;
|
||||
|
||||
if (in_array((string)$general->getID(), array_filter(explode(',', (string)getenv('REF_AI_TRACE_GENERAL_IDS')), 'strlen'), true)) {
|
||||
fwrite(STDOUT, 'DOMESTIC_CALC_TRACE ' . json_encode([
|
||||
'engine' => 'ref',
|
||||
'generalId' => $general->getID(),
|
||||
'action' => static::class,
|
||||
'trust' => $trust,
|
||||
'calculatedBaseScore' => $calculatedBaseScore,
|
||||
'baseTrace' => $this->baseTrace,
|
||||
'successRatio' => $successRatio,
|
||||
'failRatio' => $failRatio,
|
||||
'normalRatio' => $normalRatio,
|
||||
'pick' => $pick,
|
||||
'criticalMultiplier' => $criticalMultiplier,
|
||||
'rewardScore' => $score,
|
||||
'exp' => $exp,
|
||||
'dedication' => $ded,
|
||||
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . "\n");
|
||||
}
|
||||
|
||||
if($pick == 'success'){
|
||||
updateMaxDomesticCritical($general, $score);
|
||||
@@ -225,4 +258,4 @@ class che_상업투자 extends Command\GeneralCommand{
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,8 @@ class che_주민선정 extends Command\GeneralCommand{
|
||||
static protected $actionKey = '민심';
|
||||
static protected $actionName = '주민 선정';
|
||||
|
||||
protected $reqRice;
|
||||
protected $reqRice;
|
||||
protected $baseTrace = [];
|
||||
|
||||
protected function argTest():bool{
|
||||
$this->arg = null;
|
||||
@@ -109,10 +110,21 @@ class che_주민선정 extends Command\GeneralCommand{
|
||||
throw new \sammo\MustNotBeReachedException();
|
||||
}
|
||||
|
||||
$score *= getDomesticExpLevelBonus($general->getVar('explevel'));
|
||||
$score *= $rng->nextRange(0.8, 1.2);
|
||||
$score = $general->onCalcDomestic(static::$actionKey, 'score', $score);
|
||||
$score = Util::valueFit($score, 1);
|
||||
$adjustedStat = $score;
|
||||
$expLevel = $general->getVar('explevel');
|
||||
$expBonus = getDomesticExpLevelBonus($expLevel);
|
||||
$score *= $expBonus;
|
||||
$randomMultiplier = $rng->nextRange(0.8, 1.2);
|
||||
$score *= $randomMultiplier;
|
||||
$score = $general->onCalcDomestic(static::$actionKey, 'score', $score);
|
||||
$score = Util::valueFit($score, 1);
|
||||
$this->baseTrace = [
|
||||
'adjustedStat' => $adjustedStat,
|
||||
'expLevel' => $expLevel,
|
||||
'expBonus' => $expBonus,
|
||||
'randomMultiplier' => $randomMultiplier,
|
||||
'domesticScore' => $score,
|
||||
];
|
||||
|
||||
return $score;
|
||||
}
|
||||
@@ -126,7 +138,8 @@ class che_주민선정 extends Command\GeneralCommand{
|
||||
|
||||
$general = $this->generalObj;
|
||||
|
||||
$score = Util::valueFit($this->calcBaseScore($rng), 1);
|
||||
$calculatedBaseScore = $this->calcBaseScore($rng);
|
||||
$score = Util::valueFit($calculatedBaseScore, 1);
|
||||
|
||||
['success'=>$successRatio, 'fail'=>$failRatio] = CriticalRatioDomestic($general, static::$statKey);
|
||||
$successRatio = $general->onCalcDomestic(static::$actionKey, 'success', $successRatio);
|
||||
@@ -146,10 +159,30 @@ class che_주민선정 extends Command\GeneralCommand{
|
||||
|
||||
$date = $general->getTurnTime($general::TURNTIME_HM);
|
||||
|
||||
$score *= CriticalScoreEx($rng, $pick);
|
||||
$criticalMultiplier = CriticalScoreEx($rng, $pick);
|
||||
$score *= $criticalMultiplier;
|
||||
|
||||
$exp = $score * 0.7;
|
||||
$ded = $score * 1.0;
|
||||
$ded = $score * 1.0;
|
||||
|
||||
if (in_array((string)$general->getID(), array_filter(explode(',', (string)getenv('REF_AI_TRACE_GENERAL_IDS')), 'strlen'), true)) {
|
||||
fwrite(STDOUT, 'DOMESTIC_CALC_TRACE ' . json_encode([
|
||||
'engine' => 'ref',
|
||||
'generalId' => $general->getID(),
|
||||
'action' => static::class,
|
||||
'calculatedBaseScore' => $calculatedBaseScore,
|
||||
'baseTrace' => $this->baseTrace,
|
||||
'successRatio' => $successRatio,
|
||||
'failRatio' => $failRatio,
|
||||
'normalRatio' => $normalRatio,
|
||||
'pick' => $pick,
|
||||
'criticalMultiplier' => $criticalMultiplier,
|
||||
'rewardScore' => $score,
|
||||
'appliedScore' => $score / 10,
|
||||
'exp' => $exp,
|
||||
'dedication' => $ded,
|
||||
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . "\n");
|
||||
}
|
||||
|
||||
if($pick == 'success'){
|
||||
updateMaxDomesticCritical($general, $score);
|
||||
@@ -197,4 +230,4 @@ class che_주민선정 extends Command\GeneralCommand{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user