@wayward/types 2.15.4-beta.dev.20260403.1 → 2.15.4-beta.dev.20260407.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 +9 -0
- package/definitions/game/game/curse/CurseEvent.d.ts +5 -0
- package/definitions/game/game/curse/event/CurseEventSuffusedWithMagic.d.ts +13 -0
- package/definitions/game/game/doodad/Doodad.d.ts +16 -1
- package/definitions/game/game/doodad/DoodadManager.d.ts +6 -1
- package/definitions/game/game/doodad/DoodadUtilities.d.ts +7 -2
- package/definitions/game/game/doodad/IDoodad.d.ts +1 -0
- package/definitions/game/game/doodad/IScarecrows.d.ts +12 -0
- package/definitions/game/game/entity/Human.d.ts +5 -0
- package/definitions/game/game/entity/action/actions/SetTitle.d.ts +1 -1
- package/definitions/game/game/entity/creature/CreatureManager.d.ts +3 -0
- package/definitions/game/game/inspection/infoProviders/Uses.d.ts +1 -0
- package/definitions/game/game/inspection/infoProviders/doodad/DoodadLightSource.d.ts +19 -0
- package/definitions/game/game/inspection/infoProviders/item/ItemUses.d.ts +1 -0
- package/definitions/game/game/inspection/infoProviders/item/use/ItemBuildInfo.d.ts +2 -2
- package/definitions/game/game/inspection/infoProviders/item/use/ItemCraftingIngredientInfo.d.ts +2 -2
- package/definitions/game/game/inspection/infoProviders/shared/SharedLightSourceInfo.d.ts +7 -23
- package/definitions/game/game/inspection/infoProviders/shared/SharedLitAndEquipmentUseInfo.d.ts +38 -0
- package/definitions/game/game/inspection/infoProviders/shared/SharedScareRadiusInfo.d.ts +19 -0
- package/definitions/game/game/inspection/inspections/DoodadInspection.d.ts +1 -0
- package/definitions/game/game/inspection/inspections/ItemInspection.d.ts +1 -0
- package/definitions/game/game/item/IItem.d.ts +2 -0
- package/definitions/game/game/item/Item.d.ts +39 -9
- package/definitions/game/game/item/ItemManager.d.ts +5 -0
- package/definitions/game/game/magic/IMagicalProperty.d.ts +3 -0
- package/definitions/game/game/milestones/IMilestone.d.ts +3 -1
- package/definitions/game/game/options/IGameOptions.d.ts +10 -0
- package/definitions/game/game/options/modifiers/milestone/MilestoneModifiersManager.d.ts +4 -0
- package/definitions/game/game/options/modifiers/milestone/modifiers/Defiled.d.ts +17 -0
- package/definitions/game/game/options/modifiers/milestone/modifiers/Warded.d.ts +17 -0
- package/definitions/game/game/tile/TileEventManager.d.ts +1 -0
- package/definitions/game/language/Dictionary.d.ts +112 -110
- package/definitions/game/language/DictionaryMap.d.ts +224 -220
- package/definitions/game/language/dictionary/Message.d.ts +696 -692
- package/definitions/game/language/dictionary/UiTranslation.d.ts +804 -801
- package/definitions/game/language/english/item/CursePropertyAffixes.d.ts +13 -0
- package/definitions/game/language/english/item/CurseSubPropertyAffixes.d.ts +13 -0
- package/definitions/game/save/SaveMetadata.d.ts +2 -4
- package/definitions/game/save/data/SaveData.d.ts +6 -4
- package/definitions/game/ui/screen/screens/game/component/container/ContainerBucketItemList.d.ts +7 -0
- package/definitions/test/suite/unitTests/game/ContainerBucketItemList.spec.d.ts +13 -0
- package/definitions/test/suite/unitTests/game/Curse.spec.d.ts +13 -0
- package/definitions/test/suite/unitTests/game/SaveLoad.spec.d.ts +13 -0
- package/definitions/utilities/random/SeededGenerator.d.ts +1 -0
- package/package.json +1 -1
|
@@ -80,6 +80,7 @@ export declare const CURSE_EVENTS_DEFAULT_RADIUS = 25;
|
|
|
80
80
|
*/
|
|
81
81
|
export declare const CURSE_EVENTS_COOLDOWN_RANGE: IRangeRange;
|
|
82
82
|
export declare const CURSE_EVENTS_FIRST_NIGHT = 3;
|
|
83
|
+
export declare const CURSE_EVENTS_DEFAULT_EVENT_COOLDOWN = 3;
|
|
83
84
|
/**
|
|
84
85
|
* Each tick after a curse event ends, one entity of each type spawned by the event has this chance to despawn.
|
|
85
86
|
* If the entity is on a tile that can be seen by a player, it will not despawn.
|
|
@@ -103,6 +104,7 @@ export declare const CURSE_EVENTS_RUNE_CHANCE_MULTIPLIER_LUCKY: IRange<number>;
|
|
|
103
104
|
*/
|
|
104
105
|
export declare const CURSE_EVENTS_RUNES_KILL_TAME: Array<WeightedOption<IRange>>;
|
|
105
106
|
export declare const CURSE_EVENTS_RUNES_SURVIVED: IRange<number>;
|
|
107
|
+
export declare const CURSE_SCRIPT_REPEAT_INFINITE_ITERATIONS = 99999999;
|
|
106
108
|
export declare const CURSE_EVENTS_CREATURE_WANDER_CURSEBEARER_PRIORITY: IRange<number>;
|
|
107
109
|
export declare const CURSE_EVENTS_VISUAL_EXPLORED_FADE_TURNS = 30;
|
|
108
110
|
export declare const CURSE_EVENTS_VISUAL_EXPLORED_FAST_PHASE_TURNS = 50;
|
|
@@ -128,6 +130,9 @@ declare namespace Curse {
|
|
|
128
130
|
function resetCooldown(island: Island): void;
|
|
129
131
|
function updateRuneItemsDisplay(island: Island): void;
|
|
130
132
|
function tickCurse(island: Island, humans: Human[]): void;
|
|
133
|
+
function executeScriptAction(island: Island, event: CurseEventInstance, path: Array<string | number>): boolean;
|
|
134
|
+
function skipScriptWait(event: CurseEventInstance, path: Array<string | number>): boolean;
|
|
135
|
+
function restartScriptBranch(event: CurseEventInstance, path: Array<string | number>): boolean;
|
|
131
136
|
function reload(island: Island, isNew?: boolean): void;
|
|
132
137
|
function spawnCurseEvents(island: Island, humans: Human[], requiresEvents: boolean): void;
|
|
133
138
|
function attemptCurseEventSpawn(category: CurseCategory | null, human: Human, curse: number, humans: Human[], events: CurseEventInstance[], allowDependents?: boolean): CurseEventInstance | undefined;
|
|
@@ -147,6 +152,7 @@ declare const SYMBOL_CURSE_EVENT_ACTIVE_SUBSCRIBER_INSTANCE: unique symbol;
|
|
|
147
152
|
type CurseVisualHiddenExploredTilesByZ = Partial<Record<number, number[]>>;
|
|
148
153
|
type CurseVisualFastStepsByZ = Partial<Record<number, number>>;
|
|
149
154
|
type CurseVisualOriginsByZ = Partial<Record<number, IVector2>>;
|
|
155
|
+
type CurseEventCooldowns = Partial<Record<CurseEventType, number>>;
|
|
150
156
|
interface Curse {
|
|
151
157
|
night?: true;
|
|
152
158
|
globalCurse?: number;
|
|
@@ -158,6 +164,7 @@ interface Curse {
|
|
|
158
164
|
visualStateRestoreOriginsByZ?: CurseVisualOriginsByZ;
|
|
159
165
|
visualStateWeightedRestoreStepsByZ?: CurseVisualFastStepsByZ;
|
|
160
166
|
cooldown?: number;
|
|
167
|
+
eventCooldowns?: CurseEventCooldowns;
|
|
161
168
|
ephemeralCreatures?: number[];
|
|
162
169
|
[SYMBOL_CURSE_EVENT_GLOBAL_SUBSCRIBER_INSTANCE]?: CurseEventSubscriber;
|
|
163
170
|
[SYMBOL_CURSE_EVENT_ACTIVE_SUBSCRIBER_INSTANCE]?: CurseEventSubscriber;
|
|
@@ -180,6 +187,8 @@ interface ScriptProcessState {
|
|
|
180
187
|
path: Array<string | number>;
|
|
181
188
|
/** Iterations remaining for a Repeat block, or ticks remaining for an EndCondition. */
|
|
182
189
|
iterationsRemaining?: number;
|
|
190
|
+
/** The original iteration count when the current step or branch was initialized. */
|
|
191
|
+
iterationsTotal?: number;
|
|
183
192
|
/** The state of any child processes started by a Simultaneously or Repeat block. */
|
|
184
193
|
childProcesses?: ScriptProcessState[];
|
|
185
194
|
}
|
|
@@ -124,6 +124,11 @@ export interface CurseEvent {
|
|
|
124
124
|
* 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.
|
|
125
125
|
*/
|
|
126
126
|
weight?: number;
|
|
127
|
+
/**
|
|
128
|
+
* The number of eligible curse event nights that must pass before this event can appear again.
|
|
129
|
+
* Defaults to 1.
|
|
130
|
+
*/
|
|
131
|
+
cooldown?: number;
|
|
127
132
|
revealOn: ArrayOr<CurseEventRevealCondition>;
|
|
128
133
|
discoverOn: ArrayOr<CurseEventRevealCondition>;
|
|
129
134
|
effects?(context: CurseEventContext, effects: StatusEffectList): StatusEffectList;
|
|
@@ -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;
|
|
@@ -32,7 +32,9 @@ import type { ContainerSort, DisplayableItemType, IContainer, IItemVehicle, ILiq
|
|
|
32
32
|
import { ItemType } from "@wayward/game/game/item/IItem";
|
|
33
33
|
import type Item from "@wayward/game/game/item/Item";
|
|
34
34
|
import type { IHasMagic } from "@wayward/game/game/magic/IMagicalProperty";
|
|
35
|
+
import type { IMagicalPropertyManagerEvents } from "@wayward/game/game/magic/MagicalPropertyManager";
|
|
35
36
|
import MagicalPropertyManager from "@wayward/game/game/magic/MagicalPropertyManager";
|
|
37
|
+
import MagicalPropertyType from "@wayward/game/game/magic/MagicalPropertyType";
|
|
36
38
|
import type { Reference, ReferenceType } from "@wayward/game/game/reference/IReferenceManager";
|
|
37
39
|
import type { IHasInsulation, IInsulationResult, TempType } from "@wayward/game/game/temperature/ITemperature";
|
|
38
40
|
import type Tile from "@wayward/game/game/tile/Tile";
|
|
@@ -45,7 +47,10 @@ import type { IUnserializedCallback } from "@wayward/game/save/serializer/ISeria
|
|
|
45
47
|
import type { IVector3 } from "@wayward/game/utilities/math/IVector";
|
|
46
48
|
import type { IRGB } from "@wayward/utilities/Color";
|
|
47
49
|
import type { IEventEmitter } from "@wayward/utilities/event/EventEmitter";
|
|
48
|
-
|
|
50
|
+
type DoodadMagicEvents = {
|
|
51
|
+
[EVENT in keyof IMagicalPropertyManagerEvents as `magic${Capitalize<EVENT>}`]: IMagicalPropertyManagerEvents[EVENT];
|
|
52
|
+
};
|
|
53
|
+
export interface IDoodadEvents extends IEntityMovableEvents, IQualityEvents, DoodadMagicEvents {
|
|
49
54
|
/**
|
|
50
55
|
* Called when an doodad is being updated
|
|
51
56
|
* @param tile The tile the doodad is on
|
|
@@ -112,6 +117,7 @@ export default class Doodad extends EntityMovable<IDoodadDescription, DoodadType
|
|
|
112
117
|
hitchedCreature?: number;
|
|
113
118
|
magic?: MagicalPropertyManager;
|
|
114
119
|
meltDecay?: number;
|
|
120
|
+
note?: string;
|
|
115
121
|
orientation?: DoorOrientation;
|
|
116
122
|
quality?: Quality;
|
|
117
123
|
sort?: ContainerSort;
|
|
@@ -158,6 +164,7 @@ export default class Doodad extends EntityMovable<IDoodadDescription, DoodadType
|
|
|
158
164
|
isContainer(): this is IUncastableContainer;
|
|
159
165
|
toString(): string;
|
|
160
166
|
getRegistrarId(): number;
|
|
167
|
+
get litDescription(): IDoodadDescription | undefined;
|
|
161
168
|
/**
|
|
162
169
|
* Entity controlling this doodad (for wheel barrows)
|
|
163
170
|
*/
|
|
@@ -231,6 +238,10 @@ export default class Doodad extends EntityMovable<IDoodadDescription, DoodadType
|
|
|
231
238
|
*/
|
|
232
239
|
getBuilder(): Player | undefined;
|
|
233
240
|
removeMagic(): void;
|
|
241
|
+
private pipingMagic;
|
|
242
|
+
protected pipeMagicalPropertyManagerEvents(magic: MagicalPropertyManager): void;
|
|
243
|
+
protected onMagicSet(type: MagicalPropertyType, _subType?: number, value?: number, previousValue?: number, curse?: true): void;
|
|
244
|
+
protected onMagicRemove(type: MagicalPropertyType): void;
|
|
234
245
|
unhitch(): void;
|
|
235
246
|
damage(forceBreak?: boolean, skipDropAsItem?: boolean, skipSound?: boolean, skipResources?: boolean, damage?: number): void;
|
|
236
247
|
getDefaultDurability(random?: import("@wayward/utilities/random/Random").Random<import("@wayward/utilities/random/generators/LegacySeededGenerator").LegacySeededGenerator | import("@wayward/utilities/random/generators/PCGSeededGenerator").PCGSeededGenerator>): number;
|
|
@@ -408,6 +419,9 @@ export default class Doodad extends EntityMovable<IDoodadDescription, DoodadType
|
|
|
408
419
|
*/
|
|
409
420
|
stokeFire(stokeValue: number, human?: Human): boolean;
|
|
410
421
|
getDecayAtStartWithMagical(): number;
|
|
422
|
+
protected clampDecayToMax(type: MagicalPropertyType): void;
|
|
423
|
+
protected clampDurabilityToMax(type: MagicalPropertyType): void;
|
|
424
|
+
protected updateDurabilityForPersistence(type: MagicalPropertyType, value?: number, previousValue?: number, curse?: true): void;
|
|
411
425
|
canCauseDamage(): boolean;
|
|
412
426
|
/**
|
|
413
427
|
* Decay over time
|
|
@@ -424,3 +438,4 @@ export default class Doodad extends EntityMovable<IDoodadDescription, DoodadType
|
|
|
424
438
|
private postProcessDecay;
|
|
425
439
|
private randomAshSpawn;
|
|
426
440
|
}
|
|
441
|
+
export {};
|
|
@@ -62,7 +62,8 @@ export default class DoodadManager extends EntityManager<Doodad> {
|
|
|
62
62
|
loadEntity(doodad: Doodad): void;
|
|
63
63
|
isGroup(doodadType: DoodadType | DoodadTypeGroup): doodadType is DoodadTypeGroup;
|
|
64
64
|
isInGroup(doodadType: DoodadType, doodadGroup: DoodadTypeGroup | DoodadType): boolean;
|
|
65
|
-
getGroups(doodad
|
|
65
|
+
getGroups(doodad?: DoodadType): DoodadTypeGroup[];
|
|
66
|
+
getVisibleGroups(doodad: Doodad): DoodadTypeGroup[];
|
|
66
67
|
/**
|
|
67
68
|
* Checks if a number is a DoodadType or DoodadTypeExtra.
|
|
68
69
|
* @param type a number (DoodadType/DoodadTypeExtra enum).
|
|
@@ -86,8 +87,12 @@ export default class DoodadManager extends EntityManager<Doodad> {
|
|
|
86
87
|
*/
|
|
87
88
|
updateAllAsync(ticks: number, playingHumans: Human[], playerHumanTiles: Set<Tile>, onProgress: (progess: number) => Promise<void>): Promise<void>;
|
|
88
89
|
verifyAndFixItemWeights(): void;
|
|
90
|
+
/**
|
|
91
|
+
* Gets the nearest affective scarecrow in the given group, or, if no group is provided, gets the nearest scarecrow that isn't in a specialized group
|
|
92
|
+
*/
|
|
89
93
|
getScarecrowInRange(tile: Tile, group?: DoodadTypeGroup): Doodad | undefined;
|
|
90
94
|
getScarecrowInLineOfSight(creature: Creature, isClientside: boolean): Doodad | undefined;
|
|
95
|
+
getCursedScarecrowSpawnChance(tile: Tile, curseEvent?: boolean): number;
|
|
91
96
|
addScarecrow(doodad: Doodad): void;
|
|
92
97
|
removeScarecrow(doodad: Doodad): void;
|
|
93
98
|
/**
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type Doodad from "@wayward/game/game/doodad/Doodad";
|
|
12
|
-
import type { DoodadType, IScareRadius } from "@wayward/game/game/doodad/IDoodad";
|
|
12
|
+
import type { DoodadType, IDoodadDescription, IScareRadius } from "@wayward/game/game/doodad/IDoodad";
|
|
13
13
|
import { GrowingStage } from "@wayward/game/game/doodad/IDoodad";
|
|
14
14
|
import type Human from "@wayward/game/game/entity/Human";
|
|
15
15
|
import type Item from "@wayward/game/game/item/Item";
|
|
@@ -21,7 +21,12 @@ declare namespace DoodadUtilities {
|
|
|
21
21
|
export function wouldWalkingOnDealNormalDamage(doodad: DoodadIn, human?: Human): boolean;
|
|
22
22
|
export function isDangerous(doodad: DoodadIn, human?: Human): boolean;
|
|
23
23
|
export function canCauseStatus(doodad: DoodadIn): boolean;
|
|
24
|
-
export function getScareRadius(doodad: Doodad | Item): IScareRadius;
|
|
24
|
+
export function getScareRadius(doodad: Doodad | Item, description?: IDoodadDescription | undefined): IScareRadius | undefined;
|
|
25
|
+
export function getCursedScarecrowSpawnBonus(doodad: Doodad | Item): {
|
|
26
|
+
radius: number;
|
|
27
|
+
naturalSpawnChance: number;
|
|
28
|
+
curseEventSpawnChance: number;
|
|
29
|
+
} | undefined;
|
|
25
30
|
export {};
|
|
26
31
|
}
|
|
27
32
|
export default DoodadUtilities;
|
|
@@ -0,0 +1,12 @@
|
|
|
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 { DoodadTypeGroup } from "@wayward/game/game/doodad/IDoodad";
|
|
12
|
+
export declare const SPECIALIZED_SCARECROW_GROUPS: DoodadTypeGroup[];
|
|
@@ -75,6 +75,10 @@ interface IEquip {
|
|
|
75
75
|
item: Item;
|
|
76
76
|
equipType: EquipType;
|
|
77
77
|
}
|
|
78
|
+
interface IThrowDamageBreakdown extends IAttack {
|
|
79
|
+
baseDamage: number;
|
|
80
|
+
magicalBonus: number;
|
|
81
|
+
}
|
|
78
82
|
export default abstract class Human<DescriptionType = unknown, TypeType extends number = number, EntityReferenceType extends ReferenceType.Player | ReferenceType.NPC = ReferenceType.Player | ReferenceType.NPC, TagType = unknown> extends EntityWithStats<DescriptionType, TypeType, EntityReferenceType, TagType> implements IHasInsulation, IContainer {
|
|
79
83
|
static getNameTranslation(): TranslationImpl;
|
|
80
84
|
event: IEventEmitter<this, IHumanEvents>;
|
|
@@ -242,6 +246,7 @@ export default abstract class Human<DescriptionType = unknown, TypeType extends
|
|
|
242
246
|
*/
|
|
243
247
|
damageRandomEquipment(amount?: number): void;
|
|
244
248
|
getDamageModifier(): number;
|
|
249
|
+
getThrowDamageBreakdown(weapon?: Item): IThrowDamageBreakdown;
|
|
245
250
|
calculateDamageAmount(attackType: AttackType, weapon?: Item, ammoItem?: Item): number;
|
|
246
251
|
isDualWielding(): boolean;
|
|
247
252
|
getAttack(attack?: AttackType, weapon?: Item, offHandWeapon?: Item): IAttack;
|
|
@@ -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, "Abnormalizer" | "Chef" | "Exterminator" | "Crafter" | "Gardener" | "Gatherer" | "Hunter" | "Locksmith" | "ReaperOfSouls" | "Survivor" | "Pitcher" | "Trapsetter" | "TreasureHunter" | "Collector" | "Explorer" | "Grandmaster" | "Prepared" | "Doctor" | "Artificer" | "Returned" | "Navigator" | "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" | "Runekeeper" | "InternalDeityDiscovery" | "InternalMerchantsDiscovery" | "InternalCurseSystemDiscovery" | "Invoker" | "InternalDeityInvoked" | "InternalInsulationDiscovery" | "Turbulent" | "Statistician" | "Afflicted" | "Exsanguinated" | "InternalItemDiscovered" | "Cursed" | "Cursebreaker" | "Oblivious">, import("../argument/ActionArgumentEnum").default<SkillType, "None" | "Chemistry" | "Anatomy" | "Marksmanship" | "Blacksmithing" | "Botany" | "Camping" | "Cartography" | "Claythrowing" | "Cooking" | "Fishing" | "Fletching" | "Glassblowing" | "Leatherworking" | "Lockpicking" | "Lumberjacking" | "Mining" | "Mycology" | "Parrying" | "Stonecrafting" | "Swimming" | "Tactics" | "Tailoring" | "Throwing" | "Tinkering" | "Trapping" | "Woodworking" | "Taming" | "Horticulture" | "Bartering" | "Seafaring" | "Thaumaturgy" | "DualWielding" | "Theurgy">]], ActionType.SetTitle, import("../../player/Player").default, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, [(TitleType | undefined)?, (SkillType | Milestone | undefined)?]>;
|
|
19
|
+
declare const _default: Action<[[ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<TitleType, "Skill" | "Milestone">], [arg1: ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<Milestone, "Abnormalizer" | "Chef" | "Exterminator" | "Crafter" | "Gardener" | "Gatherer" | "Hunter" | "Locksmith" | "ReaperOfSouls" | "Survivor" | "Pitcher" | "Trapsetter" | "TreasureHunter" | "Collector" | "Explorer" | "Grandmaster" | "Prepared" | "Doctor" | "Artificer" | "Returned" | "Navigator" | "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" | "Runekeeper" | "InternalDeityDiscovery" | "InternalMerchantsDiscovery" | "InternalCurseSystemDiscovery" | "Invoker" | "InternalDeityInvoked" | "InternalInsulationDiscovery" | "Turbulent" | "Statistician" | "Afflicted" | "Exsanguinated" | "InternalItemDiscovered" | "Cursed" | "Cursebreaker" | "Oblivious" | "Warded" | "Defiled">, import("../argument/ActionArgumentEnum").default<SkillType, "None" | "Chemistry" | "Anatomy" | "Marksmanship" | "Blacksmithing" | "Botany" | "Camping" | "Cartography" | "Claythrowing" | "Cooking" | "Fishing" | "Fletching" | "Glassblowing" | "Leatherworking" | "Lockpicking" | "Lumberjacking" | "Mining" | "Mycology" | "Parrying" | "Stonecrafting" | "Swimming" | "Tactics" | "Tailoring" | "Throwing" | "Tinkering" | "Trapping" | "Woodworking" | "Taming" | "Horticulture" | "Bartering" | "Seafaring" | "Thaumaturgy" | "DualWielding" | "Theurgy">]], ActionType.SetTitle, import("../../player/Player").default, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, [(TitleType | undefined)?, (SkillType | Milestone | undefined)?]>;
|
|
20
20
|
export default _default;
|
|
@@ -44,12 +44,15 @@ export default class CreatureManager extends EntityManager<Creature, IEntityRemo
|
|
|
44
44
|
static getName(creature: Creature | CreatureType, aberrant?: boolean, count?: number, article?: Article): TranslationImpl;
|
|
45
45
|
getName(creature: Creature | CreatureType, aberrant?: boolean, count?: number, article?: Article): TranslationImpl;
|
|
46
46
|
calculateHappinessTameTime(human: Human, creature: Creature, bonusTime?: number): number;
|
|
47
|
+
getAberrantOfferRefusalPenalty(offeringBonus?: number): number;
|
|
48
|
+
shouldAberrantOfferFail(human: Human, creature: Creature, tamingSkillDivisor: number, offeringBonus?: number): boolean;
|
|
47
49
|
/**
|
|
48
50
|
* Spawns a creature.
|
|
49
51
|
* @param type The type of creature to spawn.
|
|
50
52
|
* @param tile The tile
|
|
51
53
|
*/
|
|
52
54
|
spawn(type: CreatureType, tile: Tile, options: ICreatureSpawnOptions): Creature | undefined;
|
|
55
|
+
spawnAdditionalNearCursedScarecrow(creature: Creature, originTile: Tile, curseEvent?: boolean): Creature[];
|
|
53
56
|
spawnFromZone(tile: Tile, bypassCreatureLimit?: boolean, checkTerrainType?: boolean): Creature | undefined;
|
|
54
57
|
getAberrantChance(tile: Tile): number;
|
|
55
58
|
createFake(type: CreatureType, aberrant: boolean, tile?: Tile, id?: number): Creature;
|
|
@@ -44,5 +44,6 @@ export default abstract class Uses<T extends IDescribed> extends InfoProvider {
|
|
|
44
44
|
protected getUseDisplayLevel(action: ActionType, context: InfoProviderContext): InfoDisplayLevel;
|
|
45
45
|
private getDetailsHandlerResolver;
|
|
46
46
|
protected getUse(description: DescribedDescription<T>, action: ActionType): TranslationImpl;
|
|
47
|
+
protected getActionTier(description: DescribedDescription<T>, action: ActionType): number | undefined;
|
|
47
48
|
private getUseName;
|
|
48
49
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 Doodad from "@wayward/game/game/doodad/Doodad";
|
|
12
|
+
import { InfoProvider } from "@wayward/game/game/inspection/InfoProvider";
|
|
13
|
+
export default class DoodadLightSource extends InfoProvider {
|
|
14
|
+
private readonly doodad;
|
|
15
|
+
static get(doodad: Doodad): DoodadLightSource | undefined;
|
|
16
|
+
constructor(doodad: Doodad);
|
|
17
|
+
getClass(): string[];
|
|
18
|
+
get(): never[] | import("../LabelledValue").default;
|
|
19
|
+
}
|
|
@@ -24,6 +24,7 @@ export default class ItemUses extends Uses<Item> {
|
|
|
24
24
|
protected getUseDisplayLevel(action: ActionType, context: InfoProviderContext): InfoDisplayLevel;
|
|
25
25
|
protected getUseInfoHandlers(): Array<UseInfo<any, any, any, Item>>;
|
|
26
26
|
protected getUse(description: IItemDescription, action: ActionType): TranslationImpl;
|
|
27
|
+
protected getActionTier(description: Readonly<IItemDescription>, action: ActionType): number | undefined;
|
|
27
28
|
}
|
|
28
29
|
export declare class ItemUseContext extends InfoProviderContext {
|
|
29
30
|
private readonly itemRef?;
|
|
@@ -22,8 +22,8 @@ declare const _default: UseInfo<{
|
|
|
22
22
|
scareRadius: import("../../../../doodad/IDoodad").IScareRadius | undefined;
|
|
23
23
|
entityType: import("../../../../entity/IEntity").EntityType.Item;
|
|
24
24
|
value?: Item | undefined;
|
|
25
|
-
type: import("
|
|
26
|
-
description: Readonly<import("
|
|
25
|
+
type: import("@wayward/game/game/item/IItem").ItemType;
|
|
26
|
+
description: Readonly<import("@wayward/game/game/item/IItem").IItemDescription>;
|
|
27
27
|
quality: import("../../../../IObject").Quality;
|
|
28
28
|
action: ActionType.Build;
|
|
29
29
|
union: import("@wayward/game/game/inspection/infoProviders/UseInfo").IUseInfoBase<Item, ActionType.Build>;
|
package/definitions/game/game/inspection/infoProviders/item/use/ItemCraftingIngredientInfo.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ import type Item from "@wayward/game/game/item/Item";
|
|
|
14
14
|
declare const _default: UseInfo<{
|
|
15
15
|
entityType: import("../../../../entity/IEntity").EntityType.Item;
|
|
16
16
|
value?: Item | undefined;
|
|
17
|
-
type: import("
|
|
18
|
-
description: Readonly<import("
|
|
17
|
+
type: import("@wayward/game/game/item/IItem").ItemType;
|
|
18
|
+
description: Readonly<import("@wayward/game/game/item/IItem").IItemDescription>;
|
|
19
19
|
quality: import("../../../../IObject").Quality;
|
|
20
20
|
action: ActionType.CraftingIngredient;
|
|
21
21
|
union: import("@wayward/game/game/inspection/infoProviders/UseInfo").IUseInfoBase<Item, ActionType.CraftingIngredient>;
|
|
@@ -10,28 +10,12 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type Doodad from "@wayward/game/game/doodad/Doodad";
|
|
12
12
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import LabelledValue from "@wayward/game/game/inspection/infoProviders/LabelledValue";
|
|
14
|
+
import type { InfoUnion } from "@wayward/game/game/inspection/infoProviders/UseInfo";
|
|
15
15
|
import type Item from "@wayward/game/game/item/Item";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
entityType: EntityType.Item;
|
|
19
|
-
value?: Item | undefined;
|
|
20
|
-
type: import("@wayward/game/game/item/IItem").ItemType;
|
|
21
|
-
description: Readonly<import("@wayward/game/game/item/IItem").IItemDescription>;
|
|
22
|
-
quality: import("../../../IObject").Quality;
|
|
23
|
-
action: ActionType.StartFire | ActionType.Ignite | ActionType.Equip;
|
|
24
|
-
union: import("@wayward/game/game/inspection/infoProviders/UseInfo").IUseInfoBase<Item, ActionType.StartFire | ActionType.Ignite | ActionType.Equip>;
|
|
25
|
-
details: Set<symbol>;
|
|
26
|
-
} | {
|
|
16
|
+
export interface ILightSourceInfoBase {
|
|
17
|
+
value?: Item | Doodad;
|
|
27
18
|
lightSource: number;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
description: Readonly<import("../../../doodad/IDoodad").IDoodadDescription>;
|
|
32
|
-
quality: import("../../../IObject").Quality;
|
|
33
|
-
action: ActionType.StartFire | ActionType.Ignite | ActionType.Equip;
|
|
34
|
-
union: import("@wayward/game/game/inspection/infoProviders/UseInfo").IUseInfoBase<Doodad, ActionType.StartFire | ActionType.Ignite | ActionType.Equip>;
|
|
35
|
-
details: Set<symbol>;
|
|
36
|
-
}, ActionType.StartFire | ActionType.Ignite | ActionType.Equip, {}, Doodad | Item>;
|
|
37
|
-
export default _default;
|
|
19
|
+
}
|
|
20
|
+
export declare function getLightSource(value: InfoUnion<Item | Doodad, ActionType.StartFire | ActionType.Ignite | ActionType.Equip> | Item | Doodad): number | undefined;
|
|
21
|
+
export default function ({ value, lightSource }: ILightSourceInfoBase): LabelledValue | undefined;
|
package/definitions/game/game/inspection/infoProviders/shared/SharedLitAndEquipmentUseInfo.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
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 Doodad from "@wayward/game/game/doodad/Doodad";
|
|
12
|
+
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
13
|
+
import UseInfoBase from "@wayward/game/game/inspection/infoProviders/UseInfo";
|
|
14
|
+
import type Item from "@wayward/game/game/item/Item";
|
|
15
|
+
declare const _default: UseInfoBase<{
|
|
16
|
+
scareRadius: import("../../../doodad/IDoodad").IScareRadius | undefined;
|
|
17
|
+
lightSource: number | undefined;
|
|
18
|
+
entityType: import("../../../entity/IEntity").EntityType.Doodad;
|
|
19
|
+
value?: Doodad | undefined;
|
|
20
|
+
type: import("../../../doodad/IDoodad").DoodadType;
|
|
21
|
+
description: Readonly<import("../../../doodad/IDoodad").IDoodadDescription>;
|
|
22
|
+
quality: import("../../../IObject").Quality;
|
|
23
|
+
action: ActionType.StartFire | ActionType.Ignite | ActionType.Equip;
|
|
24
|
+
union: import("@wayward/game/game/inspection/infoProviders/UseInfo").IUseInfoBase<Doodad, ActionType.StartFire | ActionType.Ignite | ActionType.Equip>;
|
|
25
|
+
details: Set<symbol>;
|
|
26
|
+
} | {
|
|
27
|
+
scareRadius: import("../../../doodad/IDoodad").IScareRadius | undefined;
|
|
28
|
+
lightSource: number | undefined;
|
|
29
|
+
entityType: import("../../../entity/IEntity").EntityType.Item;
|
|
30
|
+
value?: Item | undefined;
|
|
31
|
+
type: import("../../../item/IItem").ItemType;
|
|
32
|
+
description: Readonly<import("../../../item/IItem").IItemDescription>;
|
|
33
|
+
quality: import("../../../IObject").Quality;
|
|
34
|
+
action: ActionType.StartFire | ActionType.Ignite | ActionType.Equip;
|
|
35
|
+
union: import("@wayward/game/game/inspection/infoProviders/UseInfo").IUseInfoBase<Item, ActionType.StartFire | ActionType.Ignite | ActionType.Equip>;
|
|
36
|
+
details: Set<symbol>;
|
|
37
|
+
}, ActionType.StartFire | ActionType.Ignite | ActionType.Equip, {}, Doodad | Item>;
|
|
38
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
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 Doodad from "@wayward/game/game/doodad/Doodad";
|
|
12
|
+
import type { IScareRadius } from "@wayward/game/game/doodad/IDoodad";
|
|
13
|
+
import LabelledValue from "@wayward/game/game/inspection/infoProviders/LabelledValue";
|
|
14
|
+
import type Item from "@wayward/game/game/item/Item";
|
|
15
|
+
export interface IScareRadiusInfoBase {
|
|
16
|
+
value?: Item | Doodad;
|
|
17
|
+
scareRadius: IScareRadius;
|
|
18
|
+
}
|
|
19
|
+
export default function ({ value, scareRadius }: IScareRadiusInfoBase): LabelledValue | undefined;
|
|
@@ -46,6 +46,7 @@ export default class ItemInspection extends Inspection<ItemType | ItemTypeExtra>
|
|
|
46
46
|
protected onTickEnd(): void;
|
|
47
47
|
private updatePosition;
|
|
48
48
|
private getDescription;
|
|
49
|
+
private getNoteDescription;
|
|
49
50
|
private getCapacity;
|
|
50
51
|
private getDoodadUses;
|
|
51
52
|
private getMapIsland;
|
|
@@ -1948,4 +1948,6 @@ export declare enum ItemMovementResultFlag {
|
|
|
1948
1948
|
MovedAndDamaged = 64,
|
|
1949
1949
|
RemovedItem = 128
|
|
1950
1950
|
}
|
|
1951
|
+
export declare const ITEM_GROUP_HIDE_CONDITIONS: Array<(item: Item, group: ItemTypeGroup) => boolean>;
|
|
1952
|
+
export declare function getCraftingAptitudeMultiplier(craftingAptitudeBonus: number | undefined): number;
|
|
1951
1953
|
export {};
|
|
@@ -12,7 +12,7 @@ import { TileUpdateType } from "@wayward/game/game/IGame";
|
|
|
12
12
|
import type { IHasQuality, IObject, IObjectOptions, IQualityEvents } from "@wayward/game/game/IObject";
|
|
13
13
|
import { Quality } from "@wayward/game/game/IObject";
|
|
14
14
|
import type Doodad from "@wayward/game/game/doodad/Doodad";
|
|
15
|
-
import type { IDoodadDescription } from "@wayward/game/game/doodad/IDoodad";
|
|
15
|
+
import type { DoodadType, IDoodadDescription } from "@wayward/game/game/doodad/IDoodad";
|
|
16
16
|
import type Entity from "@wayward/game/game/entity/Entity";
|
|
17
17
|
import type { IEntityMovableEvents } from "@wayward/game/game/entity/EntityMovable";
|
|
18
18
|
import EntityMovable from "@wayward/game/game/entity/EntityMovable";
|
|
@@ -54,6 +54,18 @@ import Debug from "@wayward/game/utilities/dev/Debug";
|
|
|
54
54
|
import type { Direction } from "@wayward/game/utilities/math/Direction";
|
|
55
55
|
import type { IVector3 } from "@wayward/game/utilities/math/IVector";
|
|
56
56
|
import type { IEventEmitter } from "@wayward/utilities/event/EventEmitter";
|
|
57
|
+
export interface IItemAttackContributionBreakdown {
|
|
58
|
+
baseDamage: number;
|
|
59
|
+
qualityBonus: number;
|
|
60
|
+
magicalBonus: number;
|
|
61
|
+
total: number;
|
|
62
|
+
}
|
|
63
|
+
export interface IItemBaseDefenseContributionBreakdown {
|
|
64
|
+
baseDefense: number;
|
|
65
|
+
qualityBonus: number;
|
|
66
|
+
magicalBonus: number;
|
|
67
|
+
total: number;
|
|
68
|
+
}
|
|
57
69
|
type ItemMagicEvents = {
|
|
58
70
|
[EVENT in keyof IMagicalPropertyManagerEvents as `magic${Capitalize<EVENT>}`]: IMagicalPropertyManagerEvents[EVENT];
|
|
59
71
|
};
|
|
@@ -119,6 +131,7 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
|
|
|
119
131
|
holderReference?: Reference<ReferenceType.Player | ReferenceType.NPC>;
|
|
120
132
|
magic?: MagicalPropertyManager;
|
|
121
133
|
map?: ItemMapManager;
|
|
134
|
+
note?: string;
|
|
122
135
|
protected?: boolean;
|
|
123
136
|
quality?: Quality;
|
|
124
137
|
sort?: ContainerSort;
|
|
@@ -138,7 +151,8 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
|
|
|
138
151
|
offsetY?: number;
|
|
139
152
|
[SYMBOL_CONTAINER_CACHED_REFERENCE]?: ContainerReference;
|
|
140
153
|
private _movementOptions?;
|
|
141
|
-
constructor(itemType?: ItemType | undefined, islandId?: IslandId, quality?: Quality, human?: Human, magicalLootType?: MagicalLootType);
|
|
154
|
+
constructor(itemType?: ItemType | undefined, islandId?: IslandId, quality?: Quality, human?: Human, magicalLootType?: MagicalLootType, clientSide?: boolean);
|
|
155
|
+
private setup;
|
|
142
156
|
get asCorpse(): undefined;
|
|
143
157
|
get asCreature(): undefined;
|
|
144
158
|
get asDoodad(): undefined;
|
|
@@ -171,7 +185,9 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
|
|
|
171
185
|
getDisplayItem(): DisplayableItemType;
|
|
172
186
|
isContainer(): this is Item & IContainer;
|
|
173
187
|
isWithin(container?: IContainer): boolean;
|
|
188
|
+
get builtDoodadType(): DoodadType | undefined;
|
|
174
189
|
get builtDescription(): IDoodadDescription | undefined;
|
|
190
|
+
get builtAndLitDescription(): IDoodadDescription | undefined;
|
|
175
191
|
get placeDownDescription(): IDoodadDescription | undefined;
|
|
176
192
|
countTradesWith(human?: Human): number;
|
|
177
193
|
/**
|
|
@@ -257,9 +273,10 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
|
|
|
257
273
|
* Note: This is not called by clients joining a mp game.
|
|
258
274
|
*/
|
|
259
275
|
verifyAndFixItem(): void;
|
|
276
|
+
private pipingMagic;
|
|
260
277
|
protected pipeMagicalPropertyManagerEvents(magic: MagicalPropertyManager): void;
|
|
261
278
|
protected onMagicSet(type: MagicalPropertyType, subType?: MagicalSubPropertySubTypes, value?: number, previousValue?: number, curse?: true): void;
|
|
262
|
-
protected onMagicRemove(type: MagicalPropertyType
|
|
279
|
+
protected onMagicRemove(type: MagicalPropertyType): void;
|
|
263
280
|
verifyAndFixMagic(): void;
|
|
264
281
|
/**
|
|
265
282
|
* @param source A string representing the reason for this damage. Used for multiplayer debugging. Just put a unique string of characters here
|
|
@@ -323,15 +340,22 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
|
|
|
323
340
|
rerollMagicalProperty(type: MagicalPropertyType, subType?: MagicalSubPropertySubTypes): boolean;
|
|
324
341
|
rerollMagicalPropertyValues(): void;
|
|
325
342
|
initializeMagicalPropertyManager(): MagicalPropertyManager;
|
|
326
|
-
protected updateDurabilityForPersistence(type: MagicalPropertyType, value?: number): void;
|
|
327
|
-
protected clampDecayToMax(type: MagicalPropertyType
|
|
343
|
+
protected updateDurabilityForPersistence(type: MagicalPropertyType, value?: number, previousValue?: number, curse?: true): void;
|
|
344
|
+
protected clampDecayToMax(type: MagicalPropertyType): void;
|
|
328
345
|
protected clampDurabilityToMax(type: MagicalPropertyType): void;
|
|
329
|
-
|
|
346
|
+
/**
|
|
347
|
+
* Adds a randomised magical property of the given type.
|
|
348
|
+
* @param valueType If provided, instead of random, either use the "min" or "max" value for the property. (Not the expandable max!)
|
|
349
|
+
* This param being provided does not stop the seeded generator from being advanced in the normal way.
|
|
350
|
+
* @param cursed If provided, overrides the random curse chance with a guaranteed state.
|
|
351
|
+
*/
|
|
352
|
+
addMagicalProperty(type: MagicalPropertyType, subType?: MagicalSubPropertySubTypes, valueType?: "min" | "max", cursed?: boolean): boolean;
|
|
330
353
|
getMagicalPropertyInfo(type: MagicalPropertyType): IMagicalPropertyInfo | undefined;
|
|
331
354
|
acquireNotify(human: Human, context?: ActionContext): void;
|
|
332
355
|
getStokeFireValue(): number | undefined;
|
|
333
356
|
getStokeFireBonusValue(): number;
|
|
334
357
|
getOnUseBonus(): number;
|
|
358
|
+
getAttackContributionBreakdown(type: "attack" | "ranged"): IItemAttackContributionBreakdown;
|
|
335
359
|
getAttackDamage(type: AttackType.MeleeWeapon | AttackType.RangedWeapon): number;
|
|
336
360
|
/**
|
|
337
361
|
* Gets the worth of an item used for merchant trading. Does not consider bartering or modifiers bonuses; use Item.getTraderSellPrice for that.
|
|
@@ -343,10 +367,11 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
|
|
|
343
367
|
* Checks to see if the item is in a fire/hot thing
|
|
344
368
|
*/
|
|
345
369
|
canBurnPlayer(): boolean;
|
|
370
|
+
getEffectiveBaseDefenseBreakdown(): IItemBaseDefenseContributionBreakdown;
|
|
346
371
|
/**
|
|
347
|
-
* Get the base defense of an item plus its magical defense
|
|
372
|
+
* Get the base defense of an item plus its quality and magical defense bonuses.
|
|
348
373
|
*/
|
|
349
|
-
|
|
374
|
+
getDefense(): number;
|
|
350
375
|
/**
|
|
351
376
|
* Returns the durability of the item based on the max durability to be used as a pseudo "charge"
|
|
352
377
|
*/
|
|
@@ -495,6 +520,7 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
|
|
|
495
520
|
* @returns true if bonusDefense/Attack was set.
|
|
496
521
|
*/
|
|
497
522
|
setAttackDefenseBonus(): boolean;
|
|
523
|
+
getBaseAttack(): number;
|
|
498
524
|
/**
|
|
499
525
|
* Gets the attack damage with its bonus value.
|
|
500
526
|
* Note: This does not get the value with any magical properties applied.
|
|
@@ -507,10 +533,14 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
|
|
|
507
533
|
* @returns number The ranged attack value with bonus applied.
|
|
508
534
|
*/
|
|
509
535
|
getRangedAttackWithBonus(): number;
|
|
536
|
+
/**
|
|
537
|
+
* @returns The base defense value.
|
|
538
|
+
*/
|
|
539
|
+
getBaseDefense(): number;
|
|
510
540
|
/**
|
|
511
541
|
* Gets the base defense with its bonus value.
|
|
512
542
|
* Note: This does not get the value with any magical properties applied.
|
|
513
|
-
* @returns
|
|
543
|
+
* @returns The base defense value with bonus applied.
|
|
514
544
|
*/
|
|
515
545
|
getBaseDefenseWithBonus(): number;
|
|
516
546
|
/**
|
|
@@ -234,7 +234,11 @@ export default class ItemManager extends EntityManager<Item, IItemRemoveOptions>
|
|
|
234
234
|
static getDisassemblyComponentsAsItemTypes(description: IItemDescription): Array<ItemType | ItemTypeGroup>;
|
|
235
235
|
getWeightCapacity(container?: IContainer, includeMagic?: boolean): number | undefined;
|
|
236
236
|
create(itemType: ItemType | ItemTypeGroup | Array<ItemType | ItemTypeGroup>, container: IContainer | undefined, quality?: Quality, human?: Human, context?: ActionContext, magicalLootType?: MagicalLootType): Item;
|
|
237
|
+
/**
|
|
238
|
+
* Note: NOT UI-safe. Use `createClientside`. This should be named `createTemplate` probably
|
|
239
|
+
*/
|
|
237
240
|
createFake(itemType: ItemType | ItemTypeGroup | Array<ItemType | ItemTypeGroup>, quality?: Quality, human?: Human, magicalLootType?: MagicalLootType): Item;
|
|
241
|
+
createClientside(item: ItemType, quality?: Quality, human?: Human, magicalLootType?: MagicalLootType): Item;
|
|
238
242
|
getContainedContainers(container: IContainer): IContainer[];
|
|
239
243
|
computeContainerWeight(container: IContainer): number;
|
|
240
244
|
getMagicalWeightCapacity(container: IContainer): number;
|
|
@@ -281,6 +285,7 @@ export default class ItemManager extends EntityManager<Item, IItemRemoveOptions>
|
|
|
281
285
|
getItemTypeGroupName(itemType: ItemType | ItemTypeGroup, article?: Article, count?: number): Translation;
|
|
282
286
|
getGroupDefault(itemGroup: ItemTypeGroup, weightType?: WeightType, ancestorGroups?: ItemTypeGroup[]): ItemType;
|
|
283
287
|
getGroups(itemType: ItemType): ItemTypeGroup[];
|
|
288
|
+
getVisibleGroups(item: Item): ItemTypeGroup[];
|
|
284
289
|
getPlayerFromInventoryContainer(containable: IContainable): Player | undefined;
|
|
285
290
|
getRandomQuality(bonusQuality?: number, relicChance?: boolean, tile?: Tile): Quality;
|
|
286
291
|
hasAdditionalRequirements(actionOrHuman: IActionHandlerApi<Human> | Human, craftType: ItemType, actionNotUsableMessage?: Message, isRepairOrDisassembly?: boolean): IRequirementInfo;
|
|
@@ -34,6 +34,7 @@ export interface IMagicalSubProperty<T extends number> {
|
|
|
34
34
|
export type MagicalProperty<T extends MagicalPropertyType> = MagicalPropertyTypeSubTypeMap extends Record<T, any> ? IMagicalSubProperty<MagicalPropertyTypeSubTypeMap[T]> : IMagicalProperty;
|
|
35
35
|
export interface MagicalNormalPropertyEntry {
|
|
36
36
|
type: MagicalNormalPropertyTypes;
|
|
37
|
+
/** @deprecated This value is raw, unaffected if this is a curse property! */
|
|
37
38
|
value: number;
|
|
38
39
|
curse?: true;
|
|
39
40
|
}
|
|
@@ -41,6 +42,7 @@ export type MagicalSubPropertyEntry = {
|
|
|
41
42
|
[K in MagicalSubPropertyTypes]: {
|
|
42
43
|
type: K;
|
|
43
44
|
subType: MagicalPropertyTypeSubTypeMap[K];
|
|
45
|
+
/** @deprecated This value is raw, unaffected if this is a curse property! */
|
|
44
46
|
value: number;
|
|
45
47
|
curse?: true;
|
|
46
48
|
};
|
|
@@ -53,6 +55,7 @@ export declare namespace MagicalPropertyEntry {
|
|
|
53
55
|
export interface MagicalPropertyEntryIntersection {
|
|
54
56
|
type: MagicalPropertyType;
|
|
55
57
|
subType?: MagicalSubPropertySubTypes;
|
|
58
|
+
/** @deprecated This value is raw, unaffected if this is a curse property! */
|
|
56
59
|
value: number;
|
|
57
60
|
curse?: true;
|
|
58
61
|
}
|