setReadOnly(); $userID = Session::getUserID(); $generalID = $session->generalID; $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); $me = General::createGeneralObjFromDB($generalID); $currentInheritBuff = []; foreach ($me->getAuxVar('inheritBuff')??[] as $buff => $buffLevel) { if (!key_exists($buff, TriggerInheritBuff::BUFF_KEY_TEXT)) { continue; } $currentInheritBuff[$buff] = $buffLevel; } function calcResetAttrPoint($level) { while (count(GameConst::$inheritResetAttrPointBase) <= $level) { $baseLen = count(GameConst::$inheritResetAttrPointBase); GameConst::$inheritResetAttrPointBase[] = GameConst::$inheritResetAttrPointBase[$baseLen - 1] + GameConst::$inheritResetAttrPointBase[$baseLen - 2]; } return GameConst::$inheritResetAttrPointBase[$level]; } $avilableSpecialWar = []; foreach (GameConst::$availableSpecialWar as $specialWarKey) { $specialWarObj = buildGeneralSpecialWarClass($specialWarKey); $avilableSpecialWar[$specialWarKey] = [ 'title' => $specialWarObj->getName(), 'info' => $specialWarObj->getInfo(), ]; } $availableUnique = []; foreach (GameConst::$allItems as $subItems){ foreach($subItems as $itemKey=>$amount){ if($amount == 0){ continue; } $itemObj = buildItemClass($itemKey); $availableUnique[$itemKey] = [ 'title' => $itemObj->getName(), 'info'=>$itemObj->getInfo(), ]; } } $items = []; foreach (array_keys(General::INHERITANCE_KEY) as $key) { $items[$key] = $me->getInheritancePoint($key) ?? 0; } $resetTurnTimeLevel = $me->getAuxVar('inheritResetTurnTime') ?? 0; $resetSpecialWarLevel = $me->getAuxVar('inheritResetSpecialWar') ?? 0; ?>