@wayward/types 2.15.0-beta.dev.20251005.1 → 2.15.0-beta.dev.20251006.1
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/game/curse/Curse.d.ts +10 -8
- package/definitions/game/game/curse/CurseEvent.d.ts +36 -5
- package/definitions/game/game/curse/ICurse.d.ts +8 -0
- package/definitions/game/game/curse/event/CurseEventCraftingInspiration.d.ts +13 -0
- package/definitions/game/game/curse/event/CurseEventLucky.d.ts +13 -0
- package/definitions/game/game/curse/event/CurseEventShadows.d.ts +13 -0
- package/definitions/game/game/curse/event/CurseEventUnlucky.d.ts +13 -0
- package/definitions/game/game/entity/Human.d.ts +1 -0
- package/definitions/game/game/entity/action/actions/Invoke.d.ts +4 -0
- package/definitions/game/game/item/Items.d.ts +9 -1
- package/definitions/game/game/options/IGameOptions.d.ts +6 -0
- package/definitions/game/language/dictionary/Message.d.ts +793 -792
- package/definitions/utilities/math/Range.d.ts +8 -0
- package/definitions/utilities/random/Random.d.ts +8 -1
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ import type Human from "@wayward/game/game/entity/Human";
|
|
|
15
15
|
import { SkillType } from "@wayward/game/game/entity/IHuman";
|
|
16
16
|
import type Island from "@wayward/game/game/island/Island";
|
|
17
17
|
import type { IVector2 } from "@wayward/game/utilities/math/IVector";
|
|
18
|
-
import { IRange } from "@wayward/utilities/math/Range";
|
|
18
|
+
import { IRange, IRangeRange } from "@wayward/utilities/math/Range";
|
|
19
19
|
export declare const CURSE_WEIGHTS: PartialRecord<CurseComponent, number>;
|
|
20
20
|
export declare const CURSE_ATTACK_MAX = 50;
|
|
21
21
|
export declare const CURSE_DEFENSE_MAX = 100;
|
|
@@ -55,15 +55,13 @@ export declare const CURSE_EVENTS_MAELSTROM_SPEED = 1;
|
|
|
55
55
|
* Additional opportunities before the top opportunity always use the max chance.
|
|
56
56
|
*/
|
|
57
57
|
export declare const CURSE_EVENTS_CHANCE: IRange;
|
|
58
|
-
export declare const
|
|
58
|
+
export declare const CURSE_EVENTS_DEFAULT_RADIUS = 25;
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
61
|
-
* Interpolates between the minimum and maximum
|
|
60
|
+
* An IRangeRange for randomly selecting the cooldown time between curse event nights.
|
|
61
|
+
* Interpolates between the minimum and maximum ranges based on the player's curse.
|
|
62
62
|
*/
|
|
63
|
-
export declare const CURSE_EVENTS_COOLDOWN_RANGE:
|
|
64
|
-
|
|
65
|
-
maximum: IRange;
|
|
66
|
-
};
|
|
63
|
+
export declare const CURSE_EVENTS_COOLDOWN_RANGE: IRangeRange;
|
|
64
|
+
export declare const CURSE_EVENTS_FIRST_NIGHT = 3;
|
|
67
65
|
declare namespace Curse {
|
|
68
66
|
interface Helper {
|
|
69
67
|
context: CurseEventContext;
|
|
@@ -71,11 +69,13 @@ declare namespace Curse {
|
|
|
71
69
|
definition: CurseEvent;
|
|
72
70
|
}
|
|
73
71
|
function get(island?: Island, type?: CurseEventType): Helper | undefined;
|
|
72
|
+
function clearCooldown(island: Island): void;
|
|
74
73
|
function tickCurse(island: Island, humans: Human[]): void;
|
|
75
74
|
function reload(island: Island): void;
|
|
76
75
|
function spawnCurseEvents(island: Island, humans: Human[]): void;
|
|
77
76
|
function attemptCurseEventSpawn(category: CurseCategory, human: Human, curse: number, humans: Human[], events: CurseEventInstance[]): CurseEventInstance | undefined;
|
|
78
77
|
function attemptSpecificCurseEventSpawn(human: Human, type: CurseEventType, humans: Human[], curse?: number): CurseEventInstance | undefined;
|
|
78
|
+
function unload(island: Island): void;
|
|
79
79
|
function cleanup(island: Island, humans?: Human[]): void;
|
|
80
80
|
function createCurseEventContext(instance: CurseEventInstance, island: Island, humans?: Human[], cursebearer?: Human): CurseEventContext;
|
|
81
81
|
}
|
|
@@ -92,7 +92,9 @@ interface CurseEventInstance {
|
|
|
92
92
|
type: CurseEventType;
|
|
93
93
|
display: CurseEventDisplayMode;
|
|
94
94
|
cursebearerIdentifier: string;
|
|
95
|
+
curse: number;
|
|
95
96
|
point: IVector2;
|
|
97
|
+
creatures?: number[];
|
|
96
98
|
subscribers?: string[];
|
|
97
99
|
scriptProcesses?: ScriptProcessState[];
|
|
98
100
|
[SYMBOL_CURSE_EVENT_SUBSCRIBER_INSTANCES]?: Record<string, CurseEventSubscriber>;
|
|
@@ -9,21 +9,40 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type { BiomeType } from "@wayward/game/game/biome/IBiome";
|
|
12
|
-
import type { CurseGroup, CurseEventDisplayMode, CurseEventType, CurseCategory } from "@wayward/game/game/curse/ICurse";
|
|
12
|
+
import type { CurseGroup, CurseEventDisplayMode, CurseEventType, CurseCategory, CursePosition } from "@wayward/game/game/curse/ICurse";
|
|
13
13
|
import type Human from "@wayward/game/game/entity/Human";
|
|
14
14
|
import type Island from "@wayward/game/game/island/Island";
|
|
15
15
|
import type { IGameOptionsPartial } from "@wayward/game/game/options/IGameOptions";
|
|
16
16
|
import type { TimeString } from "@wayward/game/game/time/ITimeManager";
|
|
17
17
|
import type { IVector2 } from "@wayward/game/utilities/math/IVector";
|
|
18
|
-
import
|
|
18
|
+
import { IRange } from "@wayward/utilities/math/Range";
|
|
19
|
+
import type Tile from "@wayward/game/game/tile/Tile";
|
|
20
|
+
import type Creature from "@wayward/game/game/entity/creature/Creature";
|
|
21
|
+
import type { CreatureType } from "@wayward/game/game/entity/creature/ICreature";
|
|
19
22
|
/** The API that curse events have access to */
|
|
20
23
|
export interface CurseEventContext {
|
|
21
24
|
readonly island: Island;
|
|
25
|
+
/** The epicenter of the curse, based on `CurseEvent.position` */
|
|
22
26
|
readonly point: IVector2;
|
|
23
27
|
/** A number 0-1 of how far through the night it currently is */
|
|
24
28
|
readonly fractionalTime: number;
|
|
29
|
+
/** The human that happened to get the event rolled on them */
|
|
25
30
|
readonly cursebearer: Human | undefined;
|
|
31
|
+
/** The cursebearer's curse at the time the event began */
|
|
32
|
+
readonly curse: number;
|
|
33
|
+
/** The creatures that the event has spawned */
|
|
34
|
+
readonly creatures: Creature[];
|
|
35
|
+
/** Whether the cursebearer is asleep */
|
|
36
|
+
readonly sleeping: boolean;
|
|
37
|
+
/** Get the players nearby the curse. This is based on `CurseEvent.position` and `CurseEvent.radius` */
|
|
26
38
|
getNearbyPlayers(): Human[];
|
|
39
|
+
/** Get a random tile within the curse event's radius. This is based on `CurseEvent.position` and `CurseEvent.radius` */
|
|
40
|
+
getRandomTile(radius?: number): Tile | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Spawn a creature at the given tile using the curse event spawning rules.
|
|
43
|
+
* @param evenWhenAsleep Disable the default functionality of preventing spawns if the cursebearer is asleep
|
|
44
|
+
*/
|
|
45
|
+
spawnCreature(type?: CreatureType, tile?: Tile, evenWhenAsleep?: true): Creature | undefined;
|
|
27
46
|
/**
|
|
28
47
|
* Inject a custom curse event subscriber class into the game.
|
|
29
48
|
* This class *must* be included in `CurseEvent.subscribers`.
|
|
@@ -37,6 +56,17 @@ export interface CurseEventContext {
|
|
|
37
56
|
export interface CurseEvent {
|
|
38
57
|
group: CurseGroup;
|
|
39
58
|
category: CurseCategory;
|
|
59
|
+
/**
|
|
60
|
+
* The chance that this curse event will spawn compared to other events.
|
|
61
|
+
* All curse events default to a weight of 1, so setting this to 0.5 would make it half as likely as any other event.
|
|
62
|
+
*/
|
|
63
|
+
weight?: number;
|
|
64
|
+
position?: CursePosition;
|
|
65
|
+
/**
|
|
66
|
+
* Controls the radius of the curse event. Defaults to the value of `CURSE_EVENTS_DEFAULT_RADIUS` (at time of writing, 25.)
|
|
67
|
+
* This is used for the `CurseEventContext.getRandomTile` and `CurseEventContext.getNearbyPlayers` methods.
|
|
68
|
+
*/
|
|
69
|
+
radius?: number;
|
|
40
70
|
/** A number 0-1 representing the curse level that the randomly selected player must have in order for this curse event to be chosen */
|
|
41
71
|
requiredCurseLevel?: number;
|
|
42
72
|
requiredBiomes?: {
|
|
@@ -50,7 +80,7 @@ export interface CurseEvent {
|
|
|
50
80
|
subscribers?: Array<Class<CurseEventSubscriber>>;
|
|
51
81
|
onStart?(context: CurseEventContext): void;
|
|
52
82
|
onEnd?(context: CurseEventContext): void;
|
|
53
|
-
script?: CurseEventScript;
|
|
83
|
+
script?: CurseEventScript | CurseEventScript.Repeat | CurseEventScript.Simultaneously;
|
|
54
84
|
}
|
|
55
85
|
export declare function CurseEvent(event: CurseEvent): CurseEvent;
|
|
56
86
|
export type CurseEventScript = CurseEventScript.Step[];
|
|
@@ -61,9 +91,9 @@ export declare namespace CurseEventScript {
|
|
|
61
91
|
}
|
|
62
92
|
export interface EndAfter extends CurseEventScriptNodeBase {
|
|
63
93
|
type: "end after";
|
|
64
|
-
ticks: number | IRange
|
|
94
|
+
ticks: SupplierOr<number | IRange, [CurseEventContext]>;
|
|
65
95
|
}
|
|
66
|
-
export function EndAfter(ticks: number | IRange): EndAfter;
|
|
96
|
+
export function EndAfter(ticks: SupplierOr<number | IRange, [CurseEventContext]>): EndAfter;
|
|
67
97
|
export interface EndAt extends CurseEventScriptNodeBase {
|
|
68
98
|
type: "end at";
|
|
69
99
|
time: TimeString;
|
|
@@ -79,6 +109,7 @@ export declare namespace CurseEventScript {
|
|
|
79
109
|
type: "wait";
|
|
80
110
|
end: EndCondition;
|
|
81
111
|
}
|
|
112
|
+
export function Wait(ticks: SupplierOr<number | IRange, [CurseEventContext]>): Wait;
|
|
82
113
|
export function Wait(end: EndCondition): Wait;
|
|
83
114
|
export interface Action extends CurseEventScriptNodeBase {
|
|
84
115
|
type: "action";
|
|
@@ -53,6 +53,14 @@ export declare enum CurseCategory {
|
|
|
53
53
|
*/
|
|
54
54
|
Dependent = 2
|
|
55
55
|
}
|
|
56
|
+
export declare enum CursePosition {
|
|
57
|
+
/** The default value for a curse event. `position` returns the island's center. */
|
|
58
|
+
None = 0,
|
|
59
|
+
/** The curse event spawns in a random location near the cursebearer. */
|
|
60
|
+
Random = 1,
|
|
61
|
+
/** The curse event's position is always directly on the cursebearer. */
|
|
62
|
+
Follow = 2
|
|
63
|
+
}
|
|
56
64
|
export declare enum CurseComponent {
|
|
57
65
|
Skill = 0,
|
|
58
66
|
HighestAttack = 1,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2011-2025 Unlok
|
|
3
|
+
* https://www.unlok.ca
|
|
4
|
+
*
|
|
5
|
+
* Credits & Thanks:
|
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
|
7
|
+
*
|
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
|
10
|
+
*/
|
|
11
|
+
import { CurseEvent } from "@wayward/game/game/curse/CurseEvent";
|
|
12
|
+
declare const _default: CurseEvent;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2011-2025 Unlok
|
|
3
|
+
* https://www.unlok.ca
|
|
4
|
+
*
|
|
5
|
+
* Credits & Thanks:
|
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
|
7
|
+
*
|
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
|
10
|
+
*/
|
|
11
|
+
import { CurseEvent } from "@wayward/game/game/curse/CurseEvent";
|
|
12
|
+
declare const _default: CurseEvent;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2011-2025 Unlok
|
|
3
|
+
* https://www.unlok.ca
|
|
4
|
+
*
|
|
5
|
+
* Credits & Thanks:
|
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
|
7
|
+
*
|
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
|
10
|
+
*/
|
|
11
|
+
import { CurseEvent } from "@wayward/game/game/curse/CurseEvent";
|
|
12
|
+
declare const _default: CurseEvent;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2011-2025 Unlok
|
|
3
|
+
* https://www.unlok.ca
|
|
4
|
+
*
|
|
5
|
+
* Credits & Thanks:
|
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
|
7
|
+
*
|
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
|
10
|
+
*/
|
|
11
|
+
import { CurseEvent } from "@wayward/game/game/curse/CurseEvent";
|
|
12
|
+
declare const _default: CurseEvent;
|
|
13
|
+
export default _default;
|
|
@@ -256,6 +256,7 @@ export default abstract class Human<DescriptionType = unknown, TypeType extends
|
|
|
256
256
|
getEquippedItem(slot: EquipType, includeDisabled?: true): Item | undefined;
|
|
257
257
|
isOffHandDisabled(): boolean;
|
|
258
258
|
getEquipSlotForItem(item: Item, includeDisabled?: true): EquipType | undefined;
|
|
259
|
+
getFanaticism(deity: Deity): number;
|
|
259
260
|
getCurse(): number;
|
|
260
261
|
canSeePosition(type: CanASeeBType, islandId: IslandId, x: number, y: number, z: number, fieldOfView?: FieldOfView, customRadius?: number): boolean;
|
|
261
262
|
/**
|
|
@@ -8,13 +8,17 @@
|
|
|
8
8
|
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
|
+
import type { DeityReal } from "@wayward/game/game/deity/Deity";
|
|
11
12
|
import { Action } from "@wayward/game/game/entity/action/Action";
|
|
12
13
|
import type { IActionUsable } from "@wayward/game/game/entity/action/IAction";
|
|
13
14
|
import { ActionArgument, ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
14
15
|
import type { IInvokeUse } from "@wayward/game/game/item/IItem";
|
|
15
16
|
import type Item from "@wayward/game/game/item/Item";
|
|
17
|
+
import { Milestone } from "@wayward/game/game/milestones/IMilestone";
|
|
16
18
|
export interface IInvokeUsable extends IActionUsable, IInvokeUse {
|
|
17
19
|
rune: Item;
|
|
18
20
|
}
|
|
21
|
+
export declare const DEITY_INVOKE_MILESTONES: Record<DeityReal, Milestone>;
|
|
22
|
+
export declare const RUNE_USE_CHANCE = 1;
|
|
19
23
|
declare const _default: Action<[ActionArgument.Item], ActionType.Invoke, import("../../player/Player").default, void, IInvokeUsable, [Item]>;
|
|
20
24
|
export default _default;
|
|
@@ -8,4 +8,12 @@
|
|
|
8
8
|
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
import type { QualityNatural } from "@wayward/game/game/IObject";
|
|
12
|
+
import { Quality } from "@wayward/game/game/IObject";
|
|
13
|
+
import { ChaosEffect } from "@wayward/game/game/deity/Chaos";
|
|
14
|
+
import type { IRange } from "@wayward/utilities/math/Range";
|
|
15
|
+
export declare const RUNE_OF_EVIL_SPAWN_COUNT: Record<QualityNatural, IRange>;
|
|
16
|
+
export declare const RUNE_OF_EVIL_MAX_ATTEMPTS = 20;
|
|
17
|
+
export declare const RUNE_OF_GOOD_PACIFY_CHANCE: Record<QualityNatural, number>;
|
|
18
|
+
export declare const RUNE_OF_GOOD_PACIFY_TIME: Record<QualityNatural, IRange>;
|
|
19
|
+
export declare const RUNE_OF_CHAOS_EFFECT_MAP: PartialRecord<Quality, ChaosEffect>;
|
|
@@ -298,6 +298,12 @@ export interface IGameOptionsPlayer {
|
|
|
298
298
|
* TODO: Set to Map<RecipeLevel, number> when we can support maps in milestone modifier overrides?
|
|
299
299
|
*/
|
|
300
300
|
difficultyMultiplier: number;
|
|
301
|
+
/**
|
|
302
|
+
* A multiplier for the chance of magical properties being generated on crafted items.
|
|
303
|
+
*
|
|
304
|
+
* Multiplied with the island's chance for any item being generated with magical properties (which is per-quality.)
|
|
305
|
+
*/
|
|
306
|
+
magicChanceMultiplier: number;
|
|
301
307
|
/**
|
|
302
308
|
* Allow default crafting recipe discovery.
|
|
303
309
|
*/
|