make Ghoul Purge and Plague Star events periodic
All checks were successful
Build / build (pull_request) Successful in 55s
All checks were successful
Build / build (pull_request) Successful in 55s
This commit is contained in:
parent
19c2e85c44
commit
dedf73b5ee
@ -82,8 +82,8 @@
|
||||
"darvoStockMultiplier": 1,
|
||||
"varziaOverride": "",
|
||||
"varziaFullyStocked": false,
|
||||
"plagueStar": false,
|
||||
"ghoulEmergence": false
|
||||
"plagueStar": null,
|
||||
"ghoulEmergence": null
|
||||
},
|
||||
"dev": {
|
||||
"keepVendorsExpired": false
|
||||
|
@ -1259,7 +1259,7 @@ export const addMissionRewards = async (
|
||||
}
|
||||
}
|
||||
|
||||
if (!AffiliationMods) AffiliationMods ??= [];
|
||||
AffiliationMods ??= [];
|
||||
|
||||
if (rewardInfo.JobStage != undefined && rewardInfo.jobId) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
|
@ -1563,17 +1563,24 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
|
||||
});
|
||||
}
|
||||
|
||||
if (config.worldState?.plagueStar) {
|
||||
const firstNovemberWeekday = new Date(Date.UTC(date.getUTCFullYear(), 10, 1)).getUTCDay();
|
||||
const firstNovemberMondayOffset = (8 - firstNovemberWeekday) % 7;
|
||||
|
||||
const plagueStarStart = Date.UTC(date.getUTCFullYear(), 10, firstNovemberMondayOffset + 1, 16);
|
||||
const plagueStarEnd = Date.UTC(date.getUTCFullYear(), 10, firstNovemberMondayOffset + 15, 16);
|
||||
|
||||
const isPlagueStarActive = timeMs >= plagueStarStart && timeMs < plagueStarEnd;
|
||||
if (config.worldState?.plagueStar ?? isPlagueStarActive) {
|
||||
worldState.Goals.push({
|
||||
_id: { $oid: "654a5058c757487cdb11824f" },
|
||||
Activation: {
|
||||
$date: {
|
||||
$numberLong: "1699372800000"
|
||||
$numberLong: config.worldState?.plagueStar ? "1699372800000" : plagueStarStart.toString()
|
||||
}
|
||||
},
|
||||
Expiry: {
|
||||
$date: {
|
||||
$numberLong: "2000000000000"
|
||||
$numberLong: config.worldState?.plagueStar ? "2000000000000" : plagueStarEnd.toString()
|
||||
}
|
||||
},
|
||||
Tag: "InfestedPlains",
|
||||
@ -1692,7 +1699,9 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
|
||||
pushClassicBounties(worldState.SyndicateMissions, bountyCycle);
|
||||
} while (isBeforeNextExpectedWorldStateRefresh(timeMs, bountyCycleEnd) && ++bountyCycle);
|
||||
|
||||
if (config.worldState?.ghoulEmergence) {
|
||||
const ghoulsCycleDay = day % 21;
|
||||
const isGhoulEmergenceActive = ghoulsCycleDay >= 17 && ghoulsCycleDay <= 20; // 4 days for event and 17 days for break
|
||||
if (config.worldState?.ghoulEmergence ?? isGhoulEmergenceActive) {
|
||||
const ghoulPool = [...eidolonGhoulJobs];
|
||||
const pastGhoulPool = [...eidolonGhoulJobs];
|
||||
|
||||
@ -1702,11 +1711,38 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
|
||||
const rng = new SRng(seed);
|
||||
const pastRng = new SRng(pastSeed);
|
||||
|
||||
const activeStartDay = day - ghoulsCycleDay + 17;
|
||||
const activeEndDay = activeStartDay + 5;
|
||||
const dayWithFraction = (timeMs - EPOCH) / 86400000;
|
||||
|
||||
const progress = (dayWithFraction - activeStartDay) / (activeEndDay - activeStartDay);
|
||||
const healthPct = 1 - Math.min(Math.max(progress, 0), 1);
|
||||
|
||||
worldState.Goals.push({
|
||||
_id: { $oid: "687ebbe6d1d17841c9c59f38" },
|
||||
Activation: { $date: { $numberLong: "1753204900185" } },
|
||||
Expiry: { $date: { $numberLong: "2000000000000" } },
|
||||
HealthPct: 1,
|
||||
Activation: {
|
||||
$date: {
|
||||
$numberLong: config.worldState?.ghoulEmergence
|
||||
? "1753204900185"
|
||||
: Date.UTC(
|
||||
date.getUTCFullYear(),
|
||||
date.getUTCMonth(),
|
||||
date.getUTCDate() + (day - ghoulsCycleDay + 17)
|
||||
).toString()
|
||||
}
|
||||
},
|
||||
Expiry: {
|
||||
$date: {
|
||||
$numberLong: config.worldState?.ghoulEmergence
|
||||
? "2000000000000"
|
||||
: Date.UTC(
|
||||
date.getUTCFullYear(),
|
||||
date.getUTCMonth(),
|
||||
date.getUTCDate() + (day - ghoulsCycleDay + 21)
|
||||
).toString()
|
||||
}
|
||||
},
|
||||
HealthPct: config.worldState?.ghoulEmergence ? 1 : healthPct,
|
||||
VictimNode: "SolNode228",
|
||||
Regions: [2],
|
||||
Success: 0,
|
||||
@ -1737,7 +1773,7 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
|
||||
}
|
||||
],
|
||||
JobPreviousVersion: {
|
||||
$oid: (((bountyCycle - 9000) / 1000) & 0xffffffff).toString(16).padStart(8, "0") + "0000000000000008"
|
||||
$oid: (((bountyCycle - 1) * 9000) & 0xffffffff).toString(16).padStart(8, "0") + "0000000000000008"
|
||||
},
|
||||
PreviousJobs: [
|
||||
{
|
||||
|
@ -937,14 +937,6 @@
|
||||
<input class="form-check-input" type="checkbox" id="worldState.varziaFullyStocked" />
|
||||
<label class="form-check-label" for="worldState.varziaFullyStocked" data-loc="worldState_varziaFullyStocked"></label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="worldState.plagueStar" />
|
||||
<label class="form-check-label" for="worldState.plagueStar" data-loc="worldState_plagueStar"></label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="worldState.ghoulEmergence" />
|
||||
<label class="form-check-label" for="worldState.ghoulEmergence" data-loc="worldState_ghoulEmergence"></label>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label class="form-label" for="worldState.galleonOfGhouls" data-loc="worldState_galleonOfGhouls"></label>
|
||||
<select class="form-control" id="worldState.galleonOfGhouls" data-default="0">
|
||||
@ -954,6 +946,22 @@
|
||||
<option value="3" data-loc="worldState_we3"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label class="form-label" for="worldState.ghoulEmergence" data-loc="worldState_ghoulEmergence"></label>
|
||||
<select class="form-control" id="worldState.ghoulEmergence" data-default="null">
|
||||
<option value="null" data-loc="normal"></option>
|
||||
<option value="true" data-loc="enabled"></option>
|
||||
<option value="false" data-loc="disabled"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label class="form-label" for="worldState.plagueStar" data-loc="worldState_plagueStar"></label>
|
||||
<select class="form-control" id="worldState.plagueStar" data-default="null">
|
||||
<option value="null" data-loc="normal"></option>
|
||||
<option value="true" data-loc="enabled"></option>
|
||||
<option value="false" data-loc="disabled"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label class="form-label" for="worldState.starDaysOverride" data-loc="worldState_starDays"></label>
|
||||
<select class="form-control" id="worldState.starDaysOverride" data-default="null">
|
||||
|
@ -246,8 +246,8 @@ dict = {
|
||||
worldState_baroTennoConRelay: `Baros TennoCon Relais`,
|
||||
worldState_starDays: `Sternen-Tage`,
|
||||
worldState_galleonOfGhouls: `Galeone der Ghule`,
|
||||
worldState_plagueStar: `Plagenstern`,
|
||||
worldState_ghoulEmergence: `Ghul Ausrottung`,
|
||||
worldState_plagueStar: `Plagenstern`,
|
||||
enabled: `Aktiviert`,
|
||||
disabled: `Deaktiviert`,
|
||||
worldState_we1: `Wochenende 1`,
|
||||
|
@ -245,8 +245,8 @@ dict = {
|
||||
worldState_baroTennoConRelay: `Baro's TennoCon Relay`,
|
||||
worldState_starDays: `Star Days`,
|
||||
worldState_galleonOfGhouls: `Galleon of Ghouls`,
|
||||
worldState_plagueStar: `Plague Star`,
|
||||
worldState_ghoulEmergence: `Ghoul Purge`,
|
||||
worldState_plagueStar: `Plague Star`,
|
||||
enabled: `Enabled`,
|
||||
disabled: `Disabled`,
|
||||
worldState_we1: `Weekend 1`,
|
||||
|
@ -246,8 +246,8 @@ dict = {
|
||||
worldState_baroTennoConRelay: `Repetidor de Baro de la TennoCon`,
|
||||
worldState_starDays: `Días estelares`,
|
||||
worldState_galleonOfGhouls: `Galeón de Gules`,
|
||||
worldState_plagueStar: `Estrella Infestada`,
|
||||
worldState_ghoulEmergence: `Purga de Gules`,
|
||||
worldState_plagueStar: `Estrella Infestada`,
|
||||
enabled: `Activado`,
|
||||
disabled: `Desactivado`,
|
||||
worldState_we1: `Semana 1`,
|
||||
|
@ -246,8 +246,8 @@ dict = {
|
||||
worldState_baroTennoConRelay: `[UNTRANSLATED] Baro's TennoCon Relay`,
|
||||
worldState_starDays: `Jours Stellaires`,
|
||||
worldState_galleonOfGhouls: `Galion des Goules`,
|
||||
worldState_plagueStar: `Fléau Céleste`,
|
||||
worldState_ghoulEmergence: `Purge des Goules`,
|
||||
worldState_plagueStar: `Fléau Céleste`,
|
||||
enabled: `[UNTRANSLATED] Enabled`,
|
||||
disabled: `Désactivé`,
|
||||
worldState_we1: `Weekend 1`,
|
||||
|
@ -246,8 +246,8 @@ dict = {
|
||||
worldState_baroTennoConRelay: `Реле Баро TennoCon`,
|
||||
worldState_starDays: `Звёздные дни`,
|
||||
worldState_galleonOfGhouls: `Галеон Гулей`,
|
||||
worldState_plagueStar: `Чумная звезда`,
|
||||
worldState_ghoulEmergence: `Избавление от гулей`,
|
||||
worldState_plagueStar: `Чумная звезда`,
|
||||
enabled: `Включено`,
|
||||
disabled: `Отключено`,
|
||||
worldState_we1: `Выходные 1`,
|
||||
|
@ -246,8 +246,8 @@ dict = {
|
||||
worldState_baroTennoConRelay: `Реле Баро TennoCon`,
|
||||
worldState_starDays: `Зоряні дні`,
|
||||
worldState_galleonOfGhouls: `Гульський Галеон`,
|
||||
worldState_plagueStar: `Морова зірка`,
|
||||
worldState_ghoulEmergence: `Зачищення від гулів`,
|
||||
worldState_plagueStar: `Морова зірка`,
|
||||
enabled: `Увімкнено`,
|
||||
disabled: `Вимкнено`,
|
||||
worldState_we1: `Вихідні 1`,
|
||||
|
@ -246,8 +246,8 @@ dict = {
|
||||
worldState_baroTennoConRelay: `Baro的TennoCon中继站`,
|
||||
worldState_starDays: `活动:星日`,
|
||||
worldState_galleonOfGhouls: `战术警报:尸鬼的帆船战舰`,
|
||||
worldState_plagueStar: `瘟疫之星`,
|
||||
worldState_ghoulEmergence: `尸鬼净化`,
|
||||
worldState_plagueStar: `瘟疫之星`,
|
||||
enabled: `启用`,
|
||||
disabled: `关闭/取消配置`,
|
||||
worldState_we1: `活动阶段:第一周`,
|
||||
|
Loading…
x
Reference in New Issue
Block a user