cheat: crackRelicForPlatinum
This commit is contained in:
parent
bbbc554939
commit
11c085fcd7
@ -9,6 +9,7 @@ import { addMiscItems, combineInventoryChanges } from "../services/inventoryServ
|
||||
import { handleStoreItemAcquisition } from "../services/purchaseService.ts";
|
||||
import type { IInventoryChanges } from "../types/purchaseTypes.ts";
|
||||
import { config } from "../services/configService.ts";
|
||||
import { log } from "winston";
|
||||
|
||||
export const crackRelic = async (
|
||||
inventory: TInventoryDatabaseDocument,
|
||||
@ -54,6 +55,26 @@ export const crackRelic = async (
|
||||
(await handleStoreItemAcquisition(reward.type, inventory, reward.itemCount)).InventoryChanges
|
||||
);
|
||||
|
||||
if (inventory.crackRelicForPlatinum) {
|
||||
let platinumReward = 0;
|
||||
switch (reward.rarity) {
|
||||
case "COMMON":
|
||||
platinumReward = inventory.relicPlatinumCommon ?? 2;
|
||||
break;
|
||||
case "UNCOMMON":
|
||||
platinumReward = inventory.relicPlatinumUncommon ?? 5;
|
||||
break;
|
||||
case "RARE":
|
||||
platinumReward = inventory.relicPlatinumRare ?? 12;
|
||||
break;
|
||||
case "LEGENDARY":
|
||||
logger.warn(`got a legendary reward for a relic!`);
|
||||
break;
|
||||
}
|
||||
logger.debug(`adding ${platinumReward} platinum to inventory for a ${reward.rarity} reward`);
|
||||
inventory.PremiumCredits += platinumReward;
|
||||
}
|
||||
|
||||
return reward;
|
||||
};
|
||||
|
||||
|
||||
@ -1475,6 +1475,9 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
||||
playerSkillGainsMultiplierSpace: Number,
|
||||
playerSkillGainsMultiplierDrifter: Number,
|
||||
extraRelicRewards: Number,
|
||||
relicPlatinumCommon: Number,
|
||||
relicPlatinumUncommon: Number,
|
||||
relicPlatinumRare: Number,
|
||||
|
||||
SubscribedToEmails: { type: Number, default: 0 },
|
||||
SubscribedToEmailsPersonalized: { type: Number, default: 0 },
|
||||
|
||||
@ -68,6 +68,10 @@ export interface IAccountCheats {
|
||||
playerSkillGainsMultiplierSpace?: number;
|
||||
playerSkillGainsMultiplierDrifter?: number;
|
||||
extraRelicRewards?: number;
|
||||
crackRelicForPlatinum?: boolean;
|
||||
relicPlatinumCommon?: number;
|
||||
relicPlatinumUncommon?: number;
|
||||
relicPlatinumRare?: number;
|
||||
}
|
||||
|
||||
export interface IInventoryDatabase
|
||||
|
||||
@ -892,6 +892,31 @@
|
||||
<button class="btn btn-secondary" type="button" data-loc="cheats_save"></button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="crackRelicForPlatinum" />
|
||||
<label class="form-check-label" for="crackRelicForPlatinum" data-loc="cheats_crackRelicForPlatinum"></label>
|
||||
</div>
|
||||
<form class="form-group mt-2">
|
||||
<label class="form-label" for="relicPlatinumCommon" data-loc="cheats_relicPlatinumCommon"></label>
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="relicPlatinumCommon" type="number" min="0" max="65535" data-default="2" />
|
||||
<button class="btn btn-secondary" type="button" data-loc="cheats_save"></button>
|
||||
</div>
|
||||
</form>
|
||||
<form class="form-group mt-2">
|
||||
<label class="form-label" for="relicPlatinumUncommon" data-loc="cheats_relicPlatinumUncommon"></label>
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="relicPlatinumUncommon" type="number" min="0" max="65535" data-default="5" />
|
||||
<button class="btn btn-secondary" type="button" data-loc="cheats_save"></button>
|
||||
</div>
|
||||
</form>
|
||||
<form class="form-group mt-2">
|
||||
<label class="form-label" for="relicPlatinumRare" data-loc="cheats_relicPlatinumRare"></label>
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="relicPlatinumRare" type="number" min="0" max="65535" data-default="12" />
|
||||
<button class="btn btn-secondary" type="button" data-loc="cheats_save"></button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="mt-2 mb-2 d-flex flex-wrap gap-2">
|
||||
<button class="btn btn-primary" onclick="debounce(unlockAllMissions);" data-loc="cheats_unlockAllMissions"></button>
|
||||
<button class="btn btn-primary" onclick="debounce(markAllAsRead);" data-loc="cheats_markAllAsRead"></button>
|
||||
|
||||
@ -255,6 +255,10 @@ dict = {
|
||||
cheats_playerSkillGainsMultiplierSpace: `[UNTRANSLATED] Intrinsics Gains Multiplier (Space)`,
|
||||
cheats_playerSkillGainsMultiplierDrifter: `[UNTRANSLATED] Intrinsics Gains Multiplier (Drifter)`,
|
||||
cheats_extraRelicRewards: `[UNTRANSLATED] Extra Relic Rewards`,
|
||||
cheats_crackRelicForPlatinum: `[UNTRANSLATED] Crack Relic for Platinum`,
|
||||
cheats_relicPlatinumCommon: `[UNTRANSLATED] Platinum on Common Rewards`,
|
||||
cheats_relicPlatinumUncommon: `[UNTRANSLATED] Platinum on Uncommon Rewards`,
|
||||
cheats_relicPlatinumRare: `[UNTRANSLATED] Platinum on Rare Rewards`,
|
||||
|
||||
worldState: `Weltstatus`,
|
||||
worldState_creditBoost: `Event Booster: Credit`,
|
||||
|
||||
@ -254,6 +254,10 @@ dict = {
|
||||
cheats_playerSkillGainsMultiplierSpace: `Intrinsics Gains Multiplier (Space)`,
|
||||
cheats_playerSkillGainsMultiplierDrifter: `Intrinsics Gains Multiplier (Drifter)`,
|
||||
cheats_extraRelicRewards: `Extra Relic Rewards`,
|
||||
cheats_crackRelicForPlatinum: `Crack Relic for Platinum`,
|
||||
cheats_relicPlatinumCommon: `Platinum on Common Rewards`,
|
||||
cheats_relicPlatinumUncommon: `Platinum on Uncommon Rewards`,
|
||||
cheats_relicPlatinumRare: `Platinum on Rare Rewards`,
|
||||
|
||||
worldState: `World State`,
|
||||
worldState_creditBoost: `Credit Boost`,
|
||||
|
||||
@ -255,6 +255,10 @@ dict = {
|
||||
cheats_playerSkillGainsMultiplierSpace: `[UNTRANSLATED] Intrinsics Gains Multiplier (Space)`,
|
||||
cheats_playerSkillGainsMultiplierDrifter: `[UNTRANSLATED] Intrinsics Gains Multiplier (Drifter)`,
|
||||
cheats_extraRelicRewards: `[UNTRANSLATED] Extra Relic Rewards`,
|
||||
cheats_crackRelicForPlatinum: `[UNTRANSLATED] Crack Relic for Platinum`,
|
||||
cheats_relicPlatinumCommon: `[UNTRANSLATED] Platinum on Common Rewards`,
|
||||
cheats_relicPlatinumUncommon: `[UNTRANSLATED] Platinum on Uncommon Rewards`,
|
||||
cheats_relicPlatinumRare: `[UNTRANSLATED] Platinum on Rare Rewards`,
|
||||
|
||||
worldState: `Estado del mundo`,
|
||||
worldState_creditBoost: `Potenciador de Créditos`,
|
||||
|
||||
@ -255,6 +255,10 @@ dict = {
|
||||
cheats_playerSkillGainsMultiplierSpace: `[UNTRANSLATED] Intrinsics Gains Multiplier (Space)`,
|
||||
cheats_playerSkillGainsMultiplierDrifter: `[UNTRANSLATED] Intrinsics Gains Multiplier (Drifter)`,
|
||||
cheats_extraRelicRewards: `[UNTRANSLATED] Extra Relic Rewards`,
|
||||
cheats_crackRelicForPlatinum: `[UNTRANSLATED] Crack Relic for Platinum`,
|
||||
cheats_relicPlatinumCommon: `[UNTRANSLATED] Platinum on Common Rewards`,
|
||||
cheats_relicPlatinumUncommon: `[UNTRANSLATED] Platinum on Uncommon Rewards`,
|
||||
cheats_relicPlatinumRare: `[UNTRANSLATED] Platinum on Rare Rewards`,
|
||||
|
||||
worldState: `Carte Solaire`,
|
||||
worldState_creditBoost: `Booster de Crédit`,
|
||||
|
||||
@ -255,6 +255,10 @@ dict = {
|
||||
cheats_playerSkillGainsMultiplierSpace: `[UNTRANSLATED] Intrinsics Gains Multiplier (Space)`,
|
||||
cheats_playerSkillGainsMultiplierDrifter: `[UNTRANSLATED] Intrinsics Gains Multiplier (Drifter)`,
|
||||
cheats_extraRelicRewards: `[UNTRANSLATED] Extra Relic Rewards`,
|
||||
cheats_crackRelicForPlatinum: `[UNTRANSLATED] Crack Relic for Platinum`,
|
||||
cheats_relicPlatinumCommon: `[UNTRANSLATED] Platinum on Common Rewards`,
|
||||
cheats_relicPlatinumUncommon: `[UNTRANSLATED] Platinum on Uncommon Rewards`,
|
||||
cheats_relicPlatinumRare: `[UNTRANSLATED] Platinum on Rare Rewards`,
|
||||
|
||||
worldState: `Состояние мира`,
|
||||
worldState_creditBoost: `Глобальный бустер Кредитов`,
|
||||
|
||||
@ -255,6 +255,10 @@ dict = {
|
||||
cheats_playerSkillGainsMultiplierSpace: `[UNTRANSLATED] Intrinsics Gains Multiplier (Space)`,
|
||||
cheats_playerSkillGainsMultiplierDrifter: `[UNTRANSLATED] Intrinsics Gains Multiplier (Drifter)`,
|
||||
cheats_extraRelicRewards: `[UNTRANSLATED] Extra Relic Rewards`,
|
||||
cheats_crackRelicForPlatinum: `[UNTRANSLATED] Crack Relic for Platinum`,
|
||||
cheats_relicPlatinumCommon: `[UNTRANSLATED] Platinum on Common Rewards`,
|
||||
cheats_relicPlatinumUncommon: `[UNTRANSLATED] Platinum on Uncommon Rewards`,
|
||||
cheats_relicPlatinumRare: `[UNTRANSLATED] Platinum on Rare Rewards`,
|
||||
|
||||
worldState: `Стан світу`,
|
||||
worldState_creditBoost: `Глобальне посилення Кредитів`,
|
||||
|
||||
@ -255,6 +255,10 @@ dict = {
|
||||
cheats_playerSkillGainsMultiplierSpace: `內源之力获取倍率 (九重天)`,
|
||||
cheats_playerSkillGainsMultiplierDrifter: `內源之力获取倍率 (漂泊者)`,
|
||||
cheats_extraRelicRewards: `额外遗物奖励`,
|
||||
cheats_crackRelicForPlatinum: `打开遗物时获得白金`,
|
||||
cheats_relicPlatinumCommon: `普通奖励的白金`,
|
||||
cheats_relicPlatinumUncommon: `罕见奖励的白金`,
|
||||
cheats_relicPlatinumRare: `稀有奖励的白金`,
|
||||
|
||||
worldState: `世界状态配置`,
|
||||
worldState_creditBoost: `现金加成`,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user