feat: noArgonCrystalDecay cheat
All checks were successful
Build / build (22) (push) Successful in 41s
Build / build (18) (push) Successful in 1m9s
Build / build (18) (pull_request) Successful in 44s
Build / build (22) (pull_request) Successful in 43s
Build / build (20) (pull_request) Successful in 1m4s
Build / build (20) (push) Successful in 3m12s

This commit is contained in:
Sainan 2025-03-15 13:36:17 +01:00
parent 449690cdac
commit 8358b4f7b5
9 changed files with 44 additions and 29 deletions

View File

@ -29,6 +29,7 @@
"unlockExilusEverywhere": false,
"unlockArcanesEverywhere": false,
"noDailyStandingLimits": false,
"noArgonCrystalDecay": false,
"noVendorPurchaseLimits": true,
"instantResourceExtractorDrones": false,
"noDojoRoomBuildStage": false,

View File

@ -37,36 +37,40 @@ export const inventoryController: RequestHandler = async (request, response) =>
inventory.LibraryAvailableDailyTaskInfo = createLibraryDailyTask();
if (inventory.NextRefill) {
const lastLoginDay = Math.trunc(inventory.NextRefill.getTime() / 86400000) - 1;
const today = Math.trunc(Date.now() / 86400000);
const daysPassed = today - lastLoginDay;
for (let i = 0; i != daysPassed; ++i) {
const numArgonCrystals =
inventory.MiscItems.find(x => x.ItemType == "/Lotus/Types/Items/MiscItems/ArgonCrystal")
?.ItemCount ?? 0;
if (numArgonCrystals == 0) {
break;
}
const numStableArgonCrystals =
inventory.FoundToday?.find(x => x.ItemType == "/Lotus/Types/Items/MiscItems/ArgonCrystal")
?.ItemCount ?? 0;
const numDecayingArgonCrystals = numArgonCrystals - numStableArgonCrystals;
const numDecayingArgonCrystalsToRemove = Math.ceil(numDecayingArgonCrystals / 2);
logger.debug(`ticking argon crystals for day ${i + 1} of ${daysPassed}`, {
numArgonCrystals,
numStableArgonCrystals,
numDecayingArgonCrystals,
numDecayingArgonCrystalsToRemove
});
// Remove half of owned decaying argon crystals
addMiscItems(inventory, [
{
ItemType: "/Lotus/Types/Items/MiscItems/ArgonCrystal",
ItemCount: numDecayingArgonCrystalsToRemove * -1
}
]);
// All stable argon crystals are now decaying
if (config.noArgonCrystalDecay) {
inventory.FoundToday = undefined;
} else {
const lastLoginDay = Math.trunc(inventory.NextRefill.getTime() / 86400000) - 1;
const today = Math.trunc(Date.now() / 86400000);
const daysPassed = today - lastLoginDay;
for (let i = 0; i != daysPassed; ++i) {
const numArgonCrystals =
inventory.MiscItems.find(x => x.ItemType == "/Lotus/Types/Items/MiscItems/ArgonCrystal")
?.ItemCount ?? 0;
if (numArgonCrystals == 0) {
break;
}
const numStableArgonCrystals =
inventory.FoundToday?.find(x => x.ItemType == "/Lotus/Types/Items/MiscItems/ArgonCrystal")
?.ItemCount ?? 0;
const numDecayingArgonCrystals = numArgonCrystals - numStableArgonCrystals;
const numDecayingArgonCrystalsToRemove = Math.ceil(numDecayingArgonCrystals / 2);
logger.debug(`ticking argon crystals for day ${i + 1} of ${daysPassed}`, {
numArgonCrystals,
numStableArgonCrystals,
numDecayingArgonCrystals,
numDecayingArgonCrystalsToRemove
});
// Remove half of owned decaying argon crystals
addMiscItems(inventory, [
{
ItemType: "/Lotus/Types/Items/MiscItems/ArgonCrystal",
ItemCount: numDecayingArgonCrystalsToRemove * -1
}
]);
// All stable argon crystals are now decaying
inventory.FoundToday = undefined;
}
}
}

View File

@ -55,6 +55,7 @@ interface IConfig {
unlockExilusEverywhere?: boolean;
unlockArcanesEverywhere?: boolean;
noDailyStandingLimits?: boolean;
noArgonCrystalDecay?: boolean;
noVendorPurchaseLimits?: boolean;
instantResourceExtractorDrones?: boolean;
noDojoRoomBuildStage?: boolean;

View File

@ -517,6 +517,10 @@
<input class="form-check-input" type="checkbox" id="noDailyStandingLimits" />
<label class="form-check-label" for="noDailyStandingLimits" data-loc="cheats_noDailyStandingLimits"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="noArgonCrystalDecay" />
<label class="form-check-label" for="noArgonCrystalDecay" data-loc="cheats_noArgonCrystalDecay"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="noVendorPurchaseLimits" />
<label class="form-check-label" for="noVendorPurchaseLimits" data-loc="cheats_noVendorPurchaseLimits"></label>

View File

@ -110,6 +110,7 @@ dict = {
cheats_unlockExilusEverywhere: `Exilus-Adapter überall`,
cheats_unlockArcanesEverywhere: `Arkana-Adapter überall`,
cheats_noDailyStandingLimits: `Kein tägliches Ansehenslimit`,
cheats_noArgonCrystalDecay: `[UNTRANSLATED] No Argon Crystal Decay`,
cheats_noVendorPurchaseLimits: `Keine Kaufbeschränkungen bei Händlern`,
cheats_instantResourceExtractorDrones: `Sofortige Ressourcen-Extraktor-Drohnen`,
cheats_noDojoRoomBuildStage: `Kein Dojo-Raum-Bauvorgang`,

View File

@ -109,6 +109,7 @@ dict = {
cheats_unlockExilusEverywhere: `Exilus Adapters Everywhere`,
cheats_unlockArcanesEverywhere: `Arcane Adapters Everywhere`,
cheats_noDailyStandingLimits: `No Daily Standing Limits`,
cheats_noArgonCrystalDecay: `No Argon Crystal Decay`,
cheats_noVendorPurchaseLimits: `No Vendor Purchase Limits`,
cheats_instantResourceExtractorDrones: `Instant Resource Extractor Drones`,
cheats_noDojoRoomBuildStage: `No Dojo Room Build Stage`,

View File

@ -110,6 +110,7 @@ dict = {
cheats_unlockExilusEverywhere: `Adaptateurs Exilus partout`,
cheats_unlockArcanesEverywhere: `Adaptateur d'Arcanes partout`,
cheats_noDailyStandingLimits: `Pas de limite de réputation journalière`,
cheats_noArgonCrystalDecay: `[UNTRANSLATED] No Argon Crystal Decay`,
cheats_noVendorPurchaseLimits: `[UNTRANSLATED] No Vendor Purchase Limits`,
cheats_instantResourceExtractorDrones: `Ressources de drone d'extraction instantannées`,
cheats_noDojoRoomBuildStage: `No Dojo Room Build Stage`,

View File

@ -110,6 +110,7 @@ dict = {
cheats_unlockExilusEverywhere: `Адаптеры Эксилус везде`,
cheats_unlockArcanesEverywhere: `Адаптеры для мистификаторов везде`,
cheats_noDailyStandingLimits: `Без ежедневных ограничений репутации`,
cheats_noArgonCrystalDecay: `[UNTRANSLATED] No Argon Crystal Decay`,
cheats_noVendorPurchaseLimits: `[UNTRANSLATED] No Vendor Purchase Limits`,
cheats_instantResourceExtractorDrones: `Мгновенные Экстракторы Ресурсов`,
cheats_noDojoRoomBuildStage: `Мгновенное Строительтво Комнат Додзё`,

View File

@ -110,6 +110,7 @@ dict = {
cheats_unlockExilusEverywhere: `全物品自带适配器`,
cheats_unlockArcanesEverywhere: `全物品自带赋能适配器`,
cheats_noDailyStandingLimits: `无每日声望限制`,
cheats_noArgonCrystalDecay: `[UNTRANSLATED] No Argon Crystal Decay`,
cheats_noVendorPurchaseLimits: `[UNTRANSLATED] No Vendor Purchase Limits`,
cheats_instantResourceExtractorDrones: `即时资源采集无人机`,
cheats_noDojoRoomBuildStage: `无视道场房间建造阶段`,