@wayward/types 2.15.1-beta.dev.20251028.1 → 2.15.2-beta.dev.20251030.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.
@@ -111,7 +111,7 @@ declare namespace Curse {
111
111
  definition: CurseEvent;
112
112
  }
113
113
  function get(island?: Island, type?: CurseEventType): Helper | undefined;
114
- function all(island: Island): CurseEventContext[];
114
+ function all(island: Island, cursebearer?: Human): CurseEventContext[];
115
115
  function isMysteryForClient(event: CurseEventInstance): boolean;
116
116
  function isMysteryForHuman(event: CurseEventInstance, human: Human): boolean;
117
117
  function getOwnerEvent(island: Island, creature: Creature): CurseEventInstance | undefined;
@@ -120,6 +120,7 @@ declare namespace Curse {
120
120
  function getCooldownMultiplier(island: Island, humans?: Human<unknown, number, ReferenceType.NPC | ReferenceType.Player, unknown>[]): number;
121
121
  function clearCooldown(island: Island): void;
122
122
  function resetCooldown(island: Island): void;
123
+ function updateRuneItemsDisplay(island: Island): void;
123
124
  function tickCurse(island: Island, humans: Human[]): void;
124
125
  function reload(island: Island, isNew?: boolean): void;
125
126
  function spawnCurseEvents(island: Island, humans: Human[]): void;
@@ -72,6 +72,10 @@ export interface CurseEventContext {
72
72
  * Mark the given creatures as "curse event" creatures. See the `spawnCreature` function for more information
73
73
  */
74
74
  claim(...creatures: Creature[]): void;
75
+ /**
76
+ * Skip time in any scripts running for this event.
77
+ */
78
+ skipTime(ticks: number): void;
75
79
  reveal(forSpecificHuman?: ArrayOr<Human>): boolean;
76
80
  discover(forSpecificHuman?: ArrayOr<Human>): boolean;
77
81
  /**
@@ -139,6 +143,10 @@ export interface CurseEvent {
139
143
  * This is used for the `CurseEventContext.getRandomTile` and `CurseEventContext.getNearbyPlayers` methods.
140
144
  */
141
145
  radius?: number;
146
+ /**
147
+ * Creature types that this event can spawn by default.
148
+ */
149
+ creatureTypes?: SupplierOr<CreatureType[] | undefined, [CurseEventContext]>;
142
150
  /**
143
151
  * Custom game options to apply during the curse event. Note that this only runs once, right at the start of the event.
144
152
  */
@@ -69,6 +69,7 @@ import type { IVector2, IVector3 } from "@wayward/game/utilities/math/IVector";
69
69
  import Vector2 from "@wayward/game/utilities/math/Vector2";
70
70
  import type { IVector4 } from "@wayward/game/utilities/math/Vector4";
71
71
  import type { IEventEmitter } from "@wayward/utilities/event/EventEmitter";
72
+ import type { RuneEffectType } from "@wayward/game/game/item/runes/RuneEffects";
72
73
  interface IEquip {
73
74
  item: Item;
74
75
  equipType: EquipType;
@@ -120,7 +121,7 @@ export default abstract class Human<DescriptionType = unknown, TypeType extends
120
121
  sortDirection?: SortDirection;
121
122
  lastReceivedRune?: Deity;
122
123
  lastGainedStat?: Stat;
123
- invocations?: PartialRecord<ItemType, number>;
124
+ invocations?: PartialRecord<RuneEffectType, number>;
124
125
  lastUsedCaveEntrance?: IVector3;
125
126
  readonly movementIntent: IMovementIntent;
126
127
  walkToInProgress?: IWalkToPathInProgress;
@@ -36,7 +36,7 @@ declare const _default: Action<[ActionArgument.DoodadNearby], ActionType.Consecr
36
36
  groupRunes(runes: Item[]): ConsecrateRuneGroup[];
37
37
  getReturnDeity(runeGroups: ConsecrateRuneGroup[]): DeityReal | undefined;
38
38
  groupRunesFriendAndFoe(runeGroups: ConsecrateRuneGroup[], deity: DeityReal): ConsecrateRuneGroupFriendAndFoe;
39
- getDeityRuneTypes(deity: DeityReal): ItemType[];
39
+ getDeityRuneTypes(human: Human, deity: DeityReal): ItemType[];
40
40
  calculateValue(human: Human, runes: Item[], deity: DeityReal, calculationType: "min" | "max" | "random"): number;
41
41
  resolveRunesForValue(human: Human, value: number, maxValue?: number): ConsecrateOutcomeRuneQualityCounts;
42
42
  };
@@ -12,7 +12,6 @@ import type { SfxType } from "@wayward/game/audio/IAudio";
12
12
  import type { IDecayTemperatureRange } from "@wayward/game/game/IGame";
13
13
  import type { IObjectDescription, Quality } from "@wayward/game/game/IObject";
14
14
  import type { BiomeType } from "@wayward/game/game/biome/IBiome";
15
- import type { DeityReal } from "@wayward/game/game/deity/Deity";
16
15
  import type { RuneChance } from "@wayward/game/game/deity/IDeities";
17
16
  import type { DoodadType, DoodadTypeGroup } from "@wayward/game/game/doodad/IDoodad";
18
17
  import type Human from "@wayward/game/game/entity/Human";
@@ -47,8 +46,8 @@ import type { DialogId } from "@wayward/game/ui/screen/screens/game/Dialogs";
47
46
  import type { IVector3 } from "@wayward/game/utilities/math/IVector";
48
47
  import type Vector2 from "@wayward/game/utilities/math/Vector2";
49
48
  import type { IRGB } from "@wayward/utilities/Color";
50
- import type { IRange } from "@wayward/utilities/math/Range";
51
49
  import type { MagicalLootType } from "@wayward/game/game/item/MagicalLoot";
50
+ import type { RuneEffectType } from "@wayward/game/game/item/runes/RuneEffects";
52
51
  export interface IItemWeightComponent {
53
52
  weightFraction?: number;
54
53
  type: ItemType;
@@ -470,27 +469,14 @@ export interface IItemOnUse {
470
469
  [ActionType.Uncage]?: ItemType;
471
470
  }
472
471
  export interface IInvokeUse {
473
- deity: DeityReal;
472
+ effect: RuneEffectType | {
473
+ (item: Item | undefined, human: Human): RuneEffectType;
474
+ (item: Item, human?: Human): RuneEffectType;
475
+ };
474
476
  /**
475
477
  * The drop rate of this rune compared to other runes for the same deity. Defaults to `1`.
476
478
  */
477
479
  dropWeight?: number;
478
- /**
479
- * Defaults to 1 day.
480
- */
481
- cooldownDays?: number;
482
- /**
483
- * A multiplier for reducing the cooldown of invocation.
484
- * If given an `IRange`, the `minimum` value is the multiplier at 0% skill, and the `maximum` value is the multiplier at 100% skill.
485
- * If given a `number`, the multiplier is `1.0` at 0% skill, and the `maximum` value is the multiplier at 100% skill.
486
- *
487
- * Defaults to 1.0 — no cooldown multiplier from theurgy skill.
488
- */
489
- cooldownTheurgyMultiplier?: number | IRange;
490
- /**
491
- * @returns The amount of success this action had, a decimal from 0-1
492
- */
493
- use(human: Human, rune: Item): number | undefined;
494
480
  }
495
481
  export interface IItemBuild {
496
482
  /**
@@ -730,9 +716,10 @@ export interface IMagicalPropertyInfo {
730
716
  */
731
717
  max: number;
732
718
  /**
733
- * Does nothing for integer magical properties. For decimal magical properties, rounds it to the nearest `.1` for calculations and display.
719
+ * The precision for this magical property. Magical property values are rounded up to this many decimal places.
720
+ * Defaults to 0 (integers).
734
721
  */
735
- roundToNearestTenthPlace?: true;
722
+ precision?: number;
736
723
  /**
737
724
  * Generates a random starting value for this magical property.
738
725
  */
@@ -1770,7 +1757,10 @@ export declare enum ItemTypeExtra {
1770
1757
  CactusScarecrow2 = 853,
1771
1758
  CactusScarecrow3 = 854,
1772
1759
  SnowScarecrow2 = 855,
1773
- SnowScarecrow3 = 856
1760
+ SnowScarecrow3 = 856,
1761
+ RuneOfEvil_Cursed = 857,
1762
+ RuneOfGood_Cursed = 858,
1763
+ RuneOfChaos_Cursed = 859
1774
1764
  }
1775
1765
  export type DisplayableItemType = ItemType | ItemTypeExtra;
1776
1766
  export declare enum ItemTag {
@@ -8,12 +8,4 @@
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 { 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>;
11
+ export {};
@@ -0,0 +1,58 @@
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 { ChaosEffect } from "@wayward/game/game/deity/Chaos";
12
+ import type { DeityReal } from "@wayward/game/game/deity/Deity";
13
+ import type Human from "@wayward/game/game/entity/Human";
14
+ import type { QualityNatural } from "@wayward/game/game/IObject";
15
+ import { Quality } from "@wayward/game/game/IObject";
16
+ import type Island from "@wayward/game/game/island/Island";
17
+ import type Item from "@wayward/game/game/item/Item";
18
+ import { IRange } from "@wayward/utilities/math/Range";
19
+ export declare enum RuneEffectType {
20
+ PacifyCreatures = 0,
21
+ ZoneEffect = 1,
22
+ SummonCreatures = 2,
23
+ PacifyCreaturesResonant = 3,
24
+ CurseEventSpeedUp = 4,
25
+ SummonCreaturesResonant = 5
26
+ }
27
+ export interface RuneEffect {
28
+ deity: DeityReal;
29
+ /**
30
+ * Defaults to 1 day. (Decimals work fine.)
31
+ */
32
+ cooldownDays?: SupplierOr<number, [Island]>;
33
+ /**
34
+ * A multiplier for reducing the cooldown of invocation.
35
+ * If given an `IRange`, the `minimum` value is the multiplier at 0% skill, and the `maximum` value is the multiplier at 100% skill.
36
+ * If given a `number`, the multiplier is `1.0` at 0% skill, and the `maximum` value is the multiplier at 100% skill.
37
+ *
38
+ * Defaults to 1.0 — no cooldown multiplier from theurgy skill.
39
+ */
40
+ cooldownTheurgyMultiplier?: SupplierOr<number | IRange, [Island]>;
41
+ /**
42
+ * @returns The amount of success this action had, a decimal from 0-1
43
+ */
44
+ use(human: Human, rune: Item): number | undefined;
45
+ }
46
+ export declare namespace RuneEffect {
47
+ function get(effect?: RuneEffectType): RuneEffect | undefined;
48
+ }
49
+ export declare const RUNE_OF_GOOD_PACIFY_CHANCE: Record<QualityNatural, number>;
50
+ export declare const RUNE_OF_GOOD_PACIFY_TIME: Record<QualityNatural, IRange>;
51
+ export declare const RUNE_OF_CHAOS_EFFECT_MAP: PartialRecord<Quality, ChaosEffect>;
52
+ export declare const RUNE_OF_EVIL_SPAWN_COUNT: Record<QualityNatural, IRange>;
53
+ export declare const RUNE_OF_EVIL_MAX_ATTEMPTS = 20;
54
+ export declare const RUNE_OF_EVIL_RESONANT_RADIUS = 20;
55
+ /** Multiplied by min(1, rune quality) */
56
+ export declare const RUNE_OF_CHAOS_CURSE_EVENT_TIME_SKIP: IRange<number>;
57
+ export declare const RUNE_OF_CHAOS_CURSE_EVENT_TIME_SKIP_THEURGY_MULTIPLIER: IRange<number>;
58
+ export declare const RuneEffects: PartialRecord<RuneEffectType, RuneEffect>;
@@ -11,6 +11,7 @@
11
11
  import type MagicalPropertyManager from "@wayward/game/game/magic/MagicalPropertyManager";
12
12
  import type { MagicalPropertyTypeSubTypeMap } from "@wayward/game/game/magic/MagicalPropertyType";
13
13
  import MagicalPropertyType from "@wayward/game/game/magic/MagicalPropertyType";
14
+ import TranslationImpl from "@wayward/game/language/impl/TranslationImpl";
14
15
  export interface IHasMagic {
15
16
  magic?: MagicalPropertyManager;
16
17
  }
@@ -87,4 +88,5 @@ export declare namespace MagicalPropertyIdentity {
87
88
  function translationHash(...identity: MagicalPropertyIdentity): string;
88
89
  function unhash(hash: MagicalPropertyIdentityHash): MagicalPropertyIdentity | undefined;
89
90
  function equals(...identities: MagicalPropertyIdentity[]): boolean;
91
+ function getSubTypeTranslationDictionaryAndKey(identity: MagicalPropertyIdentity): TranslationImpl | undefined;
90
92
  }
@@ -920,6 +920,9 @@ export declare const enumRefTypes: {
920
920
  CactusScarecrow3: ItemTypeExtra.CactusScarecrow3;
921
921
  SnowScarecrow2: ItemTypeExtra.SnowScarecrow2;
922
922
  SnowScarecrow3: ItemTypeExtra.SnowScarecrow3;
923
+ RuneOfEvil_Cursed: ItemTypeExtra.RuneOfEvil_Cursed;
924
+ RuneOfGood_Cursed: ItemTypeExtra.RuneOfGood_Cursed;
925
+ RuneOfChaos_Cursed: ItemTypeExtra.RuneOfChaos_Cursed;
923
926
  };
924
927
  12: typeof ItemType;
925
928
  13: typeof Stat;
@@ -1026,6 +1026,9 @@ declare const dictionaryMap: {
1026
1026
  CactusScarecrow3: ItemTypeExtra.CactusScarecrow3;
1027
1027
  SnowScarecrow2: ItemTypeExtra.SnowScarecrow2;
1028
1028
  SnowScarecrow3: ItemTypeExtra.SnowScarecrow3;
1029
+ RuneOfEvil_Cursed: ItemTypeExtra.RuneOfEvil_Cursed;
1030
+ RuneOfGood_Cursed: ItemTypeExtra.RuneOfGood_Cursed;
1031
+ RuneOfChaos_Cursed: ItemTypeExtra.RuneOfChaos_Cursed;
1029
1032
  };
1030
1033
  67: {
1031
1034
  Bow: ItemType.Bow;
@@ -1884,6 +1887,9 @@ declare const dictionaryMap: {
1884
1887
  CactusScarecrow3: ItemTypeExtra.CactusScarecrow3;
1885
1888
  SnowScarecrow2: ItemTypeExtra.SnowScarecrow2;
1886
1889
  SnowScarecrow3: ItemTypeExtra.SnowScarecrow3;
1890
+ RuneOfEvil_Cursed: ItemTypeExtra.RuneOfEvil_Cursed;
1891
+ RuneOfGood_Cursed: ItemTypeExtra.RuneOfGood_Cursed;
1892
+ RuneOfChaos_Cursed: ItemTypeExtra.RuneOfChaos_Cursed;
1887
1893
  };
1888
1894
  68: typeof ItemTypeExtra;
1889
1895
  69: typeof ItemTypeGroup;
@@ -2878,6 +2884,9 @@ export declare const strictDictionaries: {
2878
2884
  CactusScarecrow3: ItemTypeExtra.CactusScarecrow3;
2879
2885
  SnowScarecrow2: ItemTypeExtra.SnowScarecrow2;
2880
2886
  SnowScarecrow3: ItemTypeExtra.SnowScarecrow3;
2887
+ RuneOfEvil_Cursed: ItemTypeExtra.RuneOfEvil_Cursed;
2888
+ RuneOfGood_Cursed: ItemTypeExtra.RuneOfGood_Cursed;
2889
+ RuneOfChaos_Cursed: ItemTypeExtra.RuneOfChaos_Cursed;
2881
2890
  };
2882
2891
  67: {
2883
2892
  Bow: ItemType.Bow;
@@ -3736,6 +3745,9 @@ export declare const strictDictionaries: {
3736
3745
  CactusScarecrow3: ItemTypeExtra.CactusScarecrow3;
3737
3746
  SnowScarecrow2: ItemTypeExtra.SnowScarecrow2;
3738
3747
  SnowScarecrow3: ItemTypeExtra.SnowScarecrow3;
3748
+ RuneOfEvil_Cursed: ItemTypeExtra.RuneOfEvil_Cursed;
3749
+ RuneOfGood_Cursed: ItemTypeExtra.RuneOfGood_Cursed;
3750
+ RuneOfChaos_Cursed: ItemTypeExtra.RuneOfChaos_Cursed;
3739
3751
  };
3740
3752
  68: typeof ItemTypeExtra;
3741
3753
  69: typeof ItemTypeGroup;