@wayward/types 2.15.0-beta.dev.20251024.1 → 2.15.1-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/game/IGlobal.d.ts +1 -0
- package/definitions/game/game/curse/Curse.d.ts +16 -1
- package/definitions/game/game/curse/CurseEvent.d.ts +9 -1
- package/definitions/game/game/curse/event/CurseEventCraftingInspiration.d.ts +3 -2
- package/definitions/game/game/curse/event/CurseEventFrigidNight.d.ts +2 -0
- package/definitions/game/game/curse/event/CurseEventHatedByTheWilds.d.ts +5 -0
- package/definitions/game/game/curse/event/CurseEventHeatWave.d.ts +2 -0
- package/definitions/game/game/curse/event/CurseEventLovedByTheWilds.d.ts +1 -0
- package/definitions/game/game/curse/event/CurseEventLucky.d.ts +2 -1
- package/definitions/game/game/curse/event/CurseEventNewPlants.d.ts +2 -0
- package/definitions/game/game/curse/event/CurseEventPlantDeath.d.ts +2 -0
- package/definitions/game/game/curse/event/CurseEventUnlucky.d.ts +2 -1
- package/definitions/game/game/entity/Entity.d.ts +2 -2
- package/definitions/game/game/entity/EntityMovable.d.ts +2 -0
- package/definitions/game/game/entity/Human.d.ts +2 -1
- package/definitions/game/game/entity/IHuman.d.ts +11 -0
- package/definitions/game/game/entity/action/IActionContext.d.ts +2 -0
- package/definitions/game/game/entity/action/usable/UsableAction.d.ts +2 -2
- package/definitions/game/game/entity/ai/AI.d.ts +3 -3
- package/definitions/game/game/entity/creature/Creature.d.ts +3 -1
- package/definitions/game/game/entity/creature/ICreature.d.ts +2 -1
- package/definitions/game/game/inspection/inspections/DeityInspection.d.ts +1 -0
- package/definitions/game/game/island/Island.d.ts +0 -2
- package/definitions/game/game/item/IItem.d.ts +8 -2
- package/definitions/game/game/item/Item.d.ts +7 -1
- package/definitions/game/game/item/ItemManager.d.ts +1 -1
- package/definitions/game/game/magic/MagicalPropertyDescriptions.d.ts +1 -0
- package/definitions/game/game/magic/MagicalPropertyType.d.ts +16 -3
- package/definitions/game/game/milestones/milestone/Runekeeper.d.ts +6 -3
- package/definitions/game/game/tile/Tile.d.ts +2 -2
- package/definitions/game/language/dictionary/Message.d.ts +846 -845
- package/definitions/game/save/upgrade/UpgradeVersion.d.ts +2 -1
- package/definitions/game/save/upgrade/UpgradeVersionRegistry.d.ts +2 -2
- package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0.d.ts +12 -0
- package/definitions/game/save/upgrade/versions/beta2.15.0/beta2.15.0.d.ts +12 -0
- package/definitions/game/save/upgrade/versions/beta2.15.1/beta2.15.1-dev20251026.d.ts +12 -0
- package/definitions/game/save/upgrade/versions/beta2.15.1/beta2.15.1-dev20251027.d.ts +38 -0
- package/definitions/game/save/upgrade/versions/beta2.15.1/beta2.15.1.d.ts +12 -0
- package/definitions/game/steamworks/Steamworks.d.ts +5 -7
- package/definitions/game/ui/screen/screens/game/component/ItemComponent.d.ts +2 -2
- package/definitions/game/ui/util/ImagePath.d.ts +1 -0
- package/definitions/game/utilities/dev/Debug.d.ts +1 -1
- package/definitions/hosts/shared/globals.d.ts +2 -2
- package/definitions/test/suite/unitTests/game/IslandTestUtilities.d.ts +54 -0
- package/definitions/utilities/Errors.d.ts +1 -0
- package/definitions/utilities/math/Math2.d.ts +7 -1
- package/package.json +1 -1
- /package/definitions/game/save/upgrade/versions/beta2.14.0/{_beta.2.14.0-dev20240828.d.ts → _beta2.14.0-dev20240828.d.ts} +0 -0
- /package/definitions/test/suite/unitTests/game/{Island.spec.d.ts → Islands.spec.d.ts} +0 -0
|
@@ -53,6 +53,7 @@ declare global {
|
|
|
53
53
|
const gameVersionTitle: string;
|
|
54
54
|
let gameVersionDeployId: IBuildId | undefined;
|
|
55
55
|
let gameVersionBuildId: IBuildId | undefined;
|
|
56
|
+
let gameVersionUpgradeId: IBuildId | undefined;
|
|
56
57
|
let webGlVersion: number;
|
|
57
58
|
const VIEWPORT_MIN_WIDTH: number;
|
|
58
59
|
const VIEWPORT_MIN_HEIGHT: number;
|
|
@@ -16,7 +16,10 @@ import { SkillType } from "@wayward/game/game/entity/skill/ISkills";
|
|
|
16
16
|
import type Island from "@wayward/game/game/island/Island";
|
|
17
17
|
import type { IVector2 } from "@wayward/game/utilities/math/IVector";
|
|
18
18
|
import { IRange, IRangeRange } from "@wayward/utilities/math/Range";
|
|
19
|
+
import type { WeightedOption } from "@wayward/utilities/random/IRandom";
|
|
19
20
|
import DataComponent from "@wayward/game/game/entity/data/DataComponent";
|
|
21
|
+
import type Creature from "@wayward/game/game/entity/creature/Creature";
|
|
22
|
+
import { ReferenceType } from "@wayward/game/game/reference/IReferenceManager";
|
|
20
23
|
export declare const CURSE_CAP = 10000;
|
|
21
24
|
export declare const CURSE_COMPONENT_ATTACK_CAP = 50;
|
|
22
25
|
export declare const CURSE_COMPONENT_ATTACK_FLOOR = 1;
|
|
@@ -92,6 +95,15 @@ export declare const CURSE_EVENTS_ENTITY_DESPAWN_CHANCE = 0.1;
|
|
|
92
95
|
* This multiplier affects how quickly curse ward doodads & items are extinguished compared to the rest
|
|
93
96
|
*/
|
|
94
97
|
export declare const CURSE_EVENTS_EXTINGUISH_WARD_MULTIPLIER = 0.2;
|
|
98
|
+
export declare const CURSE_EVENTS_RUNE_CHANCE_MULTIPLIER_UNLUCKY: IRange<number>;
|
|
99
|
+
export declare const CURSE_EVENTS_RUNE_CHANCE_MULTIPLIER_LUCKY: IRange<number>;
|
|
100
|
+
/**
|
|
101
|
+
* additional runes granted to the player on kills/tames using intInRange.
|
|
102
|
+
* the amounts in the ranges are scaled by curse %
|
|
103
|
+
*/
|
|
104
|
+
export declare const CURSE_EVENTS_RUNES_KILL_TAME: Array<WeightedOption<IRange>>;
|
|
105
|
+
export declare const CURSE_EVENTS_RUNES_SURVIVED: IRange<number>;
|
|
106
|
+
export declare const CURSE_EVENTS_CREATURE_WANDER_CURSEBEARER_PRIORITY: IRange<number>;
|
|
95
107
|
declare namespace Curse {
|
|
96
108
|
interface Helper {
|
|
97
109
|
context: CurseEventContext;
|
|
@@ -102,9 +114,10 @@ declare namespace Curse {
|
|
|
102
114
|
function all(island: Island): CurseEventContext[];
|
|
103
115
|
function isMysteryForClient(event: CurseEventInstance): boolean;
|
|
104
116
|
function isMysteryForHuman(event: CurseEventInstance, human: Human): boolean;
|
|
117
|
+
function getOwnerEvent(island: Island, creature: Creature): CurseEventInstance | undefined;
|
|
105
118
|
function willHaveEventsTonight(island: Island): boolean;
|
|
106
119
|
function canWarnAboutIncomingEvents(island: Island): boolean;
|
|
107
|
-
function getCooldownMultiplier(island: Island, humans?: Human<unknown, number,
|
|
120
|
+
function getCooldownMultiplier(island: Island, humans?: Human<unknown, number, ReferenceType.NPC | ReferenceType.Player, unknown>[]): number;
|
|
108
121
|
function clearCooldown(island: Island): void;
|
|
109
122
|
function resetCooldown(island: Island): void;
|
|
110
123
|
function tickCurse(island: Island, humans: Human[]): void;
|
|
@@ -116,6 +129,7 @@ declare namespace Curse {
|
|
|
116
129
|
function unload(island: Island): void;
|
|
117
130
|
function cleanup(island: Island, humans?: Human[], isMorning?: boolean): void;
|
|
118
131
|
function cleanupEphemerals(island: Island): void;
|
|
132
|
+
function getCursebearer(island: Island, event: CurseEventInstance): Human | undefined;
|
|
119
133
|
function createCurseEventContext(instance: CurseEventInstance, island: Island): CurseEventContext;
|
|
120
134
|
}
|
|
121
135
|
declare const SYMBOL_CURSE_EVENT_SUBSCRIBER_INSTANCES: unique symbol;
|
|
@@ -123,6 +137,7 @@ declare const SYMBOL_CURSE_EVENT_GLOBAL_SUBSCRIBER_INSTANCE: unique symbol;
|
|
|
123
137
|
declare const SYMBOL_CURSE_EVENT_ACTIVE_SUBSCRIBER_INSTANCE: unique symbol;
|
|
124
138
|
interface Curse {
|
|
125
139
|
night?: true;
|
|
140
|
+
globalCurse?: number;
|
|
126
141
|
events?: CurseEventInstance[];
|
|
127
142
|
cooldown?: number;
|
|
128
143
|
warned?: true;
|
|
@@ -25,6 +25,7 @@ import type TileEvent from "@wayward/game/game/tile/TileEvent";
|
|
|
25
25
|
import type WorldZ from "@wayward/utilities/game/WorldZ";
|
|
26
26
|
import type { StatusEffectList } from "@wayward/game/game/entity/status/StatusEffectList";
|
|
27
27
|
import type { CurseEventInstance } from "@wayward/game/game/curse/Curse";
|
|
28
|
+
import type { DeityReal } from "@wayward/game/game/deity/Deity";
|
|
28
29
|
/** The API that curse events have access to */
|
|
29
30
|
export interface CurseEventContext {
|
|
30
31
|
readonly type: CurseEventType;
|
|
@@ -93,6 +94,9 @@ export interface CurseEventContextData<T> {
|
|
|
93
94
|
}
|
|
94
95
|
export declare function CurseEventContextData<T>(id: string): CurseEventContextDataDefinition<T | undefined>;
|
|
95
96
|
export declare function CurseEventContextData<T>(id: string, initializer: () => T): CurseEventContextDataDefinition<T>;
|
|
97
|
+
export declare namespace CurseEventContextData {
|
|
98
|
+
function get<T>(instance: CurseEventInstance, def: CurseEventContextDataDefinition<T>): T | undefined;
|
|
99
|
+
}
|
|
96
100
|
export interface CurseEventExtinguishOptions {
|
|
97
101
|
/**
|
|
98
102
|
* The number of flat ticks to reduce decays by
|
|
@@ -109,6 +113,7 @@ export interface CurseEventExtinguishOptions {
|
|
|
109
113
|
}
|
|
110
114
|
export interface CurseEvent {
|
|
111
115
|
group: CurseGroup;
|
|
116
|
+
alignment: DeityReal;
|
|
112
117
|
category: CurseCategory;
|
|
113
118
|
/**
|
|
114
119
|
* The chance that this curse event will spawn compared to other events.
|
|
@@ -134,7 +139,10 @@ export interface CurseEvent {
|
|
|
134
139
|
* This is used for the `CurseEventContext.getRandomTile` and `CurseEventContext.getNearbyPlayers` methods.
|
|
135
140
|
*/
|
|
136
141
|
radius?: number;
|
|
137
|
-
|
|
142
|
+
/**
|
|
143
|
+
* Custom game options to apply during the curse event. Note that this only runs once, right at the start of the event.
|
|
144
|
+
*/
|
|
145
|
+
getOptions?(context: CurseEventContext): IGameOptionsPartial;
|
|
138
146
|
subscribers?: Array<Class<CurseEventSubscriber>>;
|
|
139
147
|
onStart?(context: CurseEventContext): void;
|
|
140
148
|
onEnd?(context: CurseEventContext): void;
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { CurseEvent } from "@wayward/game/game/curse/CurseEvent";
|
|
12
|
-
|
|
13
|
-
export declare const
|
|
12
|
+
import { IRange } from "@wayward/utilities/math/Range";
|
|
13
|
+
export declare const CURSE_EVENT_CRAFTING_INSPIRATION_DIFFICULTY_MULTIPLIER: IRange<number>;
|
|
14
|
+
export declare const CURSE_EVENT_CRAFTING_INSPIRATION_MAGIC_CHANCE_MULTIPLIER: IRange<number>;
|
|
14
15
|
declare const _default: CurseEvent;
|
|
15
16
|
export default _default;
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { CurseEvent } from "@wayward/game/game/curse/CurseEvent";
|
|
12
|
+
import { IRange } from "@wayward/utilities/math/Range";
|
|
12
13
|
export declare const CURSE_EVENT_FRIGID_NIGHT_TEMP_GRADIENT: number[];
|
|
14
|
+
export declare const CURSE_EVENT_FRIGID_NIGHT_CURSE_MULTIPLIER: IRange<number>;
|
|
13
15
|
declare const _default: CurseEvent;
|
|
14
16
|
export default _default;
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { CurseEvent } from "@wayward/game/game/curse/CurseEvent";
|
|
12
12
|
import { IRange } from "@wayward/utilities/math/Range";
|
|
13
|
+
export declare const CurseEventHatedByWildsTrackedCreatures: import("@wayward/game/game/curse/CurseEvent").CurseEventContextDataDefinition<number[]>;
|
|
14
|
+
export declare const CurseEventHatedByWildsCreaturesMadeAberrant: import("@wayward/game/game/curse/CurseEvent").CurseEventContextDataDefinition<{
|
|
15
|
+
id: number;
|
|
16
|
+
oldHealth: number;
|
|
17
|
+
}[]>;
|
|
13
18
|
export declare const CURSE_EVENT_HATED_BY_WILDS_MIN_CHANCE = 0.01;
|
|
14
19
|
export declare const CURSE_EVENT_HATED_BY_WILDS_CURSE_MULTIPLIER: IRange<number>;
|
|
15
20
|
export declare const CURSE_EVENT_HATED_BY_WILDS_COOLDOWN: IRange<number>;
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { CurseEvent } from "@wayward/game/game/curse/CurseEvent";
|
|
12
|
+
import { IRange } from "@wayward/utilities/math/Range";
|
|
12
13
|
export declare const CURSE_EVENT_HEAT_WAVE_TEMP_GRADIENT: number[];
|
|
14
|
+
export declare const CURSE_EVENT_HEAT_WAVE_CURSE_MULTIPLIER: IRange<number>;
|
|
13
15
|
declare const _default: CurseEvent;
|
|
14
16
|
export default _default;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { CurseEvent } from "@wayward/game/game/curse/CurseEvent";
|
|
12
12
|
import { IRange } from "@wayward/utilities/math/Range";
|
|
13
|
+
export declare const CurseEventLovedByWildsTrackedCreatures: import("@wayward/game/game/curse/CurseEvent").CurseEventContextDataDefinition<number[]>;
|
|
13
14
|
export declare const CURSE_EVENT_LOVED_BY_WILDS_MIN_CHANCE = 0.01;
|
|
14
15
|
export declare const CURSE_EVENT_LOVED_BY_WILDS_CURSE_MULTIPLIER: IRange<number>;
|
|
15
16
|
export declare const CURSE_EVENT_LOVED_BY_WILDS_RANDOM_HAPPINESS_AT_END: IRange<number>;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { CurseEvent } from "@wayward/game/game/curse/CurseEvent";
|
|
12
|
-
|
|
12
|
+
import { IRange } from "@wayward/utilities/math/Range";
|
|
13
|
+
export declare const CURSE_EVENT_LUCKY_LUCK_MULTIPLIER: IRange<number>;
|
|
13
14
|
declare const _default: CurseEvent;
|
|
14
15
|
export default _default;
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { CurseEvent } from "@wayward/game/game/curse/CurseEvent";
|
|
12
|
+
import { IRange } from "@wayward/utilities/math/Range";
|
|
12
13
|
export declare const CURSE_EVENT_NEW_PLAMTS_CHANCE_GRADIENT: number[];
|
|
14
|
+
export declare const CURSE_EVENT_NEW_PLAMTS_CURSE_MULTIPLIER: IRange<number>;
|
|
13
15
|
export declare const CURSE_EVENT_NEW_PLAMTS_DRYAD_CHANCE_GRADIENT: number[];
|
|
14
16
|
declare const _default: CurseEvent;
|
|
15
17
|
export default _default;
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { CurseEvent } from "@wayward/game/game/curse/CurseEvent";
|
|
12
|
+
import { IRange } from "@wayward/utilities/math/Range";
|
|
12
13
|
export declare const CURSE_EVENT_PLAMTS_DEATH_CHANCE_GRADIENT: number[];
|
|
14
|
+
export declare const CURSE_EVENT_PLAMTS_DEATH_CURSE_MULTIPLIER: IRange<number>;
|
|
13
15
|
export declare const CURSE_EVENT_PLAMTS_DEATH_DRYAD_CHANCE_GRADIENT: number[];
|
|
14
16
|
declare const _default: CurseEvent;
|
|
15
17
|
export default _default;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { CurseEvent } from "@wayward/game/game/curse/CurseEvent";
|
|
12
|
-
|
|
12
|
+
import { IRange } from "@wayward/utilities/math/Range";
|
|
13
|
+
export declare const CURSE_EVENT_UNLUCKY_LUCK_MULTIPLIER: IRange<number>;
|
|
13
14
|
declare const _default: CurseEvent;
|
|
14
15
|
export default _default;
|
|
@@ -37,6 +37,7 @@ import type { RenderSource, UpdateRenderFlag } from "@wayward/game/renderer/IRen
|
|
|
37
37
|
import type { Renderer } from "@wayward/game/renderer/Renderer";
|
|
38
38
|
import type { INotificationLocation, ItemNotifierType, MarkerDescription, StatNotificationType } from "@wayward/game/renderer/notifier/INotifier";
|
|
39
39
|
import type { MarkerType } from "@wayward/game/renderer/notifier/INotifier";
|
|
40
|
+
import Debug from "@wayward/game/utilities/dev/Debug";
|
|
40
41
|
import type { IVector3 } from "@wayward/game/utilities/math/IVector";
|
|
41
42
|
import type { IVector4 } from "@wayward/game/utilities/math/Vector4";
|
|
42
43
|
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
|
@@ -82,8 +83,7 @@ export default abstract class Entity<DescriptionType = unknown, TypeType extends
|
|
|
82
83
|
*/
|
|
83
84
|
addReferenceId(): void;
|
|
84
85
|
abstract getName(): Translation;
|
|
85
|
-
|
|
86
|
-
protected get debug(): any;
|
|
86
|
+
get debug(): Debug.JIT<[]>;
|
|
87
87
|
/**
|
|
88
88
|
* Called when filling out the entities description for the first time
|
|
89
89
|
*/
|
|
@@ -25,6 +25,7 @@ import type { Direction } from "@wayward/game/utilities/math/Direction";
|
|
|
25
25
|
import type { IVector2, IVector3 } from "@wayward/game/utilities/math/IVector";
|
|
26
26
|
import Vector2 from "@wayward/game/utilities/math/Vector2";
|
|
27
27
|
import type { IEventEmitter } from "@wayward/utilities/event/EventEmitter";
|
|
28
|
+
import type { IRange } from "@wayward/utilities/math/Range";
|
|
28
29
|
export interface IEntityMovableEvents extends IEntityEvents {
|
|
29
30
|
/**
|
|
30
31
|
* Called before moving.
|
|
@@ -183,4 +184,5 @@ export default abstract class EntityMovable<DescriptionType = unknown, TypeType
|
|
|
183
184
|
getWanderNewDirectionChance?(defaultChance: number): number | undefined;
|
|
184
185
|
getWanderHomePoint?(): IVector2 | undefined;
|
|
185
186
|
getWanderHomeRadius?(): number | undefined;
|
|
187
|
+
getWanderHomePriority?(): IRange | undefined;
|
|
186
188
|
}
|
|
@@ -63,6 +63,7 @@ import type { FieldOfView } from "@wayward/game/renderer/fieldOfView/FieldOfView
|
|
|
63
63
|
import { CanASeeBType } from "@wayward/game/renderer/fieldOfView/IFieldOfView";
|
|
64
64
|
import type { SortDirection } from "@wayward/game/save/ISaveManager";
|
|
65
65
|
import type { IOptions } from "@wayward/game/save/data/ISaveDataGlobal";
|
|
66
|
+
import Debug from "@wayward/game/utilities/dev/Debug";
|
|
66
67
|
import { Direction } from "@wayward/game/utilities/math/Direction";
|
|
67
68
|
import type { IVector2, IVector3 } from "@wayward/game/utilities/math/IVector";
|
|
68
69
|
import Vector2 from "@wayward/game/utilities/math/Vector2";
|
|
@@ -192,7 +193,7 @@ export default abstract class Human<DescriptionType = unknown, TypeType extends
|
|
|
192
193
|
* Luck is a multiplier applied to some random chance calculations.
|
|
193
194
|
*/
|
|
194
195
|
get luck(): number;
|
|
195
|
-
|
|
196
|
+
get debug(): Debug.JIT<[]>;
|
|
196
197
|
updateDirection(tile: Tile | Direction.Cardinal, updateVehicleDirection?: boolean): Direction.Cardinal;
|
|
197
198
|
protected onMovementCompleted(movingData: IMovingData): void;
|
|
198
199
|
moveTowardsIsland(direction: Direction.Cardinal | Direction.None, options?: Partial<IMoveToIslandOptions>): Promise<void>;
|
|
@@ -9,12 +9,14 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type { IHasImagePath } from "@wayward/game/game/IObject";
|
|
12
|
+
import type { DeityReal } from "@wayward/game/game/deity/Deity";
|
|
12
13
|
import type Doodad from "@wayward/game/game/doodad/Doodad";
|
|
13
14
|
import type EntityWithStats from "@wayward/game/game/entity/EntityWithStats";
|
|
14
15
|
import type Human from "@wayward/game/game/entity/Human";
|
|
15
16
|
import type { AttackType, DamageType } from "@wayward/game/game/entity/IEntity";
|
|
16
17
|
import type { Stat } from "@wayward/game/game/entity/IStats";
|
|
17
18
|
import type { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
19
|
+
import type IActionContext from "@wayward/game/game/entity/action/IActionContext";
|
|
18
20
|
import type { CreatureType, IDamageInfo } from "@wayward/game/game/entity/creature/ICreature";
|
|
19
21
|
import type NPC from "@wayward/game/game/entity/npc/NPC";
|
|
20
22
|
import type { IMovementIntent, WalkTo, WeightStatus } from "@wayward/game/game/entity/player/IPlayer";
|
|
@@ -26,6 +28,7 @@ import type Island from "@wayward/game/game/island/Island";
|
|
|
26
28
|
import type { IContainer } from "@wayward/game/game/item/IItem";
|
|
27
29
|
import { ItemType, ItemTypeGroup, RecipeLevel } from "@wayward/game/game/item/IItem";
|
|
28
30
|
import type Item from "@wayward/game/game/item/Item";
|
|
31
|
+
import type Runekeeper from "@wayward/game/game/milestones/milestone/Runekeeper";
|
|
29
32
|
import { TempType } from "@wayward/game/game/temperature/ITemperature";
|
|
30
33
|
import type Tile from "@wayward/game/game/tile/Tile";
|
|
31
34
|
import Message from "@wayward/game/language/dictionary/Message";
|
|
@@ -308,6 +311,14 @@ export interface IHumanEvents extends Events<EntityWithStats>, ISkillEvents {
|
|
|
308
311
|
* @param tile The tile to get the movement penalty of
|
|
309
312
|
*/
|
|
310
313
|
getTilePenalty(penalty: number, tile: Tile): number;
|
|
314
|
+
/**
|
|
315
|
+
* Allows modifying the curse value. This should only be used in debug tools or similar mods — the curse stat tooltip will be incorrect!
|
|
316
|
+
*/
|
|
317
|
+
getCurse(curse: number): number;
|
|
318
|
+
/**
|
|
319
|
+
* Allows modifying a rune chance roll.
|
|
320
|
+
*/
|
|
321
|
+
getRuneChance(chance: number, deity: ArrayOr<DeityReal>, domain: Runekeeper.DomainData, context: IActionContext): number;
|
|
311
322
|
}
|
|
312
323
|
export interface IHairstyleDescription extends IModdable, IHasImagePath {
|
|
313
324
|
name: string;
|
|
@@ -18,6 +18,8 @@ import Translation from "@wayward/game/language/Translation";
|
|
|
18
18
|
interface IActionContext {
|
|
19
19
|
action: ActionType;
|
|
20
20
|
executorReference?: Reference;
|
|
21
|
+
toolReference?: Reference;
|
|
22
|
+
targetReference?: Reference;
|
|
21
23
|
tool?: ISerializedTranslation;
|
|
22
24
|
target?: ISerializedTranslation;
|
|
23
25
|
details?: Record<string, TranslationArg>;
|
|
@@ -26,6 +26,7 @@ import type Translation from "@wayward/game/language/Translation";
|
|
|
26
26
|
import Message from "@wayward/game/language/dictionary/Message";
|
|
27
27
|
import type { HighlightSelector } from "@wayward/game/ui/util/IHighlight";
|
|
28
28
|
import Observer from "@wayward/game/utilities/Observer";
|
|
29
|
+
import Debug from "@wayward/game/utilities/dev/Debug";
|
|
29
30
|
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
|
30
31
|
export interface IUsableActionResolveUsingOptions {
|
|
31
32
|
/** Whether to skip filling in the `fromTile` and `targetTile` properties. Defaults to `true` */
|
|
@@ -66,8 +67,7 @@ declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsa
|
|
|
66
67
|
private _disposed;
|
|
67
68
|
get disposed(): boolean;
|
|
68
69
|
constructor(requirements: REQUIREMENTS, definition: DEFINITION);
|
|
69
|
-
|
|
70
|
-
protected get debug(): any;
|
|
70
|
+
get debug(): Debug.JIT<[]>;
|
|
71
71
|
addUser(user: UsableActionRegistrar): this;
|
|
72
72
|
removeUser(user: UsableActionRegistrar): this;
|
|
73
73
|
is(id?: ActionId): boolean;
|
|
@@ -87,9 +87,9 @@ export declare enum AiMaskOrder {
|
|
|
87
87
|
IfTamed = 6,
|
|
88
88
|
Hidden = 7,
|
|
89
89
|
Frenzied = 8,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
NeutralDueToEvent = 9,
|
|
91
|
+
HostileDueToEvent = 10,
|
|
92
|
+
Pacified = 11,
|
|
93
93
|
WaitingForNoPlayerAdjacent = 12,
|
|
94
94
|
Angered = 13,
|
|
95
95
|
RecentlyAlerted = 14,
|
|
@@ -42,6 +42,7 @@ import { Direction } from "@wayward/game/utilities/math/Direction";
|
|
|
42
42
|
import type { IVector2, IVector3 } from "@wayward/game/utilities/math/IVector";
|
|
43
43
|
import Vector2 from "@wayward/game/utilities/math/Vector2";
|
|
44
44
|
import type { IEventEmitter } from "@wayward/utilities/event/EventEmitter";
|
|
45
|
+
import { IRange } from "@wayward/utilities/math/Range";
|
|
45
46
|
export default class Creature extends EntityWithStats<ICreatureDescription, CreatureType, ReferenceType.Creature, CreatureTag> implements IUnserializedCallback, IObject<CreatureType> {
|
|
46
47
|
static is(value: any): value is Creature;
|
|
47
48
|
get entityType(): EntityType.Creature;
|
|
@@ -109,7 +110,7 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
|
|
|
109
110
|
load(): void;
|
|
110
111
|
checkForBurn(moveType?: MoveType): boolean;
|
|
111
112
|
private setOwner;
|
|
112
|
-
tame(human: Human, bonusTime?: number): boolean;
|
|
113
|
+
tame(human: Human, bonusTime?: number, wasByPlayerAction?: boolean): boolean;
|
|
113
114
|
/**
|
|
114
115
|
* Increases the creature's maximum health in the event of offering/re-taming and petting (to a lesser extent)
|
|
115
116
|
*/
|
|
@@ -235,6 +236,7 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
|
|
|
235
236
|
getWanderNewDirectionChance(defaultChance: number): number | undefined;
|
|
236
237
|
getWanderHomePoint(): IVector2 | undefined;
|
|
237
238
|
getWanderHomeRadius(): number | undefined;
|
|
239
|
+
getWanderHomePriority(): IRange | undefined;
|
|
238
240
|
get asCorpse(): undefined;
|
|
239
241
|
get asCreature(): Creature;
|
|
240
242
|
get asDoodad(): undefined;
|
|
@@ -108,7 +108,8 @@ export declare enum CreatureTypeGroup {
|
|
|
108
108
|
export declare enum CreatureTag {
|
|
109
109
|
None = 0,
|
|
110
110
|
NoAlertIndicator = 1,
|
|
111
|
-
NoRandomDespawn = 2
|
|
111
|
+
NoRandomDespawn = 2,
|
|
112
|
+
MoveWhenOutsideHumanBounds = 3
|
|
112
113
|
}
|
|
113
114
|
export interface ICreatureOld extends Creature {
|
|
114
115
|
hp: number;
|
|
@@ -130,7 +130,6 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
130
130
|
readonly mapSizeSq: number;
|
|
131
131
|
spawnPoint: IVector3;
|
|
132
132
|
private _activated;
|
|
133
|
-
private _loadedReferences;
|
|
134
133
|
private _tiles;
|
|
135
134
|
modifiersCollection?: IslandModifiersCollection;
|
|
136
135
|
details?: IIslandDetails;
|
|
@@ -150,7 +149,6 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
150
149
|
get biome(): IBiomeDescription;
|
|
151
150
|
get isLoaded(): boolean;
|
|
152
151
|
get tiles(): SaferNumberIndexedObject<Tile>;
|
|
153
|
-
get hasLoadedItemReferences(): boolean;
|
|
154
152
|
get isLocalIsland(): boolean;
|
|
155
153
|
/**
|
|
156
154
|
* Check if this island has players on it
|
|
@@ -48,6 +48,7 @@ import type { IVector3 } from "@wayward/game/utilities/math/IVector";
|
|
|
48
48
|
import type Vector2 from "@wayward/game/utilities/math/Vector2";
|
|
49
49
|
import type { IRGB } from "@wayward/utilities/Color";
|
|
50
50
|
import type { IRange } from "@wayward/utilities/math/Range";
|
|
51
|
+
import type { MagicalLootType } from "@wayward/game/game/item/MagicalLoot";
|
|
51
52
|
export interface IItemWeightComponent {
|
|
52
53
|
weightFraction?: number;
|
|
53
54
|
type: ItemType;
|
|
@@ -416,6 +417,10 @@ export interface IItemDescription extends IObjectDescription, IModdable, ITemper
|
|
|
416
417
|
* If set to true, this item will be able to have all magical properties regardless of the other properties it has.
|
|
417
418
|
*/
|
|
418
419
|
canHaveAllMagicalProperties?: boolean;
|
|
420
|
+
/**
|
|
421
|
+
* Default magical loot type for this item. Used for natural spawned magical motes
|
|
422
|
+
*/
|
|
423
|
+
defaultMagicalLootType?: MagicalLootType;
|
|
419
424
|
canAlter?: false;
|
|
420
425
|
canTransmogrify?: false;
|
|
421
426
|
canUpgrade?: false;
|
|
@@ -725,9 +730,10 @@ export interface IMagicalPropertyInfo {
|
|
|
725
730
|
*/
|
|
726
731
|
max: number;
|
|
727
732
|
/**
|
|
728
|
-
*
|
|
733
|
+
* The precision for this magical property. Magical property values are rounded up to this many decimal places.
|
|
734
|
+
* Defaults to 0 (integers).
|
|
729
735
|
*/
|
|
730
|
-
|
|
736
|
+
precision?: number;
|
|
731
737
|
/**
|
|
732
738
|
* Generates a random starting value for this magical property.
|
|
733
739
|
*/
|
|
@@ -50,6 +50,7 @@ import { Article } from "@wayward/game/language/ITranslation";
|
|
|
50
50
|
import type TranslationImpl from "@wayward/game/language/impl/TranslationImpl";
|
|
51
51
|
import type { SortDirection } from "@wayward/game/save/ISaveManager";
|
|
52
52
|
import type { IUnserializedCallback } from "@wayward/game/save/serializer/ISerializer";
|
|
53
|
+
import Debug from "@wayward/game/utilities/dev/Debug";
|
|
53
54
|
import type { Direction } from "@wayward/game/utilities/math/Direction";
|
|
54
55
|
import type { IVector3 } from "@wayward/game/utilities/math/IVector";
|
|
55
56
|
import type { IEventEmitter } from "@wayward/utilities/event/EventEmitter";
|
|
@@ -210,7 +211,7 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
|
|
|
210
211
|
* - `item.getName(undefined, 3)` // "stone axes"
|
|
211
212
|
*/
|
|
212
213
|
getName(article?: Article, options?: Partial<IItemGetNameOptions>): TranslationImpl;
|
|
213
|
-
|
|
214
|
+
get debug(): Debug.JIT<[overrideToStringTag?: string]>;
|
|
214
215
|
protected get typeEnum(): typeof ItemType;
|
|
215
216
|
protected getDescription(): IItemDescription | undefined;
|
|
216
217
|
get isTransient(): boolean;
|
|
@@ -256,6 +257,9 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
|
|
|
256
257
|
*/
|
|
257
258
|
verifyAndFixItem(): void;
|
|
258
259
|
protected pipeMagicalPropertyManagerEvents(magic: MagicalPropertyManager): void;
|
|
260
|
+
protected onMagicSet(type: MagicalPropertyType, subType?: MagicalSubPropertySubTypes, value?: number, curse?: true): void;
|
|
261
|
+
protected onMagicRemove(type: MagicalPropertyType, subType?: MagicalSubPropertySubTypes): void;
|
|
262
|
+
protected onMagicClear(): void;
|
|
259
263
|
verifyAndFixMagic(): void;
|
|
260
264
|
/**
|
|
261
265
|
* @param source A string representing the reason for this damage. Used for multiplayer debugging. Just put a unique string of characters here
|
|
@@ -319,6 +323,8 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
|
|
|
319
323
|
rerollMagicalProperty(type: MagicalPropertyType, subType?: MagicalSubPropertySubTypes): boolean;
|
|
320
324
|
rerollMagicalPropertyValues(): void;
|
|
321
325
|
initializeMagicalPropertyManager(): MagicalPropertyManager;
|
|
326
|
+
protected updateDurabilityForPersistence(): void;
|
|
327
|
+
protected clampDurabilityToMax(): void;
|
|
322
328
|
addMagicalProperty(type: MagicalPropertyType, subType?: MagicalSubPropertySubTypes, valueType?: "min" | "max"): boolean;
|
|
323
329
|
getMagicalPropertyInfo(type: MagicalPropertyType): IMagicalPropertyInfo | undefined;
|
|
324
330
|
acquireNotify(human: Human, context?: ActionContext): void;
|
|
@@ -394,7 +394,7 @@ export default class ItemManager extends EntityManager<Item, IItemRemoveOptions>
|
|
|
394
394
|
* @param filterText The string of text in which to filter for.
|
|
395
395
|
* @param craftingFilter True if we are filtering the crafting dialog.
|
|
396
396
|
*/
|
|
397
|
-
static isFiltered(item: ItemType | Item, filterText: string, craftingFilter?: boolean): boolean;
|
|
397
|
+
static isFiltered(item: ItemType | Item, filterText: string, craftingFilter?: boolean, dismantleFilter?: boolean): boolean;
|
|
398
398
|
/**
|
|
399
399
|
* Returns `true` if the item type or item is filtered out from inventory/crafting/container dialogs.
|
|
400
400
|
* @param item The ItemType or Item to check.
|
|
@@ -52,6 +52,7 @@ export interface IMagicalPropertyDescription {
|
|
|
52
52
|
*/
|
|
53
53
|
disableCurse?: true;
|
|
54
54
|
subTypeEnum?: Record<string, string | number>;
|
|
55
|
+
notBasicEnum?: boolean;
|
|
55
56
|
isValidEnum?(enumValue: number): boolean;
|
|
56
57
|
translateArgs?(...identity: MagicalPropertyIdentity): TranslationArg[];
|
|
57
58
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import type Deity from "@wayward/game/game/deity/Deity";
|
|
12
12
|
import type { DamageType } from "@wayward/game/game/entity/IEntity";
|
|
13
13
|
import type { SkillType } from "../entity/skill/ISkills";
|
|
14
|
-
import
|
|
14
|
+
import { Stat } from "@wayward/game/game/entity/IStats";
|
|
15
15
|
export declare const MAGICAL_PROPERTY_GLOWING_LIGHT_BONUS = 5;
|
|
16
16
|
declare enum MagicalPropertyType {
|
|
17
17
|
/** Increases attack value (for weapons and ammo) */
|
|
@@ -86,11 +86,24 @@ declare enum MagicalPropertyType {
|
|
|
86
86
|
Perpetuity_DecayLossChance = 31
|
|
87
87
|
}
|
|
88
88
|
export default MagicalPropertyType;
|
|
89
|
+
export declare enum MagicalPropertyStat {
|
|
90
|
+
Health = -10,
|
|
91
|
+
Stamina = -9,
|
|
92
|
+
Metabolism = -8
|
|
93
|
+
}
|
|
94
|
+
export declare const magicalPropertyStatMap: {
|
|
95
|
+
[-8]: Stat.Metabolism;
|
|
96
|
+
[-10]: Stat.Health;
|
|
97
|
+
[-9]: Stat.Stamina;
|
|
98
|
+
0: MagicalPropertyStat.Health;
|
|
99
|
+
1: MagicalPropertyStat.Stamina;
|
|
100
|
+
5: MagicalPropertyStat.Metabolism;
|
|
101
|
+
};
|
|
89
102
|
export interface MagicalPropertyTypeSubTypeMap {
|
|
90
|
-
[MagicalPropertyType.Stat]:
|
|
103
|
+
[MagicalPropertyType.Stat]: MagicalPropertyStat;
|
|
91
104
|
[MagicalPropertyType.Skill]: SkillType;
|
|
92
105
|
[MagicalPropertyType.Fanaticism_Deity]: Deity;
|
|
93
106
|
[MagicalPropertyType.Encircling_DoodadSkill]: SkillType;
|
|
94
107
|
[MagicalPropertyType.ElementalDamage]: DamageType;
|
|
95
|
-
[MagicalPropertyType.StatPotency_EquipmentImproveConsumableStats]:
|
|
108
|
+
[MagicalPropertyType.StatPotency_EquipmentImproveConsumableStats]: MagicalPropertyStat;
|
|
96
109
|
}
|
|
@@ -14,6 +14,7 @@ import type { CreatureType } from "@wayward/game/game/entity/creature/ICreature"
|
|
|
14
14
|
import type { SkillType } from "../../entity/skill/ISkills";
|
|
15
15
|
import type { NPCType } from "@wayward/game/game/entity/npc/INPCs";
|
|
16
16
|
import type { ItemType } from "@wayward/game/game/item/IItem";
|
|
17
|
+
import type { CurseEventType } from "@wayward/game/game/curse/ICurse";
|
|
17
18
|
declare namespace Runekeeper {
|
|
18
19
|
enum Domain {
|
|
19
20
|
Action = 0,
|
|
@@ -24,12 +25,13 @@ declare namespace Runekeeper {
|
|
|
24
25
|
Event = 5,
|
|
25
26
|
Craft = 6,
|
|
26
27
|
Disassemble = 7,
|
|
27
|
-
Dismantle = 8
|
|
28
|
+
Dismantle = 8,
|
|
29
|
+
CurseEvent = 9
|
|
28
30
|
}
|
|
29
31
|
type DomainName = Lowercase<keyof typeof Domain>;
|
|
30
|
-
const DOMAINS: ("action" | "event" | "
|
|
32
|
+
const DOMAINS: ("action" | "event" | "craft" | "curseevent" | "skill" | "disassemble" | "dismantle" | "killcreature" | "tamecreature" | "killnpc")[];
|
|
31
33
|
type DomainData = `${DomainName}:${number}`;
|
|
32
|
-
function domainName(domain: Domain): DomainName;
|
|
34
|
+
function domainName(domain: Domain | DomainData): DomainName;
|
|
33
35
|
function isDiscovered(domain: DomainData): boolean;
|
|
34
36
|
function action(type: ActionType): DomainData;
|
|
35
37
|
function skill(type: SkillType): DomainData;
|
|
@@ -39,6 +41,7 @@ declare namespace Runekeeper {
|
|
|
39
41
|
function killCreature(type: CreatureType): DomainData;
|
|
40
42
|
function tameCreature(type: CreatureType): DomainData;
|
|
41
43
|
function killNPC(type: NPCType): DomainData;
|
|
44
|
+
function curseEvent(type: CurseEventType): DomainData;
|
|
42
45
|
enum Event {
|
|
43
46
|
FireSpread = 0,
|
|
44
47
|
KillAberrant = 1,
|
|
@@ -37,6 +37,7 @@ import type { IRendererOrigin } from "@wayward/game/renderer/context/RendererOri
|
|
|
37
37
|
import { FieldOfView } from "@wayward/game/renderer/fieldOfView/FieldOfView";
|
|
38
38
|
import type { IFieldOfViewOrigin } from "@wayward/game/renderer/fieldOfView/IFieldOfView";
|
|
39
39
|
import { CanASeeBType } from "@wayward/game/renderer/fieldOfView/IFieldOfView";
|
|
40
|
+
import Debug from "@wayward/game/utilities/dev/Debug";
|
|
40
41
|
import { Direction } from "@wayward/game/utilities/math/Direction";
|
|
41
42
|
import type { IVector2, IVector3 } from "@wayward/game/utilities/math/IVector";
|
|
42
43
|
import { DistanceType } from "@wayward/game/utilities/math/Vector2";
|
|
@@ -137,8 +138,7 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
|
|
|
137
138
|
constructor(island: Island, x: number, y: number, z: number, id: number, rendererData: number, quality: Quality, isFake?: true);
|
|
138
139
|
get point(): IVector3;
|
|
139
140
|
get description(): ITerrainDescription | undefined;
|
|
140
|
-
|
|
141
|
-
protected get debug(): any;
|
|
141
|
+
get debug(): Debug.JIT<[]>;
|
|
142
142
|
toString(): string;
|
|
143
143
|
getName(layerIndex?: number, article?: Article, options?: ITileGetNameOptions): Translation;
|
|
144
144
|
get type(): TerrainType;
|