feat: missionsCanGiveAllRelics cheat (#2217)
Closes #1060 Reviewed-on: OpenWF/SpaceNinjaServer#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:
		
							parent
							
								
									3619bdfdb5
								
							
						
					
					
						commit
						3c64f17e34
					
				@ -54,6 +54,7 @@
 | 
				
			|||||||
  "noDojoResearchCosts": false,
 | 
					  "noDojoResearchCosts": false,
 | 
				
			||||||
  "noDojoResearchTime": false,
 | 
					  "noDojoResearchTime": false,
 | 
				
			||||||
  "fastClanAscension": false,
 | 
					  "fastClanAscension": false,
 | 
				
			||||||
 | 
					  "missionsCanGiveAllRelics": false,
 | 
				
			||||||
  "spoofMasteryRank": -1,
 | 
					  "spoofMasteryRank": -1,
 | 
				
			||||||
  "nightwaveStandingMultiplier": 1,
 | 
					  "nightwaveStandingMultiplier": 1,
 | 
				
			||||||
  "worldState": {
 | 
					  "worldState": {
 | 
				
			||||||
 | 
				
			|||||||
@ -60,6 +60,7 @@ export interface IConfig {
 | 
				
			|||||||
    noDojoResearchCosts?: boolean;
 | 
					    noDojoResearchCosts?: boolean;
 | 
				
			||||||
    noDojoResearchTime?: boolean;
 | 
					    noDojoResearchTime?: boolean;
 | 
				
			||||||
    fastClanAscension?: boolean;
 | 
					    fastClanAscension?: boolean;
 | 
				
			||||||
 | 
					    missionsCanGiveAllRelics?: boolean;
 | 
				
			||||||
    spoofMasteryRank?: number;
 | 
					    spoofMasteryRank?: number;
 | 
				
			||||||
    nightwaveStandingMultiplier?: number;
 | 
					    nightwaveStandingMultiplier?: number;
 | 
				
			||||||
    worldState?: {
 | 
					    worldState?: {
 | 
				
			||||||
 | 
				
			|||||||
@ -2,6 +2,7 @@ import {
 | 
				
			|||||||
    ExportEnemies,
 | 
					    ExportEnemies,
 | 
				
			||||||
    ExportFusionBundles,
 | 
					    ExportFusionBundles,
 | 
				
			||||||
    ExportRegions,
 | 
					    ExportRegions,
 | 
				
			||||||
 | 
					    ExportRelics,
 | 
				
			||||||
    ExportRewards,
 | 
					    ExportRewards,
 | 
				
			||||||
    IMissionReward as IMissionRewardExternal,
 | 
					    IMissionReward as IMissionRewardExternal,
 | 
				
			||||||
    IRegion,
 | 
					    IRegion,
 | 
				
			||||||
@ -1805,6 +1806,23 @@ function getRandomMissionDrops(
 | 
				
			|||||||
            drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount });
 | 
					            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;
 | 
					    return drops;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -752,6 +752,10 @@
 | 
				
			|||||||
                                        <input class="form-check-input" type="checkbox" id="fastClanAscension" />
 | 
					                                        <input class="form-check-input" type="checkbox" id="fastClanAscension" />
 | 
				
			||||||
                                        <label class="form-check-label" for="fastClanAscension" data-loc="cheats_fastClanAscension"></label>
 | 
					                                        <label class="form-check-label" for="fastClanAscension" data-loc="cheats_fastClanAscension"></label>
 | 
				
			||||||
                                    </div>
 | 
					                                    </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;">
 | 
					                                    <form class="form-group mt-2" onsubmit="doSaveConfig('spoofMasteryRank'); return false;">
 | 
				
			||||||
                                        <label class="form-label" for="spoofMasteryRank" data-loc="cheats_spoofMasteryRank"></label>
 | 
					                                        <label class="form-label" for="spoofMasteryRank" data-loc="cheats_spoofMasteryRank"></label>
 | 
				
			||||||
                                        <div class="input-group">
 | 
					                                        <div class="input-group">
 | 
				
			||||||
 | 
				
			|||||||
@ -170,6 +170,7 @@ dict = {
 | 
				
			|||||||
    cheats_noDojoResearchCosts: `Keine Dojo-Forschungskosten`,
 | 
					    cheats_noDojoResearchCosts: `Keine Dojo-Forschungskosten`,
 | 
				
			||||||
    cheats_noDojoResearchTime: `Keine Dojo-Forschungszeit`,
 | 
					    cheats_noDojoResearchTime: `Keine Dojo-Forschungszeit`,
 | 
				
			||||||
    cheats_fastClanAscension: `Schneller Clan-Aufstieg`,
 | 
					    cheats_fastClanAscension: `Schneller Clan-Aufstieg`,
 | 
				
			||||||
 | 
					    cheats_missionsCanGiveAllRelics: `[UNTRANSLATED] Missions Can Give All Relics`,
 | 
				
			||||||
    cheats_spoofMasteryRank: `Gefälschter Meisterschaftsrang (-1 zum deaktivieren)`,
 | 
					    cheats_spoofMasteryRank: `Gefälschter Meisterschaftsrang (-1 zum deaktivieren)`,
 | 
				
			||||||
    cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
 | 
					    cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
 | 
				
			||||||
    cheats_save: `[UNTRANSLATED] Save`,
 | 
					    cheats_save: `[UNTRANSLATED] Save`,
 | 
				
			||||||
 | 
				
			|||||||
@ -169,6 +169,7 @@ dict = {
 | 
				
			|||||||
    cheats_noDojoResearchCosts: `No Dojo Research Costs`,
 | 
					    cheats_noDojoResearchCosts: `No Dojo Research Costs`,
 | 
				
			||||||
    cheats_noDojoResearchTime: `No Dojo Research Time`,
 | 
					    cheats_noDojoResearchTime: `No Dojo Research Time`,
 | 
				
			||||||
    cheats_fastClanAscension: `Fast Clan Ascension`,
 | 
					    cheats_fastClanAscension: `Fast Clan Ascension`,
 | 
				
			||||||
 | 
					    cheats_missionsCanGiveAllRelics: `Missions Can Give All Relics`,
 | 
				
			||||||
    cheats_spoofMasteryRank: `Spoofed Mastery Rank (-1 to disable)`,
 | 
					    cheats_spoofMasteryRank: `Spoofed Mastery Rank (-1 to disable)`,
 | 
				
			||||||
    cheats_nightwaveStandingMultiplier: `Nightwave Standing Multiplier`,
 | 
					    cheats_nightwaveStandingMultiplier: `Nightwave Standing Multiplier`,
 | 
				
			||||||
    cheats_save: `Save`,
 | 
					    cheats_save: `Save`,
 | 
				
			||||||
 | 
				
			|||||||
@ -170,6 +170,7 @@ dict = {
 | 
				
			|||||||
    cheats_noDojoResearchCosts: `Sin costo de investigación del dojo`,
 | 
					    cheats_noDojoResearchCosts: `Sin costo de investigación del dojo`,
 | 
				
			||||||
    cheats_noDojoResearchTime: `Sin tiempo de investigación del dojo`,
 | 
					    cheats_noDojoResearchTime: `Sin tiempo de investigación del dojo`,
 | 
				
			||||||
    cheats_fastClanAscension: `Ascenso rápido del clan`,
 | 
					    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_spoofMasteryRank: `Rango de maestría simulado (-1 para desactivar)`,
 | 
				
			||||||
    cheats_nightwaveStandingMultiplier: `Multiplicador de Reputación de Onda Nocturna`,
 | 
					    cheats_nightwaveStandingMultiplier: `Multiplicador de Reputación de Onda Nocturna`,
 | 
				
			||||||
    cheats_save: `Guardar`,
 | 
					    cheats_save: `Guardar`,
 | 
				
			||||||
 | 
				
			|||||||
@ -170,6 +170,7 @@ dict = {
 | 
				
			|||||||
    cheats_noDojoResearchCosts: `Aucun coût de recherche (Dojo)`,
 | 
					    cheats_noDojoResearchCosts: `Aucun coût de recherche (Dojo)`,
 | 
				
			||||||
    cheats_noDojoResearchTime: `Aucun temps de recherche (Dojo)`,
 | 
					    cheats_noDojoResearchTime: `Aucun temps de recherche (Dojo)`,
 | 
				
			||||||
    cheats_fastClanAscension: `Ascension de clan rapide`,
 | 
					    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_spoofMasteryRank: `Rang de maîtrise personnalisé (-1 pour désactiver)`,
 | 
				
			||||||
    cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
 | 
					    cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
 | 
				
			||||||
    cheats_save: `[UNTRANSLATED] Save`,
 | 
					    cheats_save: `[UNTRANSLATED] Save`,
 | 
				
			||||||
 | 
				
			|||||||
@ -170,6 +170,7 @@ dict = {
 | 
				
			|||||||
    cheats_noDojoResearchCosts: `Бесплатные Исследование Додзё`,
 | 
					    cheats_noDojoResearchCosts: `Бесплатные Исследование Додзё`,
 | 
				
			||||||
    cheats_noDojoResearchTime: `Мгновенные Исследование Додзё`,
 | 
					    cheats_noDojoResearchTime: `Мгновенные Исследование Додзё`,
 | 
				
			||||||
    cheats_fastClanAscension: `Мгновенное Вознесение Клана`,
 | 
					    cheats_fastClanAscension: `Мгновенное Вознесение Клана`,
 | 
				
			||||||
 | 
					    cheats_missionsCanGiveAllRelics: `[UNTRANSLATED] Missions Can Give All Relics`,
 | 
				
			||||||
    cheats_spoofMasteryRank: `Подделанный ранг мастерства (-1 для отключения)`,
 | 
					    cheats_spoofMasteryRank: `Подделанный ранг мастерства (-1 для отключения)`,
 | 
				
			||||||
    cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
 | 
					    cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
 | 
				
			||||||
    cheats_save: `[UNTRANSLATED] Save`,
 | 
					    cheats_save: `[UNTRANSLATED] Save`,
 | 
				
			||||||
 | 
				
			|||||||
@ -170,6 +170,7 @@ dict = {
 | 
				
			|||||||
    cheats_noDojoResearchCosts: `无视道场研究消耗`,
 | 
					    cheats_noDojoResearchCosts: `无视道场研究消耗`,
 | 
				
			||||||
    cheats_noDojoResearchTime: `无视道场研究时间`,
 | 
					    cheats_noDojoResearchTime: `无视道场研究时间`,
 | 
				
			||||||
    cheats_fastClanAscension: `快速升级氏族`,
 | 
					    cheats_fastClanAscension: `快速升级氏族`,
 | 
				
			||||||
 | 
					    cheats_missionsCanGiveAllRelics: `[UNTRANSLATED] Missions Can Give All Relics`,
 | 
				
			||||||
    cheats_spoofMasteryRank: `伪造精通段位(-1为禁用)`,
 | 
					    cheats_spoofMasteryRank: `伪造精通段位(-1为禁用)`,
 | 
				
			||||||
    cheats_nightwaveStandingMultiplier: `午夜电波声望倍率`,
 | 
					    cheats_nightwaveStandingMultiplier: `午夜电波声望倍率`,
 | 
				
			||||||
    cheats_save: `[UNTRANSLATED] Save`,
 | 
					    cheats_save: `[UNTRANSLATED] Save`,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user