feat,refac: 남은 난수 생성값 추가 수정

- rand, mt_rand, Query rand() 쓰는 영역
- 거래장, 토너먼트는 남김
This commit is contained in:
2022-05-17 23:01:00 +09:00
parent c5ceff6fb5
commit 296a27a409
9 changed files with 63 additions and 36 deletions
+2 -2
View File
@@ -590,8 +590,8 @@ function ConquerCity(array $admin, General $general, array $city)
$loseGeneralGold = 0;
$loseGeneralRice = 0;
foreach ($oldNationGenerals as $oldGeneral) {
$loseGold = intdiv($oldGeneral->getVar('gold') * (rand() % 30 + 20), 100);
$loseRice = intdiv($oldGeneral->getVar('rice') * (rand() % 30 + 20), 100);
$loseGold = Util::toInt($oldGeneral->getVar('gold') * $rng->nextRange(0.2, 0.5));
$loseRice = Util::toInt($oldGeneral->getVar('rice') * $rng->nextRange(0.2, 0.5));
$oldGeneral->getLogger()->pushGeneralActionLog(
"도주하며 금<C>$loseGold</> 쌀<C>$loseRice</>을 분실했습니다.",
ActionLogger::PLAIN