feat: missionsCanGiveAllRelics cheat (#2217)
All checks were successful
Build Docker image / docker-arm64 (push) Successful in 58s
Build / build (push) Successful in 1m22s
Build Docker image / docker-amd64 (push) Successful in 1m15s

Closes #1060

Reviewed-on: #2217
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
Sainan 2025-06-20 04:42:11 -07:00 committed by Sainan
parent 3619bdfdb5
commit 3c64f17e34
10 changed files with 30 additions and 0 deletions

View File

@ -54,6 +54,7 @@
"noDojoResearchCosts": false,
"noDojoResearchTime": false,
"fastClanAscension": false,
"missionsCanGiveAllRelics": false,
"spoofMasteryRank": -1,
"nightwaveStandingMultiplier": 1,
"worldState": {

View File

@ -60,6 +60,7 @@ export interface IConfig {
noDojoResearchCosts?: boolean;
noDojoResearchTime?: boolean;
fastClanAscension?: boolean;
missionsCanGiveAllRelics?: boolean;
spoofMasteryRank?: number;
nightwaveStandingMultiplier?: number;
worldState?: {

View File

@ -2,6 +2,7 @@ import {
ExportEnemies,
ExportFusionBundles,
ExportRegions,
ExportRelics,
ExportRewards,
IMissionReward as IMissionRewardExternal,
IRegion,
@ -1805,6 +1806,23 @@ function getRandomMissionDrops(
drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount });
}
}
if (config.missionsCanGiveAllRelics) {
for (const drop of drops) {
const itemType = fromStoreItem(drop.StoreItem);
if (itemType in ExportRelics) {
const relic = ExportRelics[itemType];
const replacement = getRandomElement(
Object.entries(ExportRelics).filter(
arr => arr[1].era == relic.era && arr[1].quality == relic.quality
)
)!;
logger.debug(`replacing ${relic.era} ${relic.category} with ${replacement[1].category}`);
drop.StoreItem = toStoreItem(replacement[0]);
}
}
}
return drops;
}

View File

@ -752,6 +752,10 @@
<input class="form-check-input" type="checkbox" id="fastClanAscension" />
<label class="form-check-label" for="fastClanAscension" data-loc="cheats_fastClanAscension"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="missionsCanGiveAllRelics" />
<label class="form-check-label" for="missionsCanGiveAllRelics" data-loc="cheats_missionsCanGiveAllRelics"></label>
</div>
<form class="form-group mt-2" onsubmit="doSaveConfig('spoofMasteryRank'); return false;">
<label class="form-label" for="spoofMasteryRank" data-loc="cheats_spoofMasteryRank"></label>
<div class="input-group">

View File

@ -170,6 +170,7 @@ dict = {
cheats_noDojoResearchCosts: `Keine Dojo-Forschungskosten`,
cheats_noDojoResearchTime: `Keine Dojo-Forschungszeit`,
cheats_fastClanAscension: `Schneller Clan-Aufstieg`,
cheats_missionsCanGiveAllRelics: `[UNTRANSLATED] Missions Can Give All Relics`,
cheats_spoofMasteryRank: `Gefälschter Meisterschaftsrang (-1 zum deaktivieren)`,
cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
cheats_save: `[UNTRANSLATED] Save`,

View File

@ -169,6 +169,7 @@ dict = {
cheats_noDojoResearchCosts: `No Dojo Research Costs`,
cheats_noDojoResearchTime: `No Dojo Research Time`,
cheats_fastClanAscension: `Fast Clan Ascension`,
cheats_missionsCanGiveAllRelics: `Missions Can Give All Relics`,
cheats_spoofMasteryRank: `Spoofed Mastery Rank (-1 to disable)`,
cheats_nightwaveStandingMultiplier: `Nightwave Standing Multiplier`,
cheats_save: `Save`,

View File

@ -170,6 +170,7 @@ dict = {
cheats_noDojoResearchCosts: `Sin costo de investigación del dojo`,
cheats_noDojoResearchTime: `Sin tiempo de investigación del dojo`,
cheats_fastClanAscension: `Ascenso rápido del clan`,
cheats_missionsCanGiveAllRelics: `[UNTRANSLATED] Missions Can Give All Relics`,
cheats_spoofMasteryRank: `Rango de maestría simulado (-1 para desactivar)`,
cheats_nightwaveStandingMultiplier: `Multiplicador de Reputación de Onda Nocturna`,
cheats_save: `Guardar`,

View File

@ -170,6 +170,7 @@ dict = {
cheats_noDojoResearchCosts: `Aucun coût de recherche (Dojo)`,
cheats_noDojoResearchTime: `Aucun temps de recherche (Dojo)`,
cheats_fastClanAscension: `Ascension de clan rapide`,
cheats_missionsCanGiveAllRelics: `[UNTRANSLATED] Missions Can Give All Relics`,
cheats_spoofMasteryRank: `Rang de maîtrise personnalisé (-1 pour désactiver)`,
cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
cheats_save: `[UNTRANSLATED] Save`,

View File

@ -170,6 +170,7 @@ dict = {
cheats_noDojoResearchCosts: `Бесплатные Исследование Додзё`,
cheats_noDojoResearchTime: `Мгновенные Исследование Додзё`,
cheats_fastClanAscension: `Мгновенное Вознесение Клана`,
cheats_missionsCanGiveAllRelics: `[UNTRANSLATED] Missions Can Give All Relics`,
cheats_spoofMasteryRank: `Подделанный ранг мастерства (-1 для отключения)`,
cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
cheats_save: `[UNTRANSLATED] Save`,

View File

@ -170,6 +170,7 @@ dict = {
cheats_noDojoResearchCosts: `无视道场研究消耗`,
cheats_noDojoResearchTime: `无视道场研究时间`,
cheats_fastClanAscension: `快速升级氏族`,
cheats_missionsCanGiveAllRelics: `[UNTRANSLATED] Missions Can Give All Relics`,
cheats_spoofMasteryRank: `伪造精通段位(-1为禁用)`,
cheats_nightwaveStandingMultiplier: `午夜电波声望倍率`,
cheats_save: `[UNTRANSLATED] Save`,