@wayward/types 2.15.0-beta.dev.20251006.1 → 2.15.0-beta.dev.20251007.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.
@@ -9,8 +9,10 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type { ItemType } from "@wayward/game/game/item/IItem";
12
+ import type { TileEventType } from "@wayward/game/game/tile/ITileEvent";
12
13
  export interface ILootItem {
13
- type: ItemType;
14
+ itemType?: ItemType;
15
+ tileEventType?: TileEventType;
14
16
  chance?: number;
15
17
  chanceOutOf?: number;
16
18
  difficulty?: number;
@@ -69,6 +69,9 @@ declare namespace Curse {
69
69
  definition: CurseEvent;
70
70
  }
71
71
  function get(island?: Island, type?: CurseEventType): Helper | undefined;
72
+ function willHaveEventsTonight(island: Island): boolean;
73
+ function canWarnAboutIncomingEvents(island: Island): boolean;
74
+ function getCooldownMultiplier(island: Island, humans?: Human<unknown, number, import("../reference/IReferenceManager").ReferenceType.NPC | import("../reference/IReferenceManager").ReferenceType.Player>[]): number;
72
75
  function clearCooldown(island: Island): void;
73
76
  function tickCurse(island: Island, humans: Human[]): void;
74
77
  function reload(island: Island): void;
@@ -49,6 +49,7 @@ export interface CurseEventContext {
49
49
  */
50
50
  inject<T extends CurseEventSubscriber>(subscriber: Class<T>): void;
51
51
  setDisplay(mode: CurseEventDisplayMode): void;
52
+ discover(forSpecificHuman?: Human): void;
52
53
  uninject(): void;
53
54
  uninject<T extends CurseEventSubscriber>(subscriber: Class<T>): void;
54
55
  toString(): string;
@@ -61,12 +62,7 @@ export interface CurseEvent {
61
62
  * 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
  */
63
64
  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;
65
+ discoveredByDefault?: true;
70
66
  /** A number 0-1 representing the curse level that the randomly selected player must have in order for this curse event to be chosen */
71
67
  requiredCurseLevel?: number;
72
68
  requiredBiomes?: {
@@ -76,6 +72,12 @@ export interface CurseEvent {
76
72
  /** If one event is marked as conflicting with another, they will both have the conflict registered. */
77
73
  conflicts?: CurseEventType[];
78
74
  requiredPredicate?(context: CurseEventContext): boolean;
75
+ position?: CursePosition;
76
+ /**
77
+ * Controls the radius of the curse event. Defaults to the value of `CURSE_EVENTS_DEFAULT_RADIUS` (at time of writing, 25.)
78
+ * This is used for the `CurseEventContext.getRandomTile` and `CurseEventContext.getNearbyPlayers` methods.
79
+ */
80
+ radius?: number;
79
81
  getOptions?(): IGameOptionsPartial;
80
82
  subscribers?: Array<Class<CurseEventSubscriber>>;
81
83
  onStart?(context: CurseEventContext): void;
@@ -250,6 +250,10 @@ export interface IDoodadDescription extends IObjectDescription, IModdable, ICaus
250
250
  * Radius around scarecrow that will attempt to scare away creatures based on `chanceOfScarecrowScare` property in `creatureDescriptions`.
251
251
  */
252
252
  scareRadius?: number;
253
+ /**
254
+ * When the doodad reaches this stage, it will drop the following items with the following chances.
255
+ */
256
+ dropsOnGrowth?: IDropsOnGrowth;
253
257
  }
254
258
  export interface IItemStackRegion {
255
259
  xMin: number;
@@ -294,6 +298,7 @@ export interface IProvidesSkill {
294
298
  skillValue: number;
295
299
  }
296
300
  export type IDoodadParticles = Record<number, IRGB>;
301
+ export type IDropsOnGrowth = PartialRecord<GrowingStage, ILootItem[]>;
297
302
  export type IDoodadLoot = PartialRecord<GrowingStage, ILootItem[]>;
298
303
  export declare enum DoodadType {
299
304
  WoodenDoor = 0,
@@ -16,5 +16,5 @@ export declare enum TitleType {
16
16
  Milestone = 0,
17
17
  Skill = 1
18
18
  }
19
- declare const _default: Action<[[ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<TitleType, "Skill" | "Milestone">], [arg1: ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<Milestone, "Statistician" | "Runekeeper" | "Navigator" | "Abnormalizer" | "Chef" | "Exterminator" | "Crafter" | "Gardener" | "Gatherer" | "Hunter" | "Locksmith" | "ReaperOfSouls" | "Survivor" | "Pitcher" | "Trapsetter" | "TreasureHunter" | "Collector" | "Explorer" | "Grandmaster" | "Prepared" | "Doctor" | "Artificer" | "Returned" | "DragonSlayer" | "Treasurer" | "Pulchritudinous" | "Friendly" | "Malevolent" | "Benevolent" | "Boundless" | "Talented" | "Weathered" | "Seasoned" | "Pacifier" | "Merchant" | "Notekeeper" | "Operator" | "Huntsman" | "Contender" | "Challenger" | "DestroyerOfMagi" | "Helmsman" | "Multitasker" | "Apocryphal" | "Diverse" | "InternalDiscoveredBoats" | "Traitor" | "MasterOfAll" | "Rouseabout" | "Murderer" | "Retailer" | "Masochist" | "Versatile" | "InternalStatDiscovery" | "Dedicated" | "Hounded" | "Serene" | "InternalRuneOrAltarDiscovery" | "Curator" | "Thaumaturgic" | "InternalDeityDiscovery" | "InternalMerchantsDiscovery" | "InternalCurseSystemDiscovery" | "Invoker" | "InternalDeityInvoked" | "InternalInsulationDiscovery" | "Turbulent" | "Afflicted" | "Exsanguinated" | "InternalItemDiscovered">, import("../argument/ActionArgumentEnum").default<SkillType, "None" | "Taming" | "Mining" | "Swimming" | "Chemistry" | "Anatomy" | "Marksmanship" | "Blacksmithing" | "Botany" | "Camping" | "Cartography" | "Claythrowing" | "Cooking" | "Fishing" | "Fletching" | "Glassblowing" | "Leatherworking" | "Lockpicking" | "Lumberjacking" | "Mycology" | "Parrying" | "Stonecrafting" | "Tactics" | "Tailoring" | "Throwing" | "Tinkering" | "Trapping" | "Woodworking" | "Horticulture" | "Bartering" | "Seafaring" | "Thaumaturgy" | "DualWielding" | "Theurgy">]], ActionType.SetTitle, import("../../player/Player").default, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, [(TitleType | undefined)?, (Milestone | SkillType | undefined)?]>;
19
+ declare const _default: Action<[[ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<TitleType, "Skill" | "Milestone">], [arg1: ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<Milestone, "Statistician" | "Runekeeper" | "Cursed" | "Navigator" | "Abnormalizer" | "Chef" | "Exterminator" | "Crafter" | "Gardener" | "Gatherer" | "Hunter" | "Locksmith" | "ReaperOfSouls" | "Survivor" | "Pitcher" | "Trapsetter" | "TreasureHunter" | "Collector" | "Explorer" | "Grandmaster" | "Prepared" | "Doctor" | "Artificer" | "Returned" | "DragonSlayer" | "Treasurer" | "Pulchritudinous" | "Friendly" | "Malevolent" | "Benevolent" | "Boundless" | "Talented" | "Weathered" | "Seasoned" | "Pacifier" | "Merchant" | "Notekeeper" | "Operator" | "Huntsman" | "Contender" | "Challenger" | "DestroyerOfMagi" | "Helmsman" | "Multitasker" | "Apocryphal" | "Diverse" | "InternalDiscoveredBoats" | "Traitor" | "MasterOfAll" | "Rouseabout" | "Murderer" | "Retailer" | "Masochist" | "Versatile" | "InternalStatDiscovery" | "Dedicated" | "Hounded" | "Serene" | "InternalRuneOrAltarDiscovery" | "Curator" | "Thaumaturgic" | "InternalDeityDiscovery" | "InternalMerchantsDiscovery" | "InternalCurseSystemDiscovery" | "Invoker" | "InternalDeityInvoked" | "InternalInsulationDiscovery" | "Turbulent" | "Afflicted" | "Exsanguinated" | "InternalItemDiscovered" | "Cursebreaker">, import("../argument/ActionArgumentEnum").default<SkillType, "None" | "Taming" | "Mining" | "Swimming" | "Chemistry" | "Anatomy" | "Marksmanship" | "Blacksmithing" | "Botany" | "Camping" | "Cartography" | "Claythrowing" | "Cooking" | "Fishing" | "Fletching" | "Glassblowing" | "Leatherworking" | "Lockpicking" | "Lumberjacking" | "Mycology" | "Parrying" | "Stonecrafting" | "Tactics" | "Tailoring" | "Throwing" | "Tinkering" | "Trapping" | "Woodworking" | "Horticulture" | "Bartering" | "Seafaring" | "Thaumaturgy" | "DualWielding" | "Theurgy">]], ActionType.SetTitle, import("../../player/Player").default, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, [(TitleType | undefined)?, (Milestone | SkillType | undefined)?]>;
20
20
  export default _default;
@@ -15,7 +15,7 @@ import { MessageType } from "@wayward/game/game/entity/player/IMessageManager";
15
15
  import type IStatusContext from "@wayward/game/game/entity/status/IStatusContext";
16
16
  import type Status from "@wayward/game/game/entity/status/Status";
17
17
  import type { StatusEffectList } from "@wayward/game/game/entity/status/StatusEffectList";
18
- import type { IIcon } from "@wayward/game/game/inspection/InfoProvider";
18
+ import type { IIcon, InfoProvider } from "@wayward/game/game/inspection/InfoProvider";
19
19
  import type { IGameOptionsStatus } from "@wayward/game/game/options/IGameOptions";
20
20
  import type Dictionary from "@wayward/game/language/Dictionary";
21
21
  import type { StatusTranslation } from "@wayward/game/language/dictionary/Misc";
@@ -33,11 +33,16 @@ export interface IStatusDisplayable {
33
33
  icon?: SupplierOr<IStatusIconDescription | undefined, [IStatusContext]>;
34
34
  getBorderColorOverride?(status?: Status): string | undefined;
35
35
  getCategoryOverride?(status?: Status): IStatusCategoryOverride | undefined;
36
+ getDescriptionContent?(status: Status): IStatusDescriptionContent | undefined;
36
37
  }
37
38
  export interface IStatusCategoryOverride {
38
39
  icon: string | IIcon;
39
40
  translation: Translation;
40
41
  }
42
+ export interface IStatusDescriptionContent {
43
+ primary?: ArrayOr<Translation | InfoProvider | undefined>;
44
+ secondary?: ArrayOr<Translation | InfoProvider | undefined>;
45
+ }
41
46
  export interface IStatusDescription extends IStatusDisplayable {
42
47
  applicability: StatusApplicability;
43
48
  relevantStat?: Stat;
@@ -53,7 +58,13 @@ export interface IStatusDescription extends IStatusDisplayable {
53
58
  /** An optional replacement list of icons to display for this status effect, rather than the single default icon. */
54
59
  getDisplay?(status: Status): IStatusDisplayInstance[] | undefined;
55
60
  getSubtitle?(): Translation | undefined;
56
- interval?: SupplierOr<number | undefined, [IStatusContext]>;
61
+ /**
62
+ * Controls whether this status is considered important, separate from the "threat level" system.
63
+ *
64
+ * Currently, "important" statuses have the same bounce animation that "threats" have.
65
+ */
66
+ important?: true;
67
+ interval?: SupplierOr<number | undefined, [IStatusContext]> | false;
57
68
  effects?: SupplierOr<StatusEffectList | undefined, [IStatusContext, StatusEffectList]>;
58
69
  particles?: SupplierOr<StatusParticle | undefined, [IStatusContext, StatusParticleEvent?]>;
59
70
  /** A list of `StatusRenderer`s that could be returned by a supplier in the `renderer` property */
@@ -27,7 +27,7 @@ declare namespace IStatusContext {
27
27
  function fromStatus(status: Status): IStatusContext;
28
28
  function fromDef(status: StatusType, definition: IStatusDescription, entity?: EntityWithStats): IStatusContext;
29
29
  function withLevel(status: IStatusContext, level: number): IStatusContext;
30
- function getInterval(status: IStatusContext): number;
30
+ function getInterval(status: IStatusContext): number | false;
31
31
  function getOptions(type: StatusType, entity?: EntityWithStats): IGameOptionsStatus;
32
32
  function getEffects(status: IStatusContext): StatusEffectList;
33
33
  }
@@ -78,7 +78,7 @@ export default class Status extends EventEmitter.Host<IStatusEvents> {
78
78
  getTranslation(which?: StatusTranslation, level?: number): TranslationImpl | undefined;
79
79
  refresh(): void;
80
80
  getEffects(): StatusEffectList;
81
- getInterval(): number;
81
+ getInterval(): number | false;
82
82
  /**
83
83
  * Whether the status effect should pass (be removed from the human).
84
84
  */
@@ -78,7 +78,9 @@ export declare enum Milestone {
78
78
  Statistician = 66,
79
79
  Afflicted = 67,
80
80
  Exsanguinated = 68,
81
- InternalItemDiscovered = 69
81
+ InternalItemDiscovered = 69,
82
+ Cursed = 70,
83
+ Cursebreaker = 71
82
84
  }
83
85
  export type ExcludeInternalMilestones<MILESTONE extends Milestone> = PickValueKeys<typeof Milestone, MILESTONE> extends `Internal${string}` ? never : MILESTONE;
84
86
  export declare enum MilestoneVisibility {
@@ -71,14 +71,15 @@ export default class MilestoneDefinition {
71
71
  */
72
72
  inherit(def: MilestoneDefinition): this;
73
73
  visibility: MilestoneVisibility;
74
- visibleThreshold: number | Milestone;
74
+ visibleThreshold: number | Milestone | [Milestone, number];
75
75
  /**
76
76
  * @param visibility Whether the milestone is completely visible, has its name hidden, or has its required amount hidden. Defaults to `Visible`
77
- * @param until Sets the time when the milestone will become `Visible`. This can be either:
77
+ * @param until Sets the time when the milestone will become `Visible`. This can be any of:
78
78
  * - A completion threshold (in a fractional value between 0 and 1)
79
79
  * - A different milestone to complete first
80
+ * - A tuple of a different milestone and a value that must be discovered in that milestone
80
81
  */
81
- setVisibility(visibility: MilestoneVisibility, until?: number): this;
82
+ setVisibility(visibility: MilestoneVisibility, until?: number | [Milestone, number]): this;
82
83
  /**
83
84
  * Sets this milestone to be unlockable in all game modes, and not disabled by mods.
84
85
  */
@@ -189,6 +189,10 @@ export interface IGameOptionsPlayer {
189
189
  * Starting curse value, added to the calculated value.
190
190
  */
191
191
  initialCurse: number;
192
+ /**
193
+ * A multiplier for the cooldown of curse events. The multiplier used is the average of all players on the island.
194
+ */
195
+ curseCooldownMultiplier: number;
192
196
  /**
193
197
  * Whether the player should use their globally unlocked recipes in this game.
194
198
  */
@@ -20,5 +20,6 @@ export declare enum MilestoneModifierGroup {
20
20
  Turns = 8,
21
21
  Challenge = 9,
22
22
  Merchants = 10,
23
- Statuses = 11
23
+ Statuses = 11,
24
+ Curse = 12
24
25
  }
@@ -25,6 +25,8 @@ import Collector from "@wayward/game/game/options/modifiers/milestone/modifiers/
25
25
  import Contender from "@wayward/game/game/options/modifiers/milestone/modifiers/Contender";
26
26
  import Crafter from "@wayward/game/game/options/modifiers/milestone/modifiers/Crafter";
27
27
  import Curator from "@wayward/game/game/options/modifiers/milestone/modifiers/Curator";
28
+ import Cursebreaker from "@wayward/game/game/options/modifiers/milestone/modifiers/Cursebreaker";
29
+ import Cursed from "@wayward/game/game/options/modifiers/milestone/modifiers/Cursed";
28
30
  import Dedicated from "@wayward/game/game/options/modifiers/milestone/modifiers/Dedicated";
29
31
  import DestroyerOfMagi from "@wayward/game/game/options/modifiers/milestone/modifiers/DestroyerOfMagi";
30
32
  import Diverse from "@wayward/game/game/options/modifiers/milestone/modifiers/Diverse";
@@ -137,6 +139,8 @@ export declare const milestoneModifiers: {
137
139
  65: typeof Turbulent;
138
140
  50: typeof Versatile;
139
141
  29: typeof Weathered;
142
+ 70: typeof Cursed;
143
+ 71: typeof Cursebreaker;
140
144
  };
141
145
  declare class MilestoneModifiersManager extends GameplayModifiersManager<MilestoneModifier, Milestone, [Human?]> {
142
146
  constructor();
@@ -0,0 +1,17 @@
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 type { IGameOptionsPartial } from "@wayward/game/game/options/IGameOptions";
12
+ import { MilestoneModifierGroup } from "@wayward/game/game/options/modifiers/milestone/IMilestoneModifier";
13
+ import MilestoneModifier from "@wayward/game/game/options/modifiers/milestone/MilestoneModifier";
14
+ export default class Cursebreaker extends MilestoneModifier {
15
+ getGroup(): MilestoneModifierGroup;
16
+ getOptions(): IGameOptionsPartial;
17
+ }
@@ -0,0 +1,17 @@
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 type { IGameOptionsPartial } from "@wayward/game/game/options/IGameOptions";
12
+ import { MilestoneModifierGroup } from "@wayward/game/game/options/modifiers/milestone/IMilestoneModifier";
13
+ import MilestoneModifier from "@wayward/game/game/options/modifiers/milestone/MilestoneModifier";
14
+ export default class Cursed extends MilestoneModifier {
15
+ getGroup(): MilestoneModifierGroup;
16
+ getOptions(): IGameOptionsPartial;
17
+ }
@@ -93,10 +93,10 @@ declare enum Message {
93
93
  ActionInvokeChaosNoEffect = 81,
94
94
  ActionInvokeEvilCreaturesAttracted = 82,
95
95
  ActionInvokeEvilCreaturesNoneSummoned = 83,
96
- ActionInvokeGoodCreaturesPacified = 84,
97
- ActionInvokeGoodCreaturesPacifiedAttacked = 85,
98
- ActionInvokeGoodCreaturesPacifiedNone = 86,
99
- ActionInvokeFanaticismPreservedRune = 87,
96
+ ActionInvokeFanaticismPreservedRune = 84,
97
+ ActionInvokeGoodCreaturesPacified = 85,
98
+ ActionInvokeGoodCreaturesPacifiedAttacked = 86,
99
+ ActionInvokeGoodCreaturesPacifiedNone = 87,
100
100
  ActionJumpCannotJump = 88,
101
101
  ActionMeleeNothingToAttack = 89,
102
102
  ActionMoveItemCannotUseContainerTooFarAway = 90,