diff --git a/config.json.example b/config.json.example index e35b62df..a92e3f8d 100644 --- a/config.json.example +++ b/config.json.example @@ -54,6 +54,7 @@ "noDojoResearchCosts": false, "noDojoResearchTime": false, "fastClanAscension": false, + "missionsCanGiveAllRelics": false, "spoofMasteryRank": -1, "nightwaveStandingMultiplier": 1, "worldState": { diff --git a/src/services/configService.ts b/src/services/configService.ts index 20515ee2..b4566096 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -60,6 +60,7 @@ export interface IConfig { noDojoResearchCosts?: boolean; noDojoResearchTime?: boolean; fastClanAscension?: boolean; + missionsCanGiveAllRelics?: boolean; spoofMasteryRank?: number; nightwaveStandingMultiplier?: number; worldState?: { diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index b8dc4c67..499115f9 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -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; } diff --git a/static/webui/index.html b/static/webui/index.html index 3e0856bf..e80d9fe7 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -752,6 +752,10 @@ +
+ + +
diff --git a/static/webui/translations/de.js b/static/webui/translations/de.js index bb7ec5dc..b84df0f2 100644 --- a/static/webui/translations/de.js +++ b/static/webui/translations/de.js @@ -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`, diff --git a/static/webui/translations/en.js b/static/webui/translations/en.js index 7a227acb..7f5b5aca 100644 --- a/static/webui/translations/en.js +++ b/static/webui/translations/en.js @@ -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`, diff --git a/static/webui/translations/es.js b/static/webui/translations/es.js index 5ee94df3..da50fe7e 100644 --- a/static/webui/translations/es.js +++ b/static/webui/translations/es.js @@ -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`, diff --git a/static/webui/translations/fr.js b/static/webui/translations/fr.js index a4814e2f..4a8fae03 100644 --- a/static/webui/translations/fr.js +++ b/static/webui/translations/fr.js @@ -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`, diff --git a/static/webui/translations/ru.js b/static/webui/translations/ru.js index 22277b35..612555b3 100644 --- a/static/webui/translations/ru.js +++ b/static/webui/translations/ru.js @@ -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`, diff --git a/static/webui/translations/zh.js b/static/webui/translations/zh.js index 44917ae8..6b1d4b7f 100644 --- a/static/webui/translations/zh.js +++ b/static/webui/translations/zh.js @@ -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`,