forked from devsam/core
Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46f460c8ad | ||
|
|
af4401d9bb | ||
|
|
2f00aee947 | ||
|
|
dd2b032fa3 | ||
|
|
1b858ae36c
|
||
|
|
69f4d8e2c7 | ||
|
|
f24aea0120 | ||
|
|
f6dc7f49e2 | ||
|
|
c5ed2d47fc |
@@ -90,6 +90,9 @@ class BuildNationCandidate extends \sammo\BaseAPI
|
||||
return '거병을 실패했습니다.';
|
||||
}
|
||||
|
||||
$general->setVar('killturn', $env['killturn']);
|
||||
$general->applyDB($db);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,13 +70,13 @@ class ResetTurnTime extends \sammo\BaseAPI
|
||||
UniqueConst::$hiddenSeed,
|
||||
'ResetTurnTime',
|
||||
$userID,
|
||||
$general->getTurnTime()
|
||||
$general->getAuxVar('nextTurnTimeBase') ?? $general->getTurnTime()
|
||||
)));
|
||||
|
||||
$afterTurn = $rng->nextFloat1() * $turnTerm * 60;
|
||||
|
||||
$userLogger = new UserLogger($userID);
|
||||
$userLogger->push(sprintf("{$reqPoint} 포인트로 턴 시간을 바꾸어 다음 턴부터 %02d:%02d 적용", intdiv(Util::toInt($afterTurn), 60), $afterTurn % 60), "inheritPoint");
|
||||
$userLogger->push(sprintf("{$reqPoint} 포인트로 턴 시간을 바꾸어 다다음 턴부터 %02d:%02d 적용", intdiv(Util::toInt($afterTurn), 60), $afterTurn % 60), "inheritPoint");
|
||||
$userLogger->flush();
|
||||
|
||||
$general->setAuxVar('inheritResetTurnTime', $nextLevel);
|
||||
|
||||
@@ -365,14 +365,14 @@ class General extends GeneralBase implements iAction
|
||||
}
|
||||
}
|
||||
|
||||
$this->calcCache[$cKey] = $statValue;
|
||||
|
||||
$statValue = Util::clamp($statValue, 0, GameConst::$maxLevel);
|
||||
|
||||
if ($useFloor) {
|
||||
return Util::toInt($statValue);
|
||||
}
|
||||
|
||||
$this->calcCache[$cKey] = $statValue;
|
||||
|
||||
return $statValue;
|
||||
}
|
||||
|
||||
@@ -806,7 +806,7 @@ class General extends GeneralBase implements iAction
|
||||
continue;
|
||||
}
|
||||
/** @var iAction $iObj */
|
||||
$value = $iObj->onCalcStat($this, $statName, $value, $aux);
|
||||
$value = $iObj->onCalcStat($general, $statName, $value, $aux);
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
@@ -819,7 +819,7 @@ class General extends GeneralBase implements iAction
|
||||
continue;
|
||||
}
|
||||
/** @var iAction $iObj */
|
||||
$value = $iObj->onCalcOpposeStat($this, $statName, $value, $aux);
|
||||
$value = $iObj->onCalcOpposeStat($general, $statName, $value, $aux);
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
@@ -3439,8 +3439,12 @@ class GeneralAI
|
||||
|
||||
$cmd = buildGeneralCommandClass($this->rng->choice($candidate), $this->general, $this->env);
|
||||
if (!$cmd->hasFullConditionMet()) {
|
||||
return buildGeneralCommandClass('che_물자조달', $this->general, $this->env);
|
||||
$cmd = buildGeneralCommandClass('che_물자조달', $this->general, $this->env);
|
||||
if (!$cmd->hasFullConditionMet()) {
|
||||
$cmd = buildGeneralCommandClass('che_견문', $this->general, $this->env);
|
||||
}
|
||||
}
|
||||
|
||||
return $cmd;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user