@lf_maple/koishi-plugin-phi-plugin-full 0.1.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/core/.github/ISSUE_TEMPLATE/bug.yaml +133 -0
- package/core/.github/ISSUE_TEMPLATE/config.yml +1 -0
- package/core/.github/ISSUE_TEMPLATE/enhancement.yml +44 -0
- package/core/.vscode/c_cpp_properties.json +18 -0
- package/core/.vscode/launch.json +24 -0
- package/core/.vscode/settings.json +59 -0
- package/core/CHANGELOG.md +184 -0
- package/core/LICENSE +674 -0
- package/core/README.md +330 -0
- package/core/README_en.md +285 -0
- package/core/apps/Dan.js +129 -0
- package/core/apps/RankList.js +322 -0
- package/core/apps/aliasProposal.js +223 -0
- package/core/apps/apiSetting.js +592 -0
- package/core/apps/b19.js +1329 -0
- package/core/apps/botClient.js +64 -0
- package/core/apps/chart.js +692 -0
- package/core/apps/guessGame/guessIll.js +821 -0
- package/core/apps/guessGame/guessLetter.js +831 -0
- package/core/apps/guessGame/guessTips.js +254 -0
- package/core/apps/guessGame/letterGameUtils.js +74 -0
- package/core/apps/guessGame.js +214 -0
- package/core/apps/help.js +117 -0
- package/core/apps/manage.js +288 -0
- package/core/apps/market.js +243 -0
- package/core/apps/money.js +1064 -0
- package/core/apps/phisong.js +1418 -0
- package/core/apps/session.js +664 -0
- package/core/apps/setting.js +468 -0
- package/core/apps/update.js +541 -0
- package/core/apps/user.js +968 -0
- package/core/components/Config.js +249 -0
- package/core/components/Data.js +304 -0
- package/core/components/FileWatcherRegistry.js +102 -0
- package/core/components/Logger.js +11 -0
- package/core/components/ProcessCleanup.js +113 -0
- package/core/components/Version.js +56 -0
- package/core/components/YamlReader.js +157 -0
- package/core/components/baseClass.js +287 -0
- package/core/components/common.js +47 -0
- package/core/components/index.js +13 -0
- package/core/components/platform/index.js +79 -0
- package/core/components/platform/koishi.js +800 -0
- package/core/components/platform/koishiDatabaseRedis.js +391 -0
- package/core/components/platform/memoryRedis.js +209 -0
- package/core/components/platform/types.d.ts +272 -0
- package/core/components/platform/yunzai.js +604 -0
- package/core/components/segment.js +4 -0
- package/core/config/config//350/277/231/351/207/214/346/230/257/351/205/215/347/275/256/346/226/207/344/273/266/347/233/256/345/275/225.txt +0 -0
- package/core/config/default_config/banGroup.yaml +14 -0
- package/core/config/default_config/config.yaml +159 -0
- package/core/config/default_config/nickconfig.yaml +6 -0
- package/core/config/default_config/otherinfo.yaml +51 -0
- package/core/guoba.support.js +597 -0
- package/core/index.js +85 -0
- package/core/lib/AES.js +40 -0
- package/core/lib/Base64.js +22 -0
- package/core/lib/ByteReader.js +168 -0
- package/core/lib/GameProgress.js +37 -0
- package/core/lib/GameRecord.js +47 -0
- package/core/lib/GameSettings.js +24 -0
- package/core/lib/GameUser.js +19 -0
- package/core/lib/Level.js +6 -0
- package/core/lib/LevelRecord.js +9 -0
- package/core/lib/PhigrosUser.js +135 -0
- package/core/lib/SaveManager.js +117 -0
- package/core/lib/Summary.js +47 -0
- package/core/lib/TapTap/CompleteQRCodeData.js +27 -0
- package/core/lib/TapTap/LCHelper.js +81 -0
- package/core/lib/TapTap/TapTapHelper.js +170 -0
- package/core/lib/TapTap/getQRcode.js +61 -0
- package/core/lib/Util.js +30 -0
- package/core/lib/getQRcode.js +73 -0
- package/core/lib/http.js +105 -0
- package/core/model/README.md +3 -0
- package/core/model/api/aliasProposalService.js +151 -0
- package/core/model/api/apiVersion.js +67 -0
- package/core/model/api/autoSeekApi.js +165 -0
- package/core/model/api/botApiAuth.js +208 -0
- package/core/model/api/botSyncService.js +78 -0
- package/core/model/api/gameRecordPayload.js +24 -0
- package/core/model/api/makeRequest.js +1004 -0
- package/core/model/api/makeRequestFnc.js +17 -0
- package/core/model/api/phiApiClient.js +53 -0
- package/core/model/api/phiApiErrors.js +121 -0
- package/core/model/filesystem/getFile.js +256 -0
- package/core/model/filesystem/path.js +84 -0
- package/core/model/game/Chart.js +57 -0
- package/core/model/game/LevelRecordInfo.js +109 -0
- package/core/model/game/SongsInfo.js +46 -0
- package/core/model/game/b30Analysis.js +93 -0
- package/core/model/game/chartParser/Chart.js +23 -0
- package/core/model/game/chartParser/JudgeLine.js +38 -0
- package/core/model/game/chartParser/base/JudgeLineEvent.js +99 -0
- package/core/model/game/chartParser/base/Note.js +44 -0
- package/core/model/game/chartParser/base/SpeedEvent.js +25 -0
- package/core/model/game/chartParser/base/baseType.js +2 -0
- package/core/model/game/constNum.js +215 -0
- package/core/model/game/fCompute.js +711 -0
- package/core/model/game/getChartTag.js +140 -0
- package/core/model/game/getComment.js +132 -0
- package/core/model/game/getInfo.js +1069 -0
- package/core/model/game/getRksRank.js +77 -0
- package/core/model/game/markdown.js +77 -0
- package/core/model/integrations/Vika.js +103 -0
- package/core/model/integrations/getInfoFromTap.js +80 -0
- package/core/model/render/getPic.js +79 -0
- package/core/model/render/picmodle.js +496 -0
- package/core/model/render/progress-bar.js +44 -0
- package/core/model/render/puppeteer.js +431 -0
- package/core/model/render/renderPressureHistory.js +71 -0
- package/core/model/render/send.js +94 -0
- package/core/model/save/Save.js +953 -0
- package/core/model/save/analyzeSaveHistory.js +413 -0
- package/core/model/save/getBackup.js +328 -0
- package/core/model/save/getSave.js +90 -0
- package/core/model/save/getSaveFromApi.js +46 -0
- package/core/model/save/saveHistory.js +586 -0
- package/core/model/save/scoreHistory.js +101 -0
- package/core/model/theme/catalog.js +192 -0
- package/core/model/theme/installGuard.js +275 -0
- package/core/model/theme/installLock.js +174 -0
- package/core/model/theme/installer.js +398 -0
- package/core/model/theme/manager.js +408 -0
- package/core/model/theme/marketClient.js +294 -0
- package/core/model/theme/paths.js +42 -0
- package/core/model/theme/policy.js +54 -0
- package/core/model/theme/recovery.js +167 -0
- package/core/model/theme/useService.js +187 -0
- package/core/model/type/aliasProposal.d.ts +45 -0
- package/core/model/type/type.js +420 -0
- package/core/model/user/apiPermission.js +62 -0
- package/core/model/user/getBanGroup.js +120 -0
- package/core/model/user/getNotes.js +48 -0
- package/core/model/user/pluginData.js +101 -0
- package/core/model/user/userCredentialStore.js +154 -0
- package/core/model/user/userCredentials.js +860 -0
- package/core/package.json +60 -0
- package/core/resources/0608badSave/save.json +1 -0
- package/core/resources/LICENSE +201 -0
- package/core/resources/html/analyzeSaveHistory/analyzeSaveHistory.art +220 -0
- package/core/resources/html/analyzeSaveHistory/analyzeSaveHistory.css +345 -0
- package/core/resources/html/analyzeSaveHistory/analyzeSaveHistory.html +434 -0
- package/core/resources/html/arcgrosB19/arcgros.png +0 -0
- package/core/resources/html/arcgrosB19/arcgrosB19-orz.html +276 -0
- package/core/resources/html/arcgrosB19/arcgrosB19.art +168 -0
- package/core/resources/html/arcgrosB19/arcgrosB19.css +637 -0
- package/core/resources/html/atlas/atlas-orz.html +313 -0
- package/core/resources/html/atlas/atlas.art +194 -0
- package/core/resources/html/atlas/atlas.css +695 -0
- package/core/resources/html/avatar/-SURREALISM-.png +0 -0
- package/core/resources/html/avatar/Alkaid.png +0 -0
- package/core/resources/html/avatar/Aphasia.png +0 -0
- package/core/resources/html/avatar/Artificial Existence.png +0 -0
- package/core/resources/html/avatar/Bonus Time.png +0 -0
- package/core/resources/html/avatar/Burn.png +0 -0
- package/core/resources/html/avatar/Cereris1.png +0 -0
- package/core/resources/html/avatar/Cereris2.png +0 -0
- package/core/resources/html/avatar/Cereris3.png +0 -0
- package/core/resources/html/avatar/Christmas -2019.png +0 -0
- package/core/resources/html/avatar/Cipher1.png +0 -0
- package/core/resources/html/avatar/Class Memories.png +0 -0
- package/core/resources/html/avatar/Credits.png +0 -0
- package/core/resources/html/avatar/Dash.png +0 -0
- package/core/resources/html/avatar/Dlyrotz.png +0 -0
- package/core/resources/html/avatar/Doppelganger1.png +0 -0
- package/core/resources/html/avatar/Doppelganger2.png +0 -0
- package/core/resources/html/avatar/Drop it.png +0 -0
- package/core/resources/html/avatar/Energy Synergy Matrix1.png +0 -0
- package/core/resources/html/avatar/Energy Synergy Matrix2.png +0 -0
- package/core/resources/html/avatar/Energy Synergy Matrix3.png +0 -0
- package/core/resources/html/avatar/Engine x Start!! (melody mix).png +0 -0
- package/core/resources/html/avatar/Engine x Start!! extra 1 -by cycats.png +0 -0
- package/core/resources/html/avatar/Eradication Catastrophe.png +0 -0
- package/core/resources/html/avatar/FULi AUTO SHOOTER extra 1 -by cycats.png +0 -0
- package/core/resources/html/avatar/FULi AUTO SHOOTER.png +0 -0
- package/core/resources/html/avatar/Feast/350/277/234/344/270/234/344/271/213/345/256/264-Special1.png +0 -0
- package/core/resources/html/avatar/Feast/350/277/234/344/270/234/344/271/213/345/256/264-Special2.png +0 -0
- package/core/resources/html/avatar/Feast/350/277/234/344/270/234/344/271/213/345/256/2641.png +0 -0
- package/core/resources/html/avatar/Feast/350/277/234/344/270/234/344/271/213/345/256/2642.png +0 -0
- package/core/resources/html/avatar/Feast/350/277/234/344/270/234/344/271/213/345/256/2643.png +0 -0
- package/core/resources/html/avatar/Feast/350/277/234/344/270/234/344/271/213/345/256/2644.png +0 -0
- package/core/resources/html/avatar/Feast/350/277/234/344/270/234/344/271/213/345/256/2645.png +0 -0
- package/core/resources/html/avatar/Feast/350/277/234/344/270/234/344/271/213/345/256/2646.png +0 -0
- package/core/resources/html/avatar/Feast/350/277/234/344/270/234/344/271/213/345/256/2647.png +0 -0
- package/core/resources/html/avatar/Feast/350/277/234/344/270/234/344/271/213/345/256/2648.png +0 -0
- package/core/resources/html/avatar/Feast/350/277/234/344/270/234/344/271/213/345/256/2649.png +0 -0
- package/core/resources/html/avatar/Find_Me.png +0 -0
- package/core/resources/html/avatar/Geopelia 1 -by cycats.png +0 -0
- package/core/resources/html/avatar/Geopelia 2 -by cycats.png +0 -0
- package/core/resources/html/avatar/Geopelia 3 -by /344/275/225/345/221/265.png +0 -0
- package/core/resources/html/avatar/Geopelia in WEPLAY -by /346/265/267/344/272/247.png +0 -0
- package/core/resources/html/avatar/Gino-AprilFool.png +0 -0
- package/core/resources/html/avatar/Glaciaxion.png +0 -0
- package/core/resources/html/avatar/HumaN.png +0 -0
- package/core/resources/html/avatar/Indelible Scar.png +0 -0
- package/core/resources/html/avatar/Introduction.png +0 -0
- package/core/resources/html/avatar/Khronostasis Katharsis.png +0 -0
- package/core/resources/html/avatar/MARENOL.png +0 -0
- package/core/resources/html/avatar/Marenol extra 1 -by /345/226/265n/350/221/265.png +0 -0
- package/core/resources/html/avatar/Non-Melodic Ragez (MUG Edit).png +0 -0
- package/core/resources/html/avatar/Non-Melodic Ragez extra 1 -by cycats.png +0 -0
- package/core/resources/html/avatar/Oblivion +0 -0
- package/core/resources/html/avatar/OblivionPHIN.png +0 -0
- package/core/resources/html/avatar/Para.png +0 -0
- package/core/resources/html/avatar/Pixel Rebelz1.png +0 -0
- package/core/resources/html/avatar/Pixel Rebelz2.png +0 -0
- package/core/resources/html/avatar/Pixel Rebelz3.png +0 -0
- package/core/resources/html/avatar/RIPPER extra 1 -by cycats.png +0 -0
- package/core/resources/html/avatar/RIPPER extra 2 -by /344/275/225/345/221/265.png +0 -0
- package/core/resources/html/avatar/Sein.png +0 -0
- package/core/resources/html/avatar/ShineAfter-/346/260/264/351/235/222-Special.png +0 -0
- package/core/resources/html/avatar/ShineAfter-/346/260/264/351/235/222-Special2.png +0 -0
- package/core/resources/html/avatar/ShineAfter-/346/260/264/351/235/222-/346/231/256/351/200/232.png +0 -0
- package/core/resources/html/avatar/ShineAfter-/346/260/264/351/235/222-/346/233/262/347/273/230Ver.png +0 -0
- package/core/resources/html/avatar/ShineAfter-/351/270/240-Special.png +0 -0
- package/core/resources/html/avatar/ShineAfter-/351/270/240-/346/231/256/351/200/232.png +0 -0
- package/core/resources/html/avatar/ShineAfter-/351/270/240-/346/233/262/347/273/230Ver.png +0 -0
- package/core/resources/html/avatar/ShineAfter-/351/270/240/345/222/214/346/260/264/351/235/222-Special.png +0 -0
- package/core/resources/html/avatar/Snow Desert.png +0 -0
- package/core/resources/html/avatar/Sparkle New Life.png +0 -0
- package/core/resources/html/avatar/Sultan Rage.png +0 -0
- package/core/resources/html/avatar/Winter /342/206/221cube/342/206/223.png +0 -0
- package/core/resources/html/avatar/Xenolith.png +0 -0
- package/core/resources/html/avatar/[PRAW].png +0 -0
- package/core/resources/html/avatar/dB doll.png +0 -0
- package/core/resources/html/avatar/ripper.png +0 -0
- package/core/resources/html/avatar//343/202/202/343/201/272/343/202/202/343/201/2721.png +0 -0
- package/core/resources/html/avatar//343/202/202/343/201/272/343/202/202/343/201/2722.png +0 -0
- package/core/resources/html/avatar//344/270/207/345/220/250/345/214/277/345/220/215/344/277/241.png +0 -0
- package/core/resources/html/avatar//344/272/221/345/245/263/345/255/251 extra 1 -by /345/276/241/345/235/202/346/236/234/345/255/220.png +0 -0
- package/core/resources/html/avatar//344/272/221/345/245/263/345/255/251.png +0 -0
- package/core/resources/html/avatar//345/205/211.png +0 -0
- package/core/resources/html/avatar//345/274/200/345/277/203/347/227/2051.png +0 -0
- package/core/resources/html/avatar//345/274/200/345/277/203/347/227/2052.png +0 -0
- package/core/resources/html/avatar//346/260/264/351/235/222-/344/270/200/345/221/250/345/271/264/347/233/270/350/201/232.png +0 -0
- package/core/resources/html/avatar//346/267/267/344/271/261-Confusion.png +0 -0
- package/core/resources/html/avatar//347/213/202/345/226/234/350/230/255/350/210/2361.png +0 -0
- package/core/resources/html/avatar//347/213/202/345/226/234/350/230/255/350/210/2362.png +0 -0
- package/core/resources/html/avatar//347/223/267/345/262/201-Special.png +0 -0
- package/core/resources/html/avatar//347/223/267/345/262/2011.png +0 -0
- package/core/resources/html/avatar//347/223/267/345/262/2012.png +0 -0
- package/core/resources/html/avatar//347/223/267/345/262/2013.png +0 -0
- package/core/resources/html/avatar//347/223/267/345/262/2014.png +0 -0
- package/core/resources/html/avatar//347/223/267/345/262/2015.png +0 -0
- package/core/resources/html/avatar//347/223/267/345/262/2016.png +0 -0
- package/core/resources/html/avatar//347/223/267/345/262/2017.png +0 -0
- package/core/resources/html/avatar//347/233/217/350/214/227-Special.png +0 -0
- package/core/resources/html/avatar//347/233/217/350/214/2271.png +0 -0
- package/core/resources/html/avatar//347/233/217/350/214/2272.png +0 -0
- package/core/resources/html/avatar//347/233/217/350/214/2273.png +0 -0
- package/core/resources/html/avatar//350/217/257/347/201/257/347/210/2611.png +0 -0
- package/core/resources/html/avatar//350/217/257/347/201/257/347/210/2612.png +0 -0
- package/core/resources/html/avatar//350/220/244/347/201/253/350/231/253/343/201/256/346/200/2501.png +0 -0
- package/core/resources/html/avatar//350/220/244/347/201/253/350/231/253/343/201/256/346/200/2502.png +0 -0
- package/core/resources/html/avatar//351/235/222/350/212/275-Special.png +0 -0
- package/core/resources/html/avatar//351/235/222/350/212/275.png +0 -0
- package/core/resources/html/avatar//351/243/216/345/261/277.png +0 -0
- package/core/resources/html/avatar//351/270/240-AprilFool.png +0 -0
- package/core/resources/html/avatar//351/270/240-/344/270/200/345/221/250/345/271/264/347/233/270/350/201/232.png +0 -0
- package/core/resources/html/b19/b19.art +490 -0
- package/core/resources/html/b19/b19.css +1261 -0
- package/core/resources/html/b19/b19666.art +350 -0
- package/core/resources/html/b19/b19666.css +1409 -0
- package/core/resources/html/b19/b19666.html +481 -0
- package/core/resources/html/b19/b19title.css +120 -0
- package/core/resources/html/b19/best19.html +853 -0
- package/core/resources/html/b19/dss2-orz.html +428 -0
- package/core/resources/html/b19/dss2.art +298 -0
- package/core/resources/html/b19/dss2.css +776 -0
- package/core/resources/html/b19/res/666.jpeg +0 -0
- package/core/resources/html/chap/chap-orz.html +93 -0
- package/core/resources/html/chap/chap.art +87 -0
- package/core/resources/html/chap/chap.css +365 -0
- package/core/resources/html/chartImg/chartImg.art +169 -0
- package/core/resources/html/chartImg/chartImg.css +439 -0
- package/core/resources/html/chartImg/echarts-wordcloud.min.js +3 -0
- package/core/resources/html/chartImg/echarts.js +85796 -0
- package/core/resources/html/chartImg/img/Drag.png +0 -0
- package/core/resources/html/chartImg/img/DragHL.png +0 -0
- package/core/resources/html/chartImg/img/Flick.png +0 -0
- package/core/resources/html/chartImg/img/FlickHL.png +0 -0
- package/core/resources/html/chartImg/img/Hold.png +0 -0
- package/core/resources/html/chartImg/img/HoldHL.png +0 -0
- package/core/resources/html/chartImg/img/Hold_End.png +0 -0
- package/core/resources/html/chartImg/img/Hold_Head.png +0 -0
- package/core/resources/html/chartImg/img/Hold_HeadHL.png +0 -0
- package/core/resources/html/chartImg/img/Tap.png +0 -0
- package/core/resources/html/chartImg/img/TapHL.png +0 -0
- package/core/resources/html/chartInfo/chartInfo-orz.html +250 -0
- package/core/resources/html/chartInfo/chartInfo.art +222 -0
- package/core/resources/html/chartInfo/chartInfo.css +265 -0
- package/core/resources/html/chartInfo/echarts-wordcloud.min.js +3 -0
- package/core/resources/html/chartInfo/echarts.js +85796 -0
- package/core/resources/html/clg/clg-orz.html +218 -0
- package/core/resources/html/clg/clg.art +88 -0
- package/core/resources/html/clg/clg.css +230 -0
- package/core/resources/html/clg/demo.jpg +0 -0
- package/core/resources/html/common/common.css +319 -0
- package/core/resources/html/common/css/playerInfo.css +136 -0
- package/core/resources/html/common/font/Aldrich-Regular.ttf +0 -0
- package/core/resources/html/common/font/HIMALAYA.TTF +0 -0
- package/core/resources/html/common/font/NotoColorEmoji-Regular.ttf +0 -0
- package/core/resources/html/common/font/NotoSans-Regular.ttf +0 -0
- package/core/resources/html/common/font/NotoSansArabic.ttf +0 -0
- package/core/resources/html/common/font/NotoSansCanadianAboriginal.ttf +0 -0
- package/core/resources/html/common/font/NotoSansJP.ttf +0 -0
- package/core/resources/html/common/font/NotoSansKannada.ttf +0 -0
- package/core/resources/html/common/font/NotoSansMath-Regular.ttf +0 -0
- package/core/resources/html/common/font/NotoSansSymbols2.ttf +0 -0
- package/core/resources/html/common/font/phi.ttf +0 -0
- package/core/resources/html/common/font//345/220/236/345/274/245/346/201/260/344/277/212.ttf +0 -0
- package/core/resources/html/common/layout/default.art +324 -0
- package/core/resources/html/common/layout/elem.art +21 -0
- package/core/resources/html/common/theme/snow/snow.css +17 -0
- package/core/resources/html/common/theme/snow/snow.js +19 -0
- package/core/resources/html/common/theme/star/star.js +201 -0
- package/core/resources/html/common/theme/topText/topText.css +15 -0
- package/core/resources/html/common/theme/topText/topText.js +30 -0
- package/core/resources/html/difficultyHistory/difficultyHistory-orz.html +361 -0
- package/core/resources/html/difficultyHistory/difficultyHistory.art +102 -0
- package/core/resources/html/difficultyHistory/difficultyHistory.css +205 -0
- package/core/resources/html/guess/guess-orz.html +50 -0
- package/core/resources/html/guess/guess.art +51 -0
- package/core/resources/html/guess/guess.css +33 -0
- package/core/resources/html/help/help-orz.html +73 -0
- package/core/resources/html/help/help.art +84 -0
- package/core/resources/html/help/help.css +266 -0
- package/core/resources/html/historyB30/historyB30-orz.html +168 -0
- package/core/resources/html/historyB30/historyB30.art +143 -0
- package/core/resources/html/historyB30/historyB30.css +270 -0
- package/core/resources/html/ill/ill-orz.html +21 -0
- package/core/resources/html/ill/ill.art +23 -0
- package/core/resources/html/ill/ill.css +79 -0
- package/core/resources/html/jrrp/ShineAfter.removebg.png +0 -0
- package/core/resources/html/jrrp/jrrp-orz.html +68 -0
- package/core/resources/html/jrrp/jrrp.art +58 -0
- package/core/resources/html/jrrp/jrrp.css +251 -0
- package/core/resources/html/list/list-orz.html +35 -0
- package/core/resources/html/list/list.art +67 -0
- package/core/resources/html/list/list.css +259 -0
- package/core/resources/html/lvsco/demo.jpg +0 -0
- package/core/resources/html/lvsco/lvsco-orz.html +334 -0
- package/core/resources/html/lvsco/lvsco.art +314 -0
- package/core/resources/html/lvsco/lvsco.css +706 -0
- package/core/resources/html/market/detail.art +44 -0
- package/core/resources/html/market/market.art +86 -0
- package/core/resources/html/market/market.css +64 -0
- package/core/resources/html/newSong/newSong.art +34 -0
- package/core/resources/html/newSong/newSong.css +48 -0
- package/core/resources/html/newSong/newSong.html +23 -0
- package/core/resources/html/newnotice/newnotice.art +47 -0
- package/core/resources/html/newnotice/newnotice.css +83 -0
- package/core/resources/html/otherimg/0.png +0 -0
- package/core/resources/html/otherimg/1.png +0 -0
- package/core/resources/html/otherimg/2.png +0 -0
- package/core/resources/html/otherimg/3.png +0 -0
- package/core/resources/html/otherimg/4.png +0 -0
- package/core/resources/html/otherimg/5.png +0 -0
- package/core/resources/html/otherimg/A.png +0 -0
- package/core/resources/html/otherimg/B.png +0 -0
- package/core/resources/html/otherimg/C.png +0 -0
- package/core/resources/html/otherimg/F.png +0 -0
- package/core/resources/html/otherimg/FC.png +0 -0
- package/core/resources/html/otherimg/NEW.png +0 -0
- package/core/resources/html/otherimg/Phigros_Icon_3.0.0.png +0 -0
- package/core/resources/html/otherimg/S.png +0 -0
- package/core/resources/html/otherimg/Star1.png +0 -0
- package/core/resources/html/otherimg/Star2.png +0 -0
- package/core/resources/html/otherimg/V.png +0 -0
- package/core/resources/html/otherimg/callback.png +0 -0
- package/core/resources/html/otherimg/chapHelp.png +0 -0
- package/core/resources/html/otherimg/dan_code.png +0 -0
- package/core/resources/html/otherimg/data.png +0 -0
- package/core/resources/html/otherimg/helpDoc.png +0 -0
- package/core/resources/html/otherimg/nickSuggest.png +0 -0
- package/core/resources/html/otherimg/phi.png +0 -0
- package/core/resources/html/otherimg/phigros.png +0 -0
- package/core/resources/html/otherimg/snow1.png +0 -0
- package/core/resources/html/otherimg/snow2.png +0 -0
- package/core/resources/html/otherimg/snow3.png +0 -0
- package/core/resources/html/otherimg/snow4.png +0 -0
- package/core/resources/html/otherimg/title.png +0 -0
- package/core/resources/html/rand/rand-orz.html +62 -0
- package/core/resources/html/rand/rand.art +59 -0
- package/core/resources/html/rand/rand.css +257 -0
- package/core/resources/html/rankingList/rankingList-orz.html +456 -0
- package/core/resources/html/rankingList/rankingList.art +171 -0
- package/core/resources/html/rankingList/rankingList.css +570 -0
- package/core/resources/html/rankingList-old/rankingList-orz.html +300 -0
- package/core/resources/html/rankingList-old/rankingList.art +89 -0
- package/core/resources/html/rankingList-old/rankingList.css +265 -0
- package/core/resources/html/score/score-orz.html +625 -0
- package/core/resources/html/score/score.art +249 -0
- package/core/resources/html/score/score.css +435 -0
- package/core/resources/html/score/scoreOld-orz.html +128 -0
- package/core/resources/html/score/scoreOld.art +230 -0
- package/core/resources/html/score/scoreOld.css +475 -0
- package/core/resources/html/score/scoreRankList-orz.html +613 -0
- package/core/resources/html/score/scoreRankList.art +231 -0
- package/core/resources/html/score/scoreRankList.css +197 -0
- package/core/resources/html/setting/setting-orz.html +123 -0
- package/core/resources/html/setting/setting.art +72 -0
- package/core/resources/html/setting/setting.css +170 -0
- package/core/resources/html/setting/userSetting-orz.html +132 -0
- package/core/resources/html/setting/userSetting.art +48 -0
- package/core/resources/html/setting/userSetting.css +160 -0
- package/core/resources/html/sign/sign-orz.html +262 -0
- package/core/resources/html/sign/sign.art +163 -0
- package/core/resources/html/sign/sign.css +706 -0
- package/core/resources/html/suggest/suggest.art +271 -0
- package/core/resources/html/suggest/suggest.css +300 -0
- package/core/resources/html/table/table-orz.html +228 -0
- package/core/resources/html/table/table.art +163 -0
- package/core/resources/html/table/table.css +401 -0
- package/core/resources/html/tasks/tasks-orz.html +83 -0
- package/core/resources/html/tasks/tasks.art +118 -0
- package/core/resources/html/tasks/tasks.css +334 -0
- package/core/resources/html/update/update-orz.html +735 -0
- package/core/resources/html/update/update.art +259 -0
- package/core/resources/html/update/update.css +676 -0
- package/core/resources/html/userinfo/userinfo-old-orz.html +408 -0
- package/core/resources/html/userinfo/userinfo-old.art +233 -0
- package/core/resources/html/userinfo/userinfo-old.css +466 -0
- package/core/resources/html/userinfo/userinfo-orz.html +543 -0
- package/core/resources/html/userinfo/userinfo.art +288 -0
- package/core/resources/html/userinfo/userinfo.css +757 -0
- package/core/resources/info/DLC/arc.json +412 -0
- package/core/resources/info/DLC/chunithm.json +1172 -0
- package/core/resources/info/DLC/dynamix.json +455 -0
- package/core/resources/info/DLC/fanshi.json +132 -0
- package/core/resources/info/DLC/lanota.json +412 -0
- package/core/resources/info/DLC/maimai.json +1110 -0
- package/core/resources/info/DLC/orz.json +158 -0
- package/core/resources/info/DLC/rizline.json +40 -0
- package/core/resources/info/DLC/rotaeno.json +159 -0
- package/core/resources/info/DLC/ryceam.json +53 -0
- package/core/resources/info/avatar.txt +109 -0
- package/core/resources/info/chaplist.yaml +102 -0
- package/core/resources/info/help/api.json +83 -0
- package/core/resources/info/help.json +436 -0
- package/core/resources/info/info.csv +315 -0
- package/core/resources/info/infolist.json +1758 -0
- package/core/resources/info/jrrp.json +92 -0
- package/core/resources/info/nicklist.yaml +2373 -0
- package/core/resources/info/notesInfo.json +1 -0
- package/core/resources/info/notice.json +11 -0
- package/core/resources/info/oldInfo/100/change.csv +218 -0
- package/core/resources/info/oldInfo/100/info.json +7 -0
- package/core/resources/info/oldInfo/101/change.csv +218 -0
- package/core/resources/info/oldInfo/101/info.json +7 -0
- package/core/resources/info/oldInfo/102/change.csv +223 -0
- package/core/resources/info/oldInfo/102/info.json +7 -0
- package/core/resources/info/oldInfo/103/change.csv +224 -0
- package/core/resources/info/oldInfo/103/info.json +7 -0
- package/core/resources/info/oldInfo/104/change.csv +225 -0
- package/core/resources/info/oldInfo/104/info.json +7 -0
- package/core/resources/info/oldInfo/105/change.csv +228 -0
- package/core/resources/info/oldInfo/105/info.json +7 -0
- package/core/resources/info/oldInfo/106/change.csv +229 -0
- package/core/resources/info/oldInfo/106/info.json +7 -0
- package/core/resources/info/oldInfo/108/change.csv +233 -0
- package/core/resources/info/oldInfo/108/info.json +7 -0
- package/core/resources/info/oldInfo/109/change.csv +235 -0
- package/core/resources/info/oldInfo/109/info.json +7 -0
- package/core/resources/info/oldInfo/110/change.csv +235 -0
- package/core/resources/info/oldInfo/110/info.json +7 -0
- package/core/resources/info/oldInfo/111/change.csv +242 -0
- package/core/resources/info/oldInfo/111/info.json +7 -0
- package/core/resources/info/oldInfo/112/change.csv +242 -0
- package/core/resources/info/oldInfo/112/info.json +7 -0
- package/core/resources/info/oldInfo/113/change.csv +244 -0
- package/core/resources/info/oldInfo/113/info.json +7 -0
- package/core/resources/info/oldInfo/115/change.csv +247 -0
- package/core/resources/info/oldInfo/115/info.json +7 -0
- package/core/resources/info/oldInfo/116/change.csv +249 -0
- package/core/resources/info/oldInfo/116/info.json +7 -0
- package/core/resources/info/oldInfo/118/change.csv +252 -0
- package/core/resources/info/oldInfo/118/info.json +7 -0
- package/core/resources/info/oldInfo/119/change.csv +255 -0
- package/core/resources/info/oldInfo/119/info.json +7 -0
- package/core/resources/info/oldInfo/120/change.csv +255 -0
- package/core/resources/info/oldInfo/120/info.json +7 -0
- package/core/resources/info/oldInfo/121/change.csv +257 -0
- package/core/resources/info/oldInfo/121/info.json +7 -0
- package/core/resources/info/oldInfo/122/change.csv +260 -0
- package/core/resources/info/oldInfo/122/info.json +7 -0
- package/core/resources/info/oldInfo/123/change.csv +260 -0
- package/core/resources/info/oldInfo/123/info.json +7 -0
- package/core/resources/info/oldInfo/124/change.csv +262 -0
- package/core/resources/info/oldInfo/124/info.json +7 -0
- package/core/resources/info/oldInfo/125/change.csv +266 -0
- package/core/resources/info/oldInfo/125/info.json +7 -0
- package/core/resources/info/oldInfo/126/change.csv +269 -0
- package/core/resources/info/oldInfo/126/info.json +7 -0
- package/core/resources/info/oldInfo/127/change.csv +270 -0
- package/core/resources/info/oldInfo/127/info.json +7 -0
- package/core/resources/info/oldInfo/128/change.csv +273 -0
- package/core/resources/info/oldInfo/128/info.json +7 -0
- package/core/resources/info/oldInfo/129/change.csv +274 -0
- package/core/resources/info/oldInfo/129/info.json +7 -0
- package/core/resources/info/oldInfo/130/change.csv +275 -0
- package/core/resources/info/oldInfo/130/info.json +7 -0
- package/core/resources/info/oldInfo/131/change.csv +278 -0
- package/core/resources/info/oldInfo/131/info.json +7 -0
- package/core/resources/info/oldInfo/132/change.csv +280 -0
- package/core/resources/info/oldInfo/132/info.json +7 -0
- package/core/resources/info/oldInfo/133/change.csv +284 -0
- package/core/resources/info/oldInfo/133/info.json +7 -0
- package/core/resources/info/oldInfo/134/change.csv +286 -0
- package/core/resources/info/oldInfo/134/info.json +7 -0
- package/core/resources/info/oldInfo/135/change.csv +290 -0
- package/core/resources/info/oldInfo/135/info.json +7 -0
- package/core/resources/info/oldInfo/136/change.csv +290 -0
- package/core/resources/info/oldInfo/136/info.json +7 -0
- package/core/resources/info/oldInfo/137/change.csv +293 -0
- package/core/resources/info/oldInfo/137/info.json +7 -0
- package/core/resources/info/oldInfo/138/change.csv +295 -0
- package/core/resources/info/oldInfo/138/info.json +7 -0
- package/core/resources/info/oldInfo/139/change.csv +295 -0
- package/core/resources/info/oldInfo/139/info.json +7 -0
- package/core/resources/info/oldInfo/140/change.csv +298 -0
- package/core/resources/info/oldInfo/140/info.json +7 -0
- package/core/resources/info/oldInfo/141/change.csv +300 -0
- package/core/resources/info/oldInfo/141/info.json +7 -0
- package/core/resources/info/oldInfo/142/change.csv +302 -0
- package/core/resources/info/oldInfo/142/info.json +7 -0
- package/core/resources/info/oldInfo/143/change.csv +303 -0
- package/core/resources/info/oldInfo/143/info.json +7 -0
- package/core/resources/info/oldInfo/144/change.csv +303 -0
- package/core/resources/info/oldInfo/144/info.json +7 -0
- package/core/resources/info/oldInfo/145/change.csv +305 -0
- package/core/resources/info/oldInfo/145/info.json +7 -0
- package/core/resources/info/oldInfo/146/change.csv +305 -0
- package/core/resources/info/oldInfo/146/info.json +7 -0
- package/core/resources/info/oldInfo/148/change.csv +307 -0
- package/core/resources/info/oldInfo/148/info.json +7 -0
- package/core/resources/info/oldInfo/149/change.csv +307 -0
- package/core/resources/info/oldInfo/149/info.json +7 -0
- package/core/resources/info/oldInfo/151/change.csv +309 -0
- package/core/resources/info/oldInfo/151/info.json +7 -0
- package/core/resources/info/oldInfo/152/change.csv +312 -0
- package/core/resources/info/oldInfo/152/info.json +7 -0
- package/core/resources/info/oldInfo/153/change.csv +313 -0
- package/core/resources/info/oldInfo/153/info.json +7 -0
- package/core/resources/info/oldInfo/154/change.csv +315 -0
- package/core/resources/info/oldInfo/154/info.json +7 -0
- package/core/resources/info/oldInfo/92/change.csv +204 -0
- package/core/resources/info/oldInfo/92/info.json +7 -0
- package/core/resources/info/oldInfo/93/change.csv +206 -0
- package/core/resources/info/oldInfo/93/info.json +7 -0
- package/core/resources/info/oldInfo/94/change.csv +209 -0
- package/core/resources/info/oldInfo/94/info.json +7 -0
- package/core/resources/info/oldInfo/95/change.csv +211 -0
- package/core/resources/info/oldInfo/95/info.json +7 -0
- package/core/resources/info/oldInfo/96/change.csv +216 -0
- package/core/resources/info/oldInfo/96/info.json +7 -0
- package/core/resources/info/oldInfo/98/change.csv +216 -0
- package/core/resources/info/oldInfo/98/info.json +7 -0
- package/core/resources/info/oldInfo/99/change.csv +217 -0
- package/core/resources/info/oldInfo/99/info.json +7 -0
- package/core/resources/info/oldNotesInfo.json +1 -0
- package/core/resources/info/sentences.json +1 -0
- package/core/resources/info/spinfo.json +362 -0
- package/core/resources/info/tips.txt +278 -0
- package/core/resources/otherill//351/233/252/351/231/215SP.png +0 -0
- package/core/resources/song-select.html +535 -0
- package/core/resources/themes/README.md +24 -0
- package/core/resources/themes/milthm/A.png +0 -0
- package/core/resources/themes/milthm/B.png +0 -0
- package/core/resources/themes/milthm/C.png +0 -0
- package/core/resources/themes/milthm/F.png +0 -0
- package/core/resources/themes/milthm/FC.png +0 -0
- package/core/resources/themes/milthm/S.png +0 -0
- package/core/resources/themes/milthm/V.png +0 -0
- package/core/resources/themes/milthm/arcgrosB19.css +36 -0
- package/core/resources/themes/milthm/b19.art +464 -0
- package/core/resources/themes/milthm/b19.css +1314 -0
- package/core/resources/themes/milthm/bg.png +0 -0
- package/core/resources/themes/milthm/clg.css +37 -0
- package/core/resources/themes/milthm/difficultyHistory.css +42 -0
- package/core/resources/themes/milthm/font.ttf +0 -0
- package/core/resources/themes/milthm/help.css +36 -0
- package/core/resources/themes/milthm/historyB30.css +48 -0
- package/core/resources/themes/milthm/info.yaml +45 -0
- package/core/resources/themes/milthm/list.css +39 -0
- package/core/resources/themes/milthm/phi.png +0 -0
- package/core/resources/themes/milthm/setting.css +37 -0
- package/core/resources/themes/milthm/sign.css +81 -0
- package/core/resources/themes/milthm/suggest.css +40 -0
- package/core/resources/themes/milthm/table.css +54 -0
- package/core/resources/themes/milthm/update.css +68 -0
- package/core/tests/aliasProposalService.test.js +82 -0
- package/core/tests/apiAccountDeletion.test.js +125 -0
- package/core/tests/apiPermission.test.js +44 -0
- package/core/tests/apiVersion.test.js +55 -0
- package/core/tests/b30Analysis.test.js +38 -0
- package/core/tests/backgroundIllustration.test.js +21 -0
- package/core/tests/botApiAuthRecovery.test.js +148 -0
- package/core/tests/botSyncService.test.js +42 -0
- package/core/tests/fileWatcherRegistry.test.js +44 -0
- package/core/tests/gameRecordPayload.test.js +34 -0
- package/core/tests/guessLetter.test.js +79 -0
- package/core/tests/makeRequestHandling.test.js +118 -0
- package/core/tests/marketOverflow.test.js +31 -0
- package/core/tests/platformTemplateCache.test.js +92 -0
- package/core/tests/pluginDataThemePreference.test.js +36 -0
- package/core/tests/processCleanup.test.js +58 -0
- package/core/tests/puppeteerShutdown.test.js +17 -0
- package/core/tests/renderPressureHistory.test.js +59 -0
- package/core/tests/saveStats.test.js +26 -0
- package/core/tests/themeInstallGuard.test.js +289 -0
- package/core/tests/themeManager.test.js +625 -0
- package/core/tests/themeManagerInit.test.js +11 -0
- package/core/tests/themeMarket.test.js +855 -0
- package/core/tests/themePageRouting.test.js +431 -0
- package/core/tests/themePolicy.test.js +28 -0
- package/core/tests/themeStorageRecovery.test.js +192 -0
- package/core/tests/userCredentialModuleBoundaries.test.js +41 -0
- package/core/tests/userCredentials.test.js +285 -0
- package/core/tsconfig.json +32 -0
- package/core/types/vendor.d.ts +14 -0
- package/lib/index.cjs +358 -0
- package/lib/index.d.cts +182 -0
- package/lib/index.d.ts +182 -0
- package/lib/index.js +320 -0
- package/package.json +74 -0
- package/readme.md +3 -0
|
@@ -0,0 +1,968 @@
|
|
|
1
|
+
import Config from '../components/Config.js'
|
|
2
|
+
import send from '../model/render/send.js'
|
|
3
|
+
import picmodle from '../model/render/picmodle.js'
|
|
4
|
+
import getInfo from '../model/game/getInfo.js'
|
|
5
|
+
import fCompute from '../model/game/fCompute.js'
|
|
6
|
+
import getBanGroup from '../model/user/getBanGroup.js';
|
|
7
|
+
import LevelRecordInfo from '../model/game/LevelRecordInfo.js'
|
|
8
|
+
import phiPluginBase from '../components/baseClass.js'
|
|
9
|
+
import logger from '../components/Logger.js'
|
|
10
|
+
import { Level, MAX_DIFFICULTY } from '../model/game/constNum.js'
|
|
11
|
+
import getNotes from '../model/user/getNotes.js'
|
|
12
|
+
import { UserCredentials } from '../model/user/userCredentials.js'
|
|
13
|
+
import analyzeSaveHistory from '../model/save/analyzeSaveHistory.js'
|
|
14
|
+
import ScoreHistory from '../model/save/scoreHistory.js'
|
|
15
|
+
import { canUseApi } from '../model/user/apiPermission.js'
|
|
16
|
+
|
|
17
|
+
/**@import {botEvent} from '../components/baseClass.js' */
|
|
18
|
+
|
|
19
|
+
const illList = getInfo.illlist
|
|
20
|
+
export class phiuser extends phiPluginBase {
|
|
21
|
+
constructor() {
|
|
22
|
+
super({
|
|
23
|
+
name: 'phi-user',
|
|
24
|
+
dsc: 'phi-plugin数据统计',
|
|
25
|
+
event: 'message',
|
|
26
|
+
priority: 1000,
|
|
27
|
+
rule: [
|
|
28
|
+
{
|
|
29
|
+
reg: `^[#/](${Config.getUserCfg('config', 'cmdhead')})(\\s*)(data)$`,
|
|
30
|
+
fnc: 'data'
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
reg: `^[#/](${Config.getUserCfg('config', 'cmdhead')})(\\s*)(info)[1-2]?.*$`,
|
|
34
|
+
fnc: 'info'
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
reg: `^[#/](${Config.getUserCfg('config', 'cmdhead')})(\\s*)((lvsco(re)?)|scolv)(.*)$`,
|
|
38
|
+
fnc: 'lvscore'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
reg: `^[#/](${Config.getUserCfg('config', 'cmdhead')})(\\s*)list(.*)$`,
|
|
42
|
+
fnc: 'list'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
reg: `^[#/](${Config.getUserCfg('config', 'cmdhead')})(\\s*)(年度总结|2025history)(.*)$`,
|
|
46
|
+
fnc: 'analyze2025SaveHistory'
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
reg: `^[#/](${Config.getUserCfg('config', 'cmdhead')})(\\s*)(hisb30)(.*)$`,
|
|
50
|
+
fnc: 'hisb30'
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 查询data
|
|
59
|
+
* @param {botEvent} e
|
|
60
|
+
*/
|
|
61
|
+
async data(e) {
|
|
62
|
+
|
|
63
|
+
if (await getBanGroup.get(e, 'data')) {
|
|
64
|
+
send.send_with_At(e, '这里被管理员禁止使用这个功能了呐QAQ!')
|
|
65
|
+
return false
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
let save = await send.getsave_result(e)
|
|
70
|
+
|
|
71
|
+
if (!save) {
|
|
72
|
+
return true
|
|
73
|
+
}
|
|
74
|
+
if (save.gameProgress) {
|
|
75
|
+
let data = save.gameProgress.money
|
|
76
|
+
send.send_with_At(e, `您的data数为:${data[4] ? `${data[4]}PB ` : ''}${data[3] ? `${data[3]}TB ` : ''}${data[2] ? `${data[2]}GB ` : ''}${data[1] ? `${data[1]}MB ` : ''}${data[0] ? `${data[0]}KB ` : ''}`)
|
|
77
|
+
} else {
|
|
78
|
+
send.send_with_At(e, `请先更新数据哦!\n/${Config.getUserCfg('config', 'cmdhead')} update`)
|
|
79
|
+
}
|
|
80
|
+
return true
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @param {botEvent} e
|
|
86
|
+
*/
|
|
87
|
+
async info(e) {
|
|
88
|
+
const credentials = UserCredentials.fromEvent(e)
|
|
89
|
+
|
|
90
|
+
if (await getBanGroup.get(e, 'info')) {
|
|
91
|
+
send.send_with_At(e, '这里被管理员禁止使用这个功能了呐QAQ!')
|
|
92
|
+
return false
|
|
93
|
+
}
|
|
94
|
+
/**背景 */
|
|
95
|
+
let bksong = e.msg.replace(/^.*(info)[1-2]?\s*/g, '')
|
|
96
|
+
if (bksong) {
|
|
97
|
+
let tem = getInfo.fuzzysongsnick(bksong)[0]
|
|
98
|
+
if (tem) {
|
|
99
|
+
bksong = getInfo.getill(tem)
|
|
100
|
+
} else {
|
|
101
|
+
bksong = ''
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (!bksong) {
|
|
105
|
+
bksong = getInfo.getill(illList[fCompute.randInt(0, illList.length - 1)], 'blur')
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
let save = await send.getsave_result(e, 1.0)
|
|
109
|
+
|
|
110
|
+
if (!save) {
|
|
111
|
+
return true
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// /info 使用独立的 userinfo/userinfo 渲染目标,需把当前用户主题传入渲染数据,
|
|
115
|
+
// 主题管理器才能命中主题包中的完整页面键。
|
|
116
|
+
const pluginData = await getNotes.getNotesData(e.user_id)
|
|
117
|
+
|
|
118
|
+
let stats = await save.getStats()
|
|
119
|
+
|
|
120
|
+
let money = save.gameProgress.money
|
|
121
|
+
let userbackground = await fCompute.getBackground(save.gameuser.background)
|
|
122
|
+
|
|
123
|
+
if (!userbackground) {
|
|
124
|
+
send.reply(e, `ERROR: 未找到[${save.gameuser.background}]的有关信息!`)
|
|
125
|
+
logger.error(`未找到${save.gameuser.background}对应的曲绘!`)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// let dan = await getInfo.getDan(e.user_id)
|
|
129
|
+
|
|
130
|
+
let gameuser = {
|
|
131
|
+
avatar: getInfo.idgetavatar(save.gameuser.avatar),
|
|
132
|
+
ChallengeMode: Math.floor(save.saveInfo.summary.challengeModeRank / 100),
|
|
133
|
+
ChallengeModeRank: save.saveInfo.summary.challengeModeRank % 100,
|
|
134
|
+
rks: save.saveInfo.summary.rankingScore,
|
|
135
|
+
data: `${money[4] ? `${money[4]}PiB ` : ''}${money[3] ? `${money[3]}TiB ` : ''}${money[2] ? `${money[2]}GiB ` : ''}${money[1] ? `${money[1]}MiB ` : ''}${money[0] ? `${money[0]}KiB ` : ''}`,
|
|
136
|
+
selfIntro: fCompute.convertRichText(save.gameuser.selfIntro),
|
|
137
|
+
backgroundurl: userbackground,
|
|
138
|
+
PlayerId: fCompute.convertRichText(save.saveInfo.PlayerId),
|
|
139
|
+
// CLGMOD: dan?.Dan,
|
|
140
|
+
// EX: dan?.EX,
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
let user_data;
|
|
144
|
+
|
|
145
|
+
if (await canUseApi(e)) {
|
|
146
|
+
try {
|
|
147
|
+
user_data = await credentials.getCloudHistory(['data', 'rks', 'scoreHistory'])
|
|
148
|
+
if (!user_data) user_data = await credentials.getLocalHistory()
|
|
149
|
+
} catch (error) {
|
|
150
|
+
logger.info('通过phi-plugin API获取历史记录失败,改为本地存储获取')
|
|
151
|
+
user_data = await credentials.getLocalHistory()
|
|
152
|
+
}
|
|
153
|
+
} else {
|
|
154
|
+
user_data = await credentials.getLocalHistory()
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (!user_data) {
|
|
158
|
+
send.send_with_At(e, '没有找到可用的历史记录,请先更新存档。')
|
|
159
|
+
return true
|
|
160
|
+
}
|
|
161
|
+
let { rks_history, data_history, rks_range, data_range, rks_date, data_date } = user_data.getRksAndDataLine()
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
/**统计在要求acc>=i的前提下,玩家的rks为多少 */
|
|
165
|
+
/**存档 */
|
|
166
|
+
let acc_rksRecord = save.getRecord()
|
|
167
|
+
/**phi列表 */
|
|
168
|
+
let acc_rks_phi = save.findAccRecord(100)
|
|
169
|
+
/**所有rks节点 */
|
|
170
|
+
let acc_rks_data = []
|
|
171
|
+
/**转换成坐标的节点 */
|
|
172
|
+
let acc_rks_data_ = []
|
|
173
|
+
/**rks上下界 */
|
|
174
|
+
let acc_rks_range = [100, 0]
|
|
175
|
+
|
|
176
|
+
/**预处理 */
|
|
177
|
+
let phi_rks = 0;
|
|
178
|
+
|
|
179
|
+
for (let i = 0; i < 3; ++i) {
|
|
180
|
+
if (acc_rks_phi[i]) {
|
|
181
|
+
phi_rks += acc_rks_phi[i].rks
|
|
182
|
+
} else {
|
|
183
|
+
break
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**原本b19中最小acc 要展示的acc序列 */
|
|
188
|
+
let acc_rks_AccRange = [100]
|
|
189
|
+
|
|
190
|
+
for (let i = 0; i < Math.min(acc_rksRecord.length, 27); i++) {
|
|
191
|
+
acc_rks_AccRange[0] = Math.min(acc_rks_AccRange[0], acc_rksRecord[i].acc)
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
for (let i = acc_rks_AccRange[0]; i <= 100; i += 0.01) {
|
|
195
|
+
let sum_rks = 0
|
|
196
|
+
if (!acc_rksRecord[0]) break
|
|
197
|
+
for (let j = 0; j < acc_rksRecord.length; j++) {
|
|
198
|
+
if (j >= 27) break
|
|
199
|
+
if (acc_rksRecord[j]?.acc < i) {
|
|
200
|
+
/**预处理展示的acc数字 */
|
|
201
|
+
acc_rks_AccRange.push(i)
|
|
202
|
+
}
|
|
203
|
+
while (acc_rksRecord[j]?.acc < i) {
|
|
204
|
+
acc_rksRecord.splice(j, 1)
|
|
205
|
+
}
|
|
206
|
+
if (acc_rksRecord[j]) {
|
|
207
|
+
sum_rks += acc_rksRecord[j].rks
|
|
208
|
+
} else {
|
|
209
|
+
break
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// console.info(acc_rksRecord[0])
|
|
213
|
+
let tem_rks = (sum_rks + phi_rks) / 30
|
|
214
|
+
acc_rks_data.push([i, tem_rks])
|
|
215
|
+
acc_rks_range[0] = Math.min(acc_rks_range[0], tem_rks)
|
|
216
|
+
acc_rks_range[1] = Math.max(acc_rks_range[1], tem_rks)
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if (acc_rks_AccRange[acc_rks_AccRange.length - 1] < 100) {
|
|
220
|
+
acc_rks_AccRange.push(100)
|
|
221
|
+
}
|
|
222
|
+
// console.info(acc_rks_AccRange)
|
|
223
|
+
|
|
224
|
+
for (let i = 1; i < acc_rks_data.length; ++i) {
|
|
225
|
+
if (acc_rks_data_[0] && acc_rks_data[i - 1][1] == acc_rks_data[i][1]) {
|
|
226
|
+
acc_rks_data_[acc_rks_data_.length - 1][2] = fCompute.range(acc_rks_data[i][0], acc_rks_AccRange)
|
|
227
|
+
} else {
|
|
228
|
+
acc_rks_data_.push([fCompute.range(acc_rks_data[i - 1][0], acc_rks_AccRange), fCompute.range(acc_rks_data[i - 1][1], acc_rks_range), fCompute.range(acc_rks_data[i][0], acc_rks_AccRange), fCompute.range(acc_rks_data[i][1], acc_rks_range)])
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
// console.info(acc_rks_data_)
|
|
232
|
+
|
|
233
|
+
/**处理acc显示区间,防止横轴数字重叠 */
|
|
234
|
+
if (acc_rks_AccRange[0] == 100) {
|
|
235
|
+
acc_rks_AccRange[0] = 0
|
|
236
|
+
}
|
|
237
|
+
let acc_length = (100 - acc_rks_AccRange[0])
|
|
238
|
+
let min_acc = acc_rks_AccRange[0]
|
|
239
|
+
/**要传的数组 */
|
|
240
|
+
let acc_rks_AccRange_position = []
|
|
241
|
+
while (100 - acc_rks_AccRange[acc_rks_AccRange.length - 2] < acc_length / 10) {
|
|
242
|
+
acc_rks_AccRange.splice(acc_rks_AccRange.length - 2, 1)
|
|
243
|
+
}
|
|
244
|
+
acc_rks_AccRange_position.push([acc_rks_AccRange[0], 0])
|
|
245
|
+
for (let i = 1; i < acc_rks_AccRange.length; i++) {
|
|
246
|
+
while (acc_rks_AccRange[i] - acc_rks_AccRange[i - 1] < acc_length / 10) {
|
|
247
|
+
acc_rks_AccRange.splice(i, 1)
|
|
248
|
+
}
|
|
249
|
+
acc_rks_AccRange_position.push([acc_rks_AccRange[i], (acc_rks_AccRange[i] - min_acc) / acc_length * 100])
|
|
250
|
+
}
|
|
251
|
+
// console.info(acc_rks_AccRange_position)
|
|
252
|
+
// console.info(acc_rks_data_)
|
|
253
|
+
// console.info(acc_rks_range)
|
|
254
|
+
|
|
255
|
+
let data = {
|
|
256
|
+
gameuser: gameuser,
|
|
257
|
+
userstats: stats,
|
|
258
|
+
rks_history: rks_history,
|
|
259
|
+
data_history: data_history,
|
|
260
|
+
rks_range: rks_range,
|
|
261
|
+
data_range: data_range,
|
|
262
|
+
data_date: [fCompute.formatDate(data_date[0]), fCompute.formatDate(data_date[1])],
|
|
263
|
+
rks_date: [fCompute.formatDate(rks_date[0]), fCompute.formatDate(rks_date[1])],
|
|
264
|
+
acc_rks_data: acc_rks_data_,
|
|
265
|
+
acc_rks_range: acc_rks_range,
|
|
266
|
+
acc_rks_AccRange: acc_rks_AccRange_position,
|
|
267
|
+
background: bksong,
|
|
268
|
+
theme: pluginData?.theme || 'star',
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// console.info(acc_rks_AccRange_position)
|
|
272
|
+
|
|
273
|
+
const infoVersion = e.msg.match(new RegExp(`^[#/](?:${Config.getUserCfg('config', 'cmdhead')})\\s*info([12])?`, 'i'))?.at(-1)
|
|
274
|
+
const kind = Number(infoVersion || 0)
|
|
275
|
+
send.send_with_At(e, await picmodle.user_info(e, data, kind))
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
*
|
|
280
|
+
* @param {botEvent} e
|
|
281
|
+
*/
|
|
282
|
+
async lvscore(e) {
|
|
283
|
+
|
|
284
|
+
if (await getBanGroup.get(e, 'lvscore')) {
|
|
285
|
+
send.send_with_At(e, '这里被管理员禁止使用这个功能了呐QAQ!')
|
|
286
|
+
return false
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
let save = await send.getsave_result(e, 1.0)
|
|
291
|
+
|
|
292
|
+
if (!save) {
|
|
293
|
+
return true
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**匹配定数区间 */
|
|
297
|
+
let msg = e.msg.replace(/^[#/](.*?)(lvsco(re)?)(\s*)/, "")
|
|
298
|
+
|
|
299
|
+
let isask = [true, true, true, true]
|
|
300
|
+
msg = msg.toUpperCase()
|
|
301
|
+
if (msg.includes('AT') || msg.includes('IN') || msg.includes('HD') || msg.includes('EZ')) {
|
|
302
|
+
isask = [false, false, false, false]
|
|
303
|
+
if (msg.includes('EZ')) { isask[0] = true }
|
|
304
|
+
if (msg.includes('HD')) { isask[1] = true }
|
|
305
|
+
if (msg.includes('IN')) { isask[2] = true }
|
|
306
|
+
if (msg.includes('AT')) { isask[3] = true }
|
|
307
|
+
}
|
|
308
|
+
msg = msg.replace(/((\s*)|AT|IN|HD|EZ)*/g, "")
|
|
309
|
+
|
|
310
|
+
let range = [0, getInfo.MAX_DIFFICULTY]
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
// match_range(msg, range)
|
|
315
|
+
|
|
316
|
+
if (msg.match(/[0-9]+(.[0-9]+)?(\s*[-~~]\s*[0-9]+(.[0-9]+)?)?/g)) {
|
|
317
|
+
msg = msg.match(/[0-9]+(.[0-9]+)?(\s*[-~~]\s*[0-9]+(.[0-9]+)?)?/g)?.[0] || ''
|
|
318
|
+
if (msg.match(/[-~~]/g)) {
|
|
319
|
+
|
|
320
|
+
range = msg.split(/\s*[-~~]\s*/g)
|
|
321
|
+
range[0] = Number(range[0])
|
|
322
|
+
range[1] = Number(range[1])
|
|
323
|
+
if (range[0] > range[1]) {
|
|
324
|
+
let tem = range[1]
|
|
325
|
+
range[1] = range[0]
|
|
326
|
+
range[0] = tem
|
|
327
|
+
}
|
|
328
|
+
} else {
|
|
329
|
+
range[0] = range[1] = Number(msg)
|
|
330
|
+
}
|
|
331
|
+
if (range[1] % 1 == 0 && !e.msg.includes(".0")) range[1] += 0.9
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
range[1] = Math.min(range[1], getInfo.MAX_DIFFICULTY)
|
|
337
|
+
range[0] = Math.max(range[0], 0)
|
|
338
|
+
|
|
339
|
+
let unlockcharts = 0
|
|
340
|
+
let totreal_score = 0
|
|
341
|
+
let totacc = 0
|
|
342
|
+
let totcharts = 0
|
|
343
|
+
let totcleared = 0
|
|
344
|
+
let totfc = 0
|
|
345
|
+
let totphi = 0
|
|
346
|
+
let tottot_score = 0
|
|
347
|
+
let tothighest = 0
|
|
348
|
+
let totlowest = 17
|
|
349
|
+
let totsongs = 0
|
|
350
|
+
let totRating = {
|
|
351
|
+
phi: 0,
|
|
352
|
+
FC: 0,
|
|
353
|
+
V: 0,
|
|
354
|
+
S: 0,
|
|
355
|
+
A: 0,
|
|
356
|
+
B: 0,
|
|
357
|
+
C: 0,
|
|
358
|
+
F: 0,
|
|
359
|
+
NEW: 0,
|
|
360
|
+
}
|
|
361
|
+
let totRank = {
|
|
362
|
+
AT: 0,
|
|
363
|
+
IN: 0,
|
|
364
|
+
HD: 0,
|
|
365
|
+
EZ: 0,
|
|
366
|
+
}
|
|
367
|
+
let unlockRank = {
|
|
368
|
+
AT: 0,
|
|
369
|
+
IN: 0,
|
|
370
|
+
HD: 0,
|
|
371
|
+
EZ: 0,
|
|
372
|
+
}
|
|
373
|
+
let unlocksongs = 0
|
|
374
|
+
|
|
375
|
+
let Record = save.gameRecord
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
for (let id of fCompute.objectKeys(getInfo.ori_info)) {
|
|
379
|
+
let info = getInfo.ori_info[id]
|
|
380
|
+
let vis = false
|
|
381
|
+
if (!info?.chart) continue
|
|
382
|
+
for (let i of Level) {
|
|
383
|
+
if (!info.chart[i]) continue
|
|
384
|
+
let difficulty = info.chart[i].difficulty
|
|
385
|
+
if (range[0] <= difficulty && difficulty <= range[1] && isask[Level.indexOf(i)]) {
|
|
386
|
+
++totcharts
|
|
387
|
+
++totRank[i]
|
|
388
|
+
if (!vis) {
|
|
389
|
+
++totsongs
|
|
390
|
+
vis = true
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
for (let id of fCompute.objectKeys(Record)) {
|
|
398
|
+
let info = getInfo.info(id, true)
|
|
399
|
+
let record = Record[id]
|
|
400
|
+
let vis = false
|
|
401
|
+
if (!info?.chart) continue
|
|
402
|
+
for (let lv in [0, 1, 2, 3]) {
|
|
403
|
+
const levelName = Level[lv];
|
|
404
|
+
if (!info.chart[levelName]) continue
|
|
405
|
+
let difficulty = info.chart[levelName].difficulty
|
|
406
|
+
if (range[0] <= difficulty && difficulty <= range[1] && isask[lv]) {
|
|
407
|
+
|
|
408
|
+
if (!record[lv]) continue
|
|
409
|
+
|
|
410
|
+
++unlockcharts
|
|
411
|
+
++unlockRank[levelName]
|
|
412
|
+
|
|
413
|
+
if (!vis) {
|
|
414
|
+
++unlocksongs
|
|
415
|
+
vis = true
|
|
416
|
+
}
|
|
417
|
+
if (record[lv].score >= 700000) {
|
|
418
|
+
++totcleared
|
|
419
|
+
}
|
|
420
|
+
if (record[lv].fc || record[lv].score == 1000000) {
|
|
421
|
+
++totfc
|
|
422
|
+
}
|
|
423
|
+
if (record[lv].score == 1000000) {
|
|
424
|
+
++totphi
|
|
425
|
+
}
|
|
426
|
+
++totRating[record[lv].Rating]
|
|
427
|
+
totacc += record[lv].acc
|
|
428
|
+
totreal_score += record[lv].score
|
|
429
|
+
tottot_score += 1000000
|
|
430
|
+
|
|
431
|
+
tothighest = Math.max(record[lv].rks, tothighest)
|
|
432
|
+
totlowest = Math.min(record[lv].rks, totlowest)
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
let illustration = await fCompute.getBackground(save.gameuser.background)
|
|
438
|
+
|
|
439
|
+
if (!illustration) {
|
|
440
|
+
send.reply(e, `ERROR: 未找到[${save.gameuser.background}]背景的有关信息!`)
|
|
441
|
+
logger.error(`未找到${save.gameuser.background}的曲绘!`)
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
let data = {
|
|
445
|
+
tot: {
|
|
446
|
+
at: totRank.AT,
|
|
447
|
+
in: totRank.IN,
|
|
448
|
+
hd: totRank.HD,
|
|
449
|
+
ez: totRank.EZ,
|
|
450
|
+
songs: totsongs,
|
|
451
|
+
charts: totcharts,
|
|
452
|
+
score: tottot_score,
|
|
453
|
+
},
|
|
454
|
+
real: {
|
|
455
|
+
at: unlockRank.AT,
|
|
456
|
+
in: unlockRank.IN,
|
|
457
|
+
hd: unlockRank.HD,
|
|
458
|
+
ez: unlockRank.EZ,
|
|
459
|
+
songs: unlocksongs,
|
|
460
|
+
charts: unlockcharts,
|
|
461
|
+
score: totreal_score,
|
|
462
|
+
},
|
|
463
|
+
rating: {
|
|
464
|
+
...totRating,
|
|
465
|
+
tot: Rate(totreal_score, tottot_score, totfc == totcharts),
|
|
466
|
+
},
|
|
467
|
+
range: {
|
|
468
|
+
bottom: range[0],
|
|
469
|
+
top: range[1],
|
|
470
|
+
left: range[0] / MAX_DIFFICULTY * 100,
|
|
471
|
+
length: (range[1] - range[0]) / MAX_DIFFICULTY * 100
|
|
472
|
+
},
|
|
473
|
+
illustration: illustration,
|
|
474
|
+
highest: tothighest,
|
|
475
|
+
lowest: totlowest,
|
|
476
|
+
tot_cleared: totcleared,
|
|
477
|
+
tot_fc: totfc,
|
|
478
|
+
tot_phi: totphi,
|
|
479
|
+
tot_acc: (totacc / totcharts),
|
|
480
|
+
date: fCompute.formatDate(save.saveInfo.modifiedAt.iso),
|
|
481
|
+
progress_phi: Number((totphi / totcharts * 100).toFixed(2)),
|
|
482
|
+
progress_fc: Number((totfc / totcharts * 100).toFixed(2)),
|
|
483
|
+
avatar: getInfo.idgetavatar(save.gameuser.avatar),
|
|
484
|
+
ChallengeMode: Math.floor(save.saveInfo.summary.challengeModeRank / 100),
|
|
485
|
+
ChallengeModeRank: save.saveInfo.summary.challengeModeRank % 100,
|
|
486
|
+
rks: save.saveInfo.summary.rankingScore,
|
|
487
|
+
PlayerId: fCompute.convertRichText(save.saveInfo.PlayerId),
|
|
488
|
+
background: getInfo.getill(illList[fCompute.randInt(0, illList.length - 1)], 'blur'),
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
// let remsg = ''
|
|
492
|
+
// remsg += `\n${range[0]}-${range[1]} `
|
|
493
|
+
// remsg += `clear:${totcleared} fc:${totfc} phi:${totphi}\n`
|
|
494
|
+
// remsg += `${progress_bar(totphi / totcharts, 30)} ${totphi}/${totcharts}\n`
|
|
495
|
+
// remsg += `Tot: ${unlockcharts}/${totcharts} acc: ${(totacc / totcharts).toFixed(4)}\n`
|
|
496
|
+
// remsg += `score: ${totreal_score}/${tottot_score}\n`
|
|
497
|
+
// remsg += `highest: ${tothighest.toFixed(4)} lowest:${totlowest.toFixed(4)}\n`
|
|
498
|
+
// remsg += `φ:${totRating['phi']} FC:${totRating['FC']} V:${totRating['V']} S:${totRating['S']} A:${totRating['A']} B:${totRating['B']} C:${totRating['C']} F:${totRating['F']}`
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
send.send_with_At(e, await picmodle.lvsco(e, data))
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
*
|
|
506
|
+
* @param {botEvent} e
|
|
507
|
+
*/
|
|
508
|
+
async list(e) {
|
|
509
|
+
|
|
510
|
+
if (await getBanGroup.get(e, 'list')) {
|
|
511
|
+
send.send_with_At(e, '这里被管理员禁止使用这个功能了呐QAQ!')
|
|
512
|
+
return false
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
let save = await send.getsave_result(e)
|
|
517
|
+
|
|
518
|
+
if (!save) {
|
|
519
|
+
return true
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
const dif_range = [0, getInfo.MAX_DIFFICULTY];
|
|
523
|
+
const acc_range = [0, 100];
|
|
524
|
+
|
|
525
|
+
/** @type {string} */
|
|
526
|
+
let msg = e.msg.replace(/^[#/](.*?)list/, "")
|
|
527
|
+
|
|
528
|
+
/**EZ HD IN AT */
|
|
529
|
+
let isask = [true, true, true, true]
|
|
530
|
+
|
|
531
|
+
msg = msg.toUpperCase()
|
|
532
|
+
|
|
533
|
+
const accStr = msg.match(/-ACC\s*\d+(\.\d+)?(\s*[-~~]\s*\d+(\.\d+)?|\s*[+-])?/i)?.[0];
|
|
534
|
+
if (accStr) {
|
|
535
|
+
fCompute.match_range(accStr, acc_range);
|
|
536
|
+
msg = msg.replace(accStr, '');
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
const difStr = msg.match(/(-DIF)?\s*\d+(\.\d+)?(\s*[-~~]\s*\d+(\.\d+)?|\s*[+-])?/i)?.[0];
|
|
540
|
+
if (difStr) {
|
|
541
|
+
fCompute.match_range(difStr, dif_range);
|
|
542
|
+
msg = msg.replace(difStr, '');
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
if (msg.includes('EZ') || msg.includes('HD') || msg.includes('IN') || msg.includes('AT')) {
|
|
546
|
+
isask = [false, false, false, false]
|
|
547
|
+
if (msg.includes('EZ')) { isask[0] = true }
|
|
548
|
+
if (msg.includes('HD')) { isask[1] = true }
|
|
549
|
+
if (msg.includes('IN')) { isask[2] = true }
|
|
550
|
+
if (msg.includes('AT')) { isask[3] = true }
|
|
551
|
+
}
|
|
552
|
+
msg = msg.replace(/(list|AT|IN|HD|EZ)*/g, "");
|
|
553
|
+
|
|
554
|
+
let scoreAsk = { NEW: true, F: true, C: true, B: true, A: true, S: true, V: true, FC: true, PHI: true };
|
|
555
|
+
const selectedTags = msg.match(/\b(?:NEW|F|C|B|A|S|V|FC|PHI|AP)\b/g);
|
|
556
|
+
if (selectedTags) {
|
|
557
|
+
scoreAsk = { NEW: false, F: false, C: false, B: false, A: false, S: false, V: false, FC: false, PHI: false };
|
|
558
|
+
for (const tag of selectedTags) {
|
|
559
|
+
const key = tag === 'AP' ? 'PHI' : tag;
|
|
560
|
+
// @ts-ignore
|
|
561
|
+
scoreAsk[key] = true;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
msg = msg.replace(/\b(?:NEW|F|C|B|A|S|V|FC|PHI|AP)\b/g, "");
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
let Record = save.gameRecord
|
|
568
|
+
|
|
569
|
+
let data = []
|
|
570
|
+
|
|
571
|
+
for (let id of fCompute.objectKeys(Record)) {
|
|
572
|
+
let song = getInfo.idgetsong(id)
|
|
573
|
+
if (!song) {
|
|
574
|
+
logger.warn('[phi-plugin]', id, '曲目无信息')
|
|
575
|
+
continue
|
|
576
|
+
}
|
|
577
|
+
let info = getInfo.info(id, true)
|
|
578
|
+
|
|
579
|
+
let record = Record[id]
|
|
580
|
+
|
|
581
|
+
for (let lv of [0, 1, 2, 3]) {
|
|
582
|
+
const levelName = Level[lv];
|
|
583
|
+
if (!info?.chart[levelName]) continue
|
|
584
|
+
let difficulty = info.chart[levelName].difficulty
|
|
585
|
+
if (!(dif_range[0] <= difficulty && difficulty <= dif_range[1] && isask[lv]))
|
|
586
|
+
continue;
|
|
587
|
+
if (!record[lv]) {
|
|
588
|
+
if (!scoreAsk.NEW || acc_range[0] != 0)
|
|
589
|
+
continue;
|
|
590
|
+
else
|
|
591
|
+
// @ts-ignore
|
|
592
|
+
record[lv] = {}
|
|
593
|
+
} else {
|
|
594
|
+
// @ts-ignore
|
|
595
|
+
if (record[lv] && !scoreAsk[record[lv].Rating.toUpperCase()])
|
|
596
|
+
continue;
|
|
597
|
+
if (!(acc_range[0] <= record[lv].acc && record[lv].acc <= acc_range[1]))
|
|
598
|
+
continue;
|
|
599
|
+
}
|
|
600
|
+
// @ts-ignore
|
|
601
|
+
record[lv].suggest = save.getSuggest(id, lv, 4, difficulty);
|
|
602
|
+
data.push({
|
|
603
|
+
...record[lv],
|
|
604
|
+
...info,
|
|
605
|
+
illustration: getInfo.getill(id, 'low'),
|
|
606
|
+
difficulty: difficulty,
|
|
607
|
+
rank: Level[lv]
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
if (data.length > Config.getUserCfg('config', 'listScoreMaxNum')) {
|
|
613
|
+
send.send_with_At(e, `谱面数量过多(${data.length})大于设置的最大值(${Config.getUserCfg('config', 'listScoreMaxNum')}),请缩小搜索范围QAQ!`)
|
|
614
|
+
return true
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
data.sort((a, b) => {
|
|
618
|
+
return (b.difficulty || 0) - (a.difficulty || 0)
|
|
619
|
+
})
|
|
620
|
+
|
|
621
|
+
let plugin_data = await getNotes.getNotesData(e.user_id)
|
|
622
|
+
|
|
623
|
+
//逻辑暂未实现
|
|
624
|
+
let request = []
|
|
625
|
+
request.push(`定数 ${dif_range[0]}-${dif_range[1]}`);
|
|
626
|
+
request.push(`ACC ${acc_range[0]}-${acc_range[1]}`);
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
send.send_with_At(e, await picmodle.list(e, {
|
|
630
|
+
head_title: "成绩筛选",
|
|
631
|
+
song: data,
|
|
632
|
+
background: getInfo.getill(illList[fCompute.randInt(0, illList.length - 1)]),
|
|
633
|
+
theme: plugin_data?.theme || 'star',
|
|
634
|
+
PlayerId: save.saveInfo.PlayerId,
|
|
635
|
+
Rks: Number(save.saveInfo.summary.rankingScore).toFixed(4),
|
|
636
|
+
Date: save.saveInfo.summary.updatedAt,
|
|
637
|
+
ChallengeMode: Math.floor(save.saveInfo.summary.challengeModeRank / 100),
|
|
638
|
+
ChallengeModeRank: save.saveInfo.summary.challengeModeRank % 100,
|
|
639
|
+
// dan: await get.getDan(e.user_id),
|
|
640
|
+
request: request
|
|
641
|
+
}))
|
|
642
|
+
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
*
|
|
647
|
+
* @param {botEvent} e
|
|
648
|
+
*/
|
|
649
|
+
async analyze2025SaveHistory(e) {
|
|
650
|
+
|
|
651
|
+
const credentials = UserCredentials.fromEvent(e)
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
if (await getBanGroup.get(e, 'analyze2025SaveHistory')) {
|
|
655
|
+
send.send_with_At(e, '这里被管理员禁止使用这个功能了呐QAQ!')
|
|
656
|
+
return false
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
let save = await send.getsave_result(e)
|
|
661
|
+
|
|
662
|
+
if (!save) {
|
|
663
|
+
return true
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
const history = await credentials.getHistoryFromApi(['challengeModeRank', 'data', 'rks', 'scoreHistory'])
|
|
667
|
+
|
|
668
|
+
if (!history) {
|
|
669
|
+
return true;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
const stats = analyzeSaveHistory(history);
|
|
673
|
+
|
|
674
|
+
send.send_with_At(e, await picmodle.analyzeSaveHistory(e, {
|
|
675
|
+
stats,
|
|
676
|
+
background: getInfo.getill(getInfo.illlist[fCompute.randInt(0, getInfo.illlist.length - 1)]),
|
|
677
|
+
}));
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
*
|
|
682
|
+
* @param {botEvent} e
|
|
683
|
+
* @returns
|
|
684
|
+
*/
|
|
685
|
+
async hisb30(e) {
|
|
686
|
+
const credentials = UserCredentials.fromEvent(e)
|
|
687
|
+
if (await getBanGroup.get(e, 'hisb30')) {
|
|
688
|
+
send.send_with_At(e, '这里被管理员禁止使用这个功能了呐QAQ!')
|
|
689
|
+
return false
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
const save = await send.getsave_result(e)
|
|
693
|
+
|
|
694
|
+
if (!save) {
|
|
695
|
+
return true
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
const history = await credentials.getHistoryFromApi(['scoreHistory'])
|
|
699
|
+
|
|
700
|
+
if (!history) {
|
|
701
|
+
return true;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
const { scoreHistory } = history;
|
|
705
|
+
|
|
706
|
+
const records = [];
|
|
707
|
+
|
|
708
|
+
for (const ids of fCompute.objectKeys(scoreHistory)) {
|
|
709
|
+
const songRecords = scoreHistory[ids];
|
|
710
|
+
for (const level of Level) {
|
|
711
|
+
const levelRecords = songRecords[level];
|
|
712
|
+
if (!levelRecords) continue;
|
|
713
|
+
for (const record of levelRecords) {
|
|
714
|
+
const openedRecord = ScoreHistory.open(record);
|
|
715
|
+
records.push({
|
|
716
|
+
id: ids,
|
|
717
|
+
level: level,
|
|
718
|
+
...openedRecord
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/**@type {Record<string, LevelRecordInfo[]>} */
|
|
725
|
+
const timeKeyRecords = {}
|
|
726
|
+
|
|
727
|
+
for (const record of records) {
|
|
728
|
+
if (!timeKeyRecords[`${record.date.getTime()}`]) {
|
|
729
|
+
timeKeyRecords[`${record.date.getTime()}`] = [];
|
|
730
|
+
}
|
|
731
|
+
timeKeyRecords[`${record.date.getTime()}`].push(new LevelRecordInfo(record, record.id, Level.indexOf(record.level)));
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
const times = fCompute.objectKeys(timeKeyRecords)
|
|
735
|
+
|
|
736
|
+
times.sort((a, b) => Number(a) - Number(b));
|
|
737
|
+
|
|
738
|
+
/**@type {Record<'phi' | 'b27', LevelRecordInfo[]>} */
|
|
739
|
+
let b30List = {
|
|
740
|
+
phi: [],
|
|
741
|
+
b27: [],
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
/**@typedef {LevelRecordInfo & {newPhi?: number, newB27?: number, exitPhi?: boolean, exitB27?: boolean}} b30ChangeResult*/
|
|
745
|
+
|
|
746
|
+
/**@type {Record<string, b30ChangeResult[]>} */
|
|
747
|
+
const changeB30Result = {};
|
|
748
|
+
|
|
749
|
+
for (const time of times) {
|
|
750
|
+
/**维护 time 对应时间戳的变化情况 */
|
|
751
|
+
|
|
752
|
+
/**所有新成绩 */
|
|
753
|
+
const records = timeKeyRecords[time];
|
|
754
|
+
|
|
755
|
+
/**加入后新B30 */
|
|
756
|
+
const newB30List = fCompute.updateB30(b30List, records);
|
|
757
|
+
|
|
758
|
+
/**旧的keys */
|
|
759
|
+
const oldPhiCharts = b30List.phi.map(item => `${item.id}-${item.rank}`);
|
|
760
|
+
const oldB27Charts = b30List.b27.map(item => `${item.id}-${item.rank}`);
|
|
761
|
+
|
|
762
|
+
/**新的keys */
|
|
763
|
+
const newPhiCharts = newB30List.phi.map(item => `${item.id}-${item.rank}`);
|
|
764
|
+
const newB27Charts = newB30List.b27.map(item => `${item.id}-${item.rank}`);
|
|
765
|
+
|
|
766
|
+
/**@type {b30ChangeResult[]} 新的phi成绩*/
|
|
767
|
+
const newPhi = [];
|
|
768
|
+
/**@type {b30ChangeResult[]} 新的b27成绩*/
|
|
769
|
+
const newB27 = [];
|
|
770
|
+
|
|
771
|
+
newB30List.phi.forEach((item, index) => {
|
|
772
|
+
if (!oldPhiCharts.includes(`${item.id}-${item.rank}`)) {
|
|
773
|
+
newPhi.push({ ...item, newPhi: index + 1 });
|
|
774
|
+
}
|
|
775
|
+
});
|
|
776
|
+
|
|
777
|
+
newB30List.b27.forEach((item, index) => {
|
|
778
|
+
if (!oldB27Charts.includes(`${item.id}-${item.rank}`)) {
|
|
779
|
+
newB27.push({ ...item, newB27: index + 1 });
|
|
780
|
+
}
|
|
781
|
+
});
|
|
782
|
+
|
|
783
|
+
/**@type {Record<string, b30ChangeResult>} */
|
|
784
|
+
const newPhiVis = {};
|
|
785
|
+
/**@type { b30ChangeResult[]} 合并后新的phi成绩*/
|
|
786
|
+
const newPhiResult = []
|
|
787
|
+
/**@type { b30ChangeResult[]} 合并后新的b27成绩*/
|
|
788
|
+
const newB27Result = []
|
|
789
|
+
|
|
790
|
+
/**先标记phi,优先合并到phi上 */
|
|
791
|
+
newPhi.forEach(item => {
|
|
792
|
+
newPhiVis[`${item.id}-${item.rank}`] = item;
|
|
793
|
+
});
|
|
794
|
+
|
|
795
|
+
/**b27中有的合并到phi上 */
|
|
796
|
+
newB27.forEach(item => {
|
|
797
|
+
const key = `${item.id}-${item.rank}`;
|
|
798
|
+
if (newPhiCharts.includes(key)) {
|
|
799
|
+
newPhiVis[key].newB27 = item.newB27;
|
|
800
|
+
return;
|
|
801
|
+
}
|
|
802
|
+
newB27Result.push(item);
|
|
803
|
+
});
|
|
804
|
+
|
|
805
|
+
/**合并后的新的phi成绩 */
|
|
806
|
+
for (const key of fCompute.objectKeys(newPhiVis)) {
|
|
807
|
+
newPhiResult.push(newPhiVis[key]);
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
/**退出的成绩,逻辑同上 */
|
|
811
|
+
|
|
812
|
+
/**@type {b30ChangeResult[]} */
|
|
813
|
+
const exitPhi = [];
|
|
814
|
+
/**@type {b30ChangeResult[]} */
|
|
815
|
+
const exitB27 = [];
|
|
816
|
+
|
|
817
|
+
b30List.phi.forEach(item => {
|
|
818
|
+
if (!newPhiCharts.includes(`${item.id}-${item.rank}`)) {
|
|
819
|
+
exitPhi.push({ ...item, exitPhi: true });
|
|
820
|
+
}
|
|
821
|
+
});
|
|
822
|
+
|
|
823
|
+
b30List.b27.forEach(item => {
|
|
824
|
+
if (!newB27Charts.includes(`${item.id}-${item.rank}`)) {
|
|
825
|
+
exitB27.push({ ...item, exitB27: true });
|
|
826
|
+
}
|
|
827
|
+
});
|
|
828
|
+
|
|
829
|
+
/**@type {Record<string, b30ChangeResult>} */
|
|
830
|
+
const exitPhiVis = {};
|
|
831
|
+
/**@type { b30ChangeResult[]} */
|
|
832
|
+
const exitPhiResult = [];
|
|
833
|
+
/**@type { b30ChangeResult[]} */
|
|
834
|
+
const exitB27Result = [];
|
|
835
|
+
|
|
836
|
+
exitPhi.forEach(item => {
|
|
837
|
+
exitPhiVis[`${item.id}-${item.rank}`] = item;
|
|
838
|
+
});
|
|
839
|
+
|
|
840
|
+
exitB27.forEach(item => {
|
|
841
|
+
const key = `${item.id}-${item.rank}`;
|
|
842
|
+
if (newB27Charts.includes(key)) {
|
|
843
|
+
exitPhiVis[key].exitB27 = item.exitB27;
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
846
|
+
exitB27Result.push(item);
|
|
847
|
+
});
|
|
848
|
+
|
|
849
|
+
for (const key of fCompute.objectKeys(exitPhiVis)) {
|
|
850
|
+
exitPhiResult.push(exitPhiVis[key]);
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
if (newPhiResult.length + newB27Result.length + exitPhiResult.length + exitB27Result.length > 0) {
|
|
854
|
+
changeB30Result[time] = [
|
|
855
|
+
...newPhiResult,
|
|
856
|
+
...newB27Result,
|
|
857
|
+
...exitPhiResult,
|
|
858
|
+
...exitB27Result,
|
|
859
|
+
];
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
b30List = newB30List;
|
|
864
|
+
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* @typedef {object} hisb30Songs
|
|
869
|
+
* @property {string} ill 曲绘
|
|
870
|
+
* @property {string} rank 难度
|
|
871
|
+
* @property {number} [newPhi] 新φ30排名
|
|
872
|
+
* @property {number} [newB27] 新b27排名
|
|
873
|
+
* @property {boolean} [exitPhi] 退出φ30
|
|
874
|
+
* @property {boolean} [exitB27] 退出b27
|
|
875
|
+
*/
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* @type {object[]}
|
|
879
|
+
* @property {string} date 时间
|
|
880
|
+
* @property {string} color 颜色
|
|
881
|
+
* @property {hisb30Songs[]} songs 变化内容
|
|
882
|
+
*/
|
|
883
|
+
const rows = [];
|
|
884
|
+
|
|
885
|
+
times.reverse().forEach(time => {
|
|
886
|
+
if (changeB30Result[time]) {
|
|
887
|
+
const date = fCompute.formatDate(Number(time));
|
|
888
|
+
|
|
889
|
+
/** @type {hisb30Songs[]} */
|
|
890
|
+
const songs = [];
|
|
891
|
+
changeB30Result[time].forEach(item => {
|
|
892
|
+
songs.push({
|
|
893
|
+
ill: getInfo.getill(item.id, 'low'),
|
|
894
|
+
rank: item.rank,
|
|
895
|
+
newPhi: item.newPhi,
|
|
896
|
+
newB27: item.newB27,
|
|
897
|
+
exitPhi: item.exitPhi,
|
|
898
|
+
exitB27: item.exitB27,
|
|
899
|
+
});
|
|
900
|
+
});
|
|
901
|
+
rows.push({
|
|
902
|
+
date,
|
|
903
|
+
songs,
|
|
904
|
+
color: fCompute.getRandomBgColor(),
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
})
|
|
908
|
+
|
|
909
|
+
const pluginData = await getNotes.getNotesData(e.user_id);
|
|
910
|
+
|
|
911
|
+
// let dan = await get.getDan(e.user_id)
|
|
912
|
+
const money = save.gameProgress?.money || [0, 0, 0, 0, 0]
|
|
913
|
+
const gameuser = {
|
|
914
|
+
avatar: getInfo.idgetavatar(save.gameuser.avatar),
|
|
915
|
+
ChallengeMode: Math.floor(save.saveInfo.summary.challengeModeRank / 100),
|
|
916
|
+
ChallengeModeRank: save.saveInfo.summary.challengeModeRank % 100,
|
|
917
|
+
rks: save.saveInfo.summary.rankingScore,
|
|
918
|
+
data: `${money[4] ? `${money[4]}PiB ` : ''}${money[3] ? `${money[3]}TiB ` : ''}${money[2] ? `${money[2]}GiB ` : ''}${money[1] ? `${money[1]}MiB ` : ''}${money[0] ? `${money[0]}KiB ` : ''}`,
|
|
919
|
+
selfIntro: save.gameuser.selfIntro,
|
|
920
|
+
backgroundUrl: await fCompute.getBackground(save.gameuser.background),
|
|
921
|
+
PlayerId: fCompute.convertRichText(save.saveInfo.PlayerId),
|
|
922
|
+
// dan: dan,
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
send.send_with_At(e, await picmodle.common(e, 'historyB30', {
|
|
926
|
+
gameuser,
|
|
927
|
+
rows,
|
|
928
|
+
background: getInfo.getill(illList[fCompute.randInt(0, illList.length - 1)]),
|
|
929
|
+
theme: pluginData?.theme || 'star',
|
|
930
|
+
}))
|
|
931
|
+
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
*
|
|
940
|
+
* @param {number} real_score 真实成绩
|
|
941
|
+
* @param {number} tot_score 总成绩
|
|
942
|
+
* @param {boolean} fc 是否fc
|
|
943
|
+
* @returns
|
|
944
|
+
*/
|
|
945
|
+
function Rate(real_score, tot_score, fc) {
|
|
946
|
+
|
|
947
|
+
if (!real_score) {
|
|
948
|
+
return 'F'
|
|
949
|
+
} else if (real_score == tot_score) {
|
|
950
|
+
return 'phi'
|
|
951
|
+
} else if (fc) {
|
|
952
|
+
return 'FC'
|
|
953
|
+
} else if (real_score >= tot_score * 0.96) {
|
|
954
|
+
return 'V'
|
|
955
|
+
} else if (real_score >= tot_score * 0.92) {
|
|
956
|
+
return 'S'
|
|
957
|
+
} else if (real_score >= tot_score * 0.88) {
|
|
958
|
+
return 'A'
|
|
959
|
+
} else if (real_score >= tot_score * 0.82) {
|
|
960
|
+
return 'B'
|
|
961
|
+
} else if (real_score >= tot_score * 0.70) {
|
|
962
|
+
return 'C'
|
|
963
|
+
} else {
|
|
964
|
+
return 'F'
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
|