InheritAction: UI 턴 초기화, 전투 특기 초기화, 랜덤 유니크

- 턴 초기화에 버그가 있는듯?
This commit is contained in:
2021-09-15 19:06:15 +00:00
committed by Gitea
parent 07b49dca49
commit f69a2be045
7 changed files with 174 additions and 26 deletions
@@ -50,7 +50,7 @@ class ResetSpecialWar extends \sammo\BaseAPI
$db = DB::db();
$inheritStor = KVStorage::getStorage($db, "inheritance_{$userID}");
$previousPoint = $inheritStor->getValue('previous') ?? 0;
$previousPoint = ($inheritStor->getValue('previous') ?? [0, 0])[0];
if ($previousPoint < $reqPoint) {
return '충분한 유산 포인트를 가지고 있지 않습니다.';
}
@@ -62,7 +62,7 @@ class ResetSpecialWar extends \sammo\BaseAPI
$general->setAuxVar('inheritResetSpecialWar', $nextLevel);
$general->setVar('special2', 'None');
$inheritStor->setValue('previous', $previousPoint - $reqPoint);
$inheritStor->setValue('previous', [$previousPoint - $reqPoint, 'ResetSpecialWar']);
$general->applyDB($db);
return null;
}