유산 포인트 추가
This commit is contained in:
@@ -14,7 +14,8 @@ use function sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery
|
||||
tryUniqueItemLottery,
|
||||
updateMaxDomesticCritical
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
@@ -93,6 +94,13 @@ class che_기술연구 extends che_상업투자{
|
||||
$exp = $score * 0.7;
|
||||
$ded = $score * 1.0;
|
||||
|
||||
if($pick == 'success'){
|
||||
updateMaxDomesticCritical($general, $score);
|
||||
}
|
||||
else{
|
||||
$general->setAuxVar('max_domestic_critical', 0);
|
||||
}
|
||||
|
||||
$scoreText = number_format($score, 0);
|
||||
|
||||
$josaUl = JosaUtil::pick(static::$actionName, '을');
|
||||
|
||||
@@ -15,7 +15,8 @@ use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery
|
||||
tryUniqueItemLottery,
|
||||
updateMaxDomesticCritical
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
@@ -165,6 +166,13 @@ class che_상업투자 extends Command\GeneralCommand{
|
||||
$exp = $score * 0.7;
|
||||
$ded = $score * 1.0;
|
||||
|
||||
if($pick == 'success'){
|
||||
updateMaxDomesticCritical($general, $score);
|
||||
}
|
||||
else{
|
||||
$general->setAuxVar('max_domestic_critical', 0);
|
||||
}
|
||||
|
||||
$scoreText = number_format($score, 0);
|
||||
|
||||
$josaUl = JosaUtil::pick(static::$actionName, '을');
|
||||
@@ -203,6 +211,4 @@ class che_상업투자 extends Command\GeneralCommand{
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -15,7 +15,8 @@ use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery
|
||||
tryUniqueItemLottery,
|
||||
updateMaxDomesticCritical
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
@@ -150,6 +151,13 @@ class che_정착장려 extends Command\GeneralCommand{
|
||||
$exp = $score * 0.7;
|
||||
$ded = $score * 1.0;
|
||||
|
||||
if($pick == 'success'){
|
||||
updateMaxDomesticCritical($general, $score);
|
||||
}
|
||||
else{
|
||||
$general->setAuxVar('max_domestic_critical', 0);
|
||||
}
|
||||
|
||||
$score *= 10;
|
||||
|
||||
$scoreText = number_format($score, 0);
|
||||
@@ -187,5 +195,5 @@ class che_정착장려 extends Command\GeneralCommand{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -15,7 +15,8 @@ use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery
|
||||
tryUniqueItemLottery,
|
||||
updateMaxDomesticCritical
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
@@ -150,6 +151,13 @@ class che_주민선정 extends Command\GeneralCommand{
|
||||
$exp = $score * 0.7;
|
||||
$ded = $score * 1.0;
|
||||
|
||||
if($pick == 'success'){
|
||||
updateMaxDomesticCritical($general, $score);
|
||||
}
|
||||
else{
|
||||
$general->setAuxVar('max_domestic_critical', 0);
|
||||
}
|
||||
|
||||
$score /= 10;
|
||||
|
||||
$scoreText = number_format($score, 1);
|
||||
|
||||
@@ -53,9 +53,9 @@ class General implements iAction{
|
||||
const INHERITANCE_KEY = [
|
||||
'previous'=>[true, 1, '기존 포인트'],
|
||||
'lived_month'=>[true, 1, '생존'],
|
||||
'max_belong'=>[true, 10, '최대 임관년 수'],
|
||||
'max_belong'=>[false, 10, '최대 임관년 수'],
|
||||
'max_domestic_critical'=>[true, 1, '최대 연속 내정 성공'],
|
||||
'snipe_combat'=>[true, 10, '병종 저격 횟수'],
|
||||
'snipe_combat'=>[true, 10, '병종 상성 우위 횟수'],
|
||||
'combat'=>[['rank', 'warnum'], 5, '전투 횟수'],
|
||||
'sabotage'=>[['rank', 'firenum'], 20, '계략 성공 횟수'],
|
||||
'unifier'=>[true, 1, '천통 수뇌'],
|
||||
@@ -1227,6 +1227,12 @@ class General implements iAction{
|
||||
return [$betWin * $multiplier * pow($betWinRate, 2), null];
|
||||
};
|
||||
break;
|
||||
case 'max_belong':
|
||||
$extractFn = function() use ($multiplier){
|
||||
$maxBelong = max($this->getVar('belong'), $this->getAuxVar('max_belong')??0);
|
||||
return [$maxBelong * $multiplier, null];
|
||||
};
|
||||
break;
|
||||
default:
|
||||
throw new \InvalidArgumentException("{$key}는 유산 추출기를 보유하고 있지 않음");
|
||||
}
|
||||
|
||||
@@ -257,6 +257,8 @@ class TurnExecutionHelper
|
||||
$autorunMode = false;
|
||||
$ai = null;
|
||||
|
||||
$general->increaseInheritancePoint('lived_month', 1);
|
||||
|
||||
$turnObj->preprocessCommand($env);
|
||||
$generalCommandObj = $general->getReservedTurn(0, $env);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user