XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

feat: Blood of Perita (#3141)

without alert generation Re #1103 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3141 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>

f977f542
AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
提交于

代码差异

13 个文件 +54 -3
Modified src/services/configService.ts +1 -0
@@ -43,6 +43,7 @@ export interface IConfig {
43 43 varziaFullyStocked?: boolean;
44 44 wolfHunt?: number;
45 45 orphixVenom?: boolean;
46 bloodOfPerita?: boolean;
46 47 longShadow?: boolean;
47 48 hallowedFlame?: boolean;
48 49 anniversary?: number;
Modified src/services/missionInventoryUpdateService.ts +20 -2
@@ -16,7 +16,7 @@ import {
16 16 import type { IMissionInventoryUpdateRequest, IRewardInfo } from "../types/requestTypes.ts";
17 17 import { logger } from "../utils/logger.ts";
18 18 import type { IRngResult } from "./rngService.ts";
19 import { SRng, generateRewardSeed, getRandomElement, getRandomReward } from "./rngService.ts";
19 import { SRng, generateRewardSeed, getRandomElement, getRandomInt, getRandomReward } from "./rngService.ts";
20 20 import type { IMission, TEquipmentKey } from "../types/inventoryTypes/inventoryTypes.ts";
21 21 import { equipmentKeys } from "../types/inventoryTypes/inventoryTypes.ts";
22 22 import {
@@ -1164,7 +1164,8 @@ export const addMissionRewards = async (
1164 1164 StrippedItems: strippedItems,
1165 1165 AffiliationChanges: AffiliationMods,
1166 1166 InvasionProgress: invasionProgress,
1167 EndOfMatchUpload: endOfMatchUpload
1167 EndOfMatchUpload: endOfMatchUpload,
1168 GoalTag: goalTag
1168 1169 }: IMissionInventoryUpdateRequest,
1169 1170 firstCompletion: boolean
1170 1171 ): Promise<AddMissionRewardsReturnType> => {
@@ -1250,6 +1251,23 @@ export const addMissionRewards = async (
1250 1251 }
1251 1252 }
1252 1253
1254 if (goalTag && goalTag == "12MinWarEvent") {
1255 if (["SolNode250", "SolNode251", "SolNode252"].includes(rewardInfo.node)) {
1256 if (account.BuildLabel) {
1257 if (version_compare(account.BuildLabel, gameToBuildVersion["41.0.0"]) < 0) {
1258 throw new Error(
1259 `account logged into ${account.BuildLabel} (< 41.0.0) but now completes >= 41.0.0 goal ?!`
1260 );
1261 }
1262
1263 MissionRewards.push({
1264 StoreItem: "/Lotus/StoreItems/Types/Gameplay/Tau/Resources/TwelveResourceCurrencyItem",
1265 ItemCount: getRandomInt(8, 15) + (missions?.Tier ? 2 : 0)
1266 });
1267 }
1268 }
1269 }
1270
1253 1271 if (levelKeyName) {
1254 1272 const fixedLevelRewards = getLevelKeyRewards(levelKeyName, account.BuildLabel);
1255 1273 //logger.debug(`fixedLevelRewards ${fixedLevelRewards}`);
Modified src/services/worldStateService.ts +20 -0
@@ -3101,6 +3101,26 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
3101 3101 );
3102 3102 }
3103 3103
3104 if (config.worldState?.bloodOfPerita) {
3105 if (buildLabel && version_compare(buildLabel, gameToBuildVersion["41.0.0"]) >= 0) {
3106 worldState.Goals.push({
3107 _id: { $oid: "694189080000000000000000" },
3108 Activation: { $date: { $numberLong: "1765902600000" } },
3109 Expiry: { $date: { $numberLong: "2000000000000" } },
3110 GracePeriod: { $date: { $numberLong: "2000000000000" } },
3111 Count: 0,
3112 Goal: 0,
3113 Success: 0,
3114 Personal: true,
3115 Desc: "/Lotus/Language/TauPrequel/TauPrequelFinal/TauPrequelEventName",
3116 ToolTip: "/Lotus/Language/TauPrequel/TauPrequelFinal/BloodOfPeritaDetails",
3117 Icon: "/Lotus/Interface/Icons/WorldStatePanel/BloodOfPeritaEventBadgeSmall.png",
3118 Tag: "12MinWarEvent",
3119 Node: "SolNode251"
3120 });
3121 }
3122 }
3123
3104 3124 // Thermia Fractures activates for 14 days, with alternating 4 and 3-day breaks
3105 3125 const thermiaFracturesCycleDay = day % 35;
3106 3126 const isThermiaFracturesActive =
Modified src/types/requestTypes.ts +1 -1
@@ -62,7 +62,7 @@ export type IMissionInventoryUpdateRequest = {
62 62 AffiliationChanges?: IAffiliationChange[];
63 63 crossPlaySetting?: string;
64 64 rewardsMultiplier?: number;
65 GoalTag: string;
65 GoalTag?: string;
66 66 LevelKeyName: string;
67 67 KeyOwner?: string;
68 68 KeyRemovalHash?: string;
Modified src/types/worldStateTypes.ts +1 -0
@@ -92,6 +92,7 @@ export interface IGoal {
92 92 _id: IOid;
93 93 Activation: IMongoDate;
94 94 Expiry: IMongoDate;
95 GracePeriod?: IMongoDate; // U41+
95 96
96 97 Count?: number;
97 98 HealthPct?: number;
Modified static/webui/index.html +4 -0
@@ -1255,6 +1255,10 @@
1255 1255 <label class="form-check-label" for="unfaithfulBugFixes.useAnniversaryTagForOldGoals" data-loc="worldState_useAnniversaryTagForOldGoals"></label>
1256 1256 <abbr data-loc-inc="worldState_anniversary"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM320 200C333.3 200 344 210.7 344 224L344 336C344 349.3 333.3 360 320 360C306.7 360 296 349.3 296 336L296 224C296 210.7 306.7 200 320 200zM293.3 416C292.7 406.1 297.6 396.7 306.1 391.5C314.6 386.4 325.3 386.4 333.8 391.5C342.3 396.7 347.2 406.1 346.6 416C347.2 425.9 342.3 435.3 333.8 440.5C325.3 445.6 314.6 445.6 306.1 440.5C297.6 435.3 292.7 425.9 293.3 416z"/></svg></abbr>
1257 1257 </div>
1258 <div class="form-check">
1259 <input class="form-check-input" type="checkbox" id="worldState.bloodOfPerita" />
1260 <label class="form-check-label" for="worldState.bloodOfPerita" data-loc="worldState_bloodOfPerita"></label>
1261 </div>
1258 1262 <div class="form-check">
1259 1263 <input class="form-check-input" type="checkbox" id="worldState.orphixVenom" />
1260 1264 <label class="form-check-label" for="worldState.orphixVenom" data-loc="worldState_orphixVenom"></label>
Modified static/webui/translations/de.js +1 -0
@@ -308,6 +308,7 @@ dict = {
308 308 worldState_wolfHunt: `Wolfsjagd`,
309 309 worldState_voidCorruption: `Void-Korruption (|VAL|)`,
310 310 worldState_orphixVenom: `Orphix Gift`,
311 worldState_bloodOfPerita: `Blut von Perita`,
311 312 worldState_longShadow: `Lange Schatten`,
312 313 worldState_hallowedFlame: `Geweihte Flamme`,
313 314 worldState_hallowedNightmares: `Geweihte Albträume`,
Modified static/webui/translations/en.js +1 -0
@@ -307,6 +307,7 @@ dict = {
307 307 worldState_wolfHunt: `Wolf Hunt`,
308 308 worldState_voidCorruption: `Void Corruption (|VAL|)`,
309 309 worldState_orphixVenom: `Orphix Venom`,
310 worldState_bloodOfPerita: `Blood of Perita`,
310 311 worldState_longShadow: `Long Shadow`,
311 312 worldState_hallowedFlame: `Hallowed Flame`,
312 313 worldState_hallowedNightmares: `Hallowed Nightmares`,
Modified static/webui/translations/es.js +1 -0
@@ -308,6 +308,7 @@ dict = {
308 308 worldState_wolfHunt: `Cacería del Lobo`,
309 309 worldState_voidCorruption: `Corrupción del Vacío (|VAL|)`,
310 310 worldState_orphixVenom: `Veneno de Orphix`,
311 worldState_bloodOfPerita: `Sangre de Perita`,
311 312 worldState_longShadow: `Sombra Prolongada`,
312 313 worldState_hallowedFlame: `Llama Sagrada`,
313 314 worldState_hallowedNightmares: `Pesadillas Sagradas`,
Modified static/webui/translations/fr.js +1 -0
@@ -308,6 +308,7 @@ dict = {
308 308 worldState_wolfHunt: `Chasse au Loup`,
309 309 worldState_voidCorruption: `Corruption du Néant (|VAL|)`,
310 310 worldState_orphixVenom: `Venin Orphix`,
311 worldState_bloodOfPerita: `Sang de Perita`,
311 312 worldState_longShadow: `La Propagation des Ombres`,
312 313 worldState_hallowedFlame: `Flamme Hantée`,
313 314 worldState_hallowedNightmares: `Cauchemars Hantés`,
Modified static/webui/translations/ru.js +1 -0
@@ -308,6 +308,7 @@ dict = {
308 308 worldState_wolfHunt: `Волчья Охота`,
309 309 worldState_voidCorruption: `Искажение Бездны (|VAL|)`,
310 310 worldState_orphixVenom: `Яд Орфикса`,
311 worldState_bloodOfPerita: `Кровь Периты`,
311 312 worldState_longShadow: `Длинная Тень`,
312 313 worldState_hallowedFlame: `Священное пламя`,
313 314 worldState_hallowedNightmares: `Священные кошмары`,
Modified static/webui/translations/uk.js +1 -0
@@ -308,6 +308,7 @@ dict = {
308 308 worldState_wolfHunt: `Полювання на Вовка`,
309 309 worldState_voidCorruption: `Викривлення Порожнечі (|VAL|)`,
310 310 worldState_orphixVenom: `Орфіксова отрута`,
311 worldState_bloodOfPerita: `Кров Періти`,
311 312 worldState_longShadow: `Довга тінь`,
312 313 worldState_hallowedFlame: `Священне полум'я`,
313 314 worldState_hallowedNightmares: `Священні жахіття`,
Modified static/webui/translations/zh.js +1 -0