@wayward/types 2.13.0-beta.dev.20230401.1 → 2.13.0-beta.dev.20230403.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/Game.d.ts +1 -0
- package/definitions/game/game/entity/EntityMovable.d.ts +2 -1
- package/definitions/game/game/entity/Human.d.ts +9 -4
- package/definitions/game/game/entity/IEntity.d.ts +16 -1
- package/definitions/game/game/entity/IHuman.d.ts +5 -2
- package/definitions/game/game/entity/action/ActionsRegistration.d.ts +2 -2
- package/definitions/game/game/entity/action/actions/Build.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/PlaceDown.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/helper/TreasureGathering.d.ts +3 -3
- package/definitions/game/game/entity/creature/ICreature.d.ts +1 -0
- package/definitions/game/game/entity/player/IPlayer.d.ts +2 -1
- package/definitions/game/game/inspection/InfoProvider.d.ts +1 -1
- package/definitions/game/game/inspection/InspectionTypeMap.d.ts +2 -2
- package/definitions/game/game/inspection/infoProviders/creature/ResistancesAndVulnerabilities.d.ts +4 -3
- package/definitions/game/game/island/IIsland.d.ts +4 -0
- package/definitions/game/game/island/Island.d.ts +0 -4
- package/definitions/game/game/milestones/IMilestone.d.ts +2 -1
- package/definitions/game/game/milestones/MilestoneManager.d.ts +4 -0
- package/definitions/game/game/options/modifiers/GameplayModifier.d.ts +4 -1
- package/definitions/game/game/options/modifiers/milestone/MilestoneModifier.d.ts +2 -2
- package/definitions/game/game/options/modifiers/milestone/modifiers/Multidisciplined.d.ts +32 -0
- package/definitions/game/game/options/modifiers/milestone/modifiers/Retailer.d.ts +0 -2
- package/definitions/game/language/Dictionary.d.ts +2 -2
- package/definitions/game/language/DictionaryMap.d.ts +4 -4
- package/definitions/game/language/dictionary/Message.d.ts +317 -316
- package/definitions/game/language/dictionary/UiTranslation.d.ts +721 -715
- package/definitions/game/renderer/IRenderer.d.ts +53 -53
- package/definitions/game/renderer/particle/ParticleRenderer1.d.ts +2 -1
- package/definitions/game/renderer/particle/ParticleRenderer2.d.ts +2 -1
- package/definitions/game/renderer/spriteBatch/SpriteBatch1.d.ts +1 -0
- package/definitions/game/renderer/spriteBatch/SpriteBatch2.d.ts +1 -0
- package/definitions/game/renderer/spriteBatch/SpriteBatchBase.d.ts +1 -0
- package/definitions/game/renderer/tile/TileLayer.d.ts +4 -0
- package/definitions/game/renderer/world/IWorldLayerRenderer.d.ts +0 -1
- package/definitions/game/renderer/world/World.d.ts +1 -1
- package/definitions/game/ui/old/IOldUi.d.ts +2 -1
- package/definitions/game/ui/old/screens/InGameScreen.d.ts +3 -0
- package/definitions/game/ui/screen/screens/game/component/TileInspectionsList.d.ts +1 -1
- package/package.json +1 -1
|
@@ -55,6 +55,7 @@ export declare class Game extends EventEmitter.Host<IGameEvents> {
|
|
|
55
55
|
private difficultyOptions;
|
|
56
56
|
customMilestoneModifiersAllowed: boolean;
|
|
57
57
|
difficulty: GameMode;
|
|
58
|
+
gameplayModifierData: Record<number, any>;
|
|
58
59
|
replay: ReplayManager | undefined;
|
|
59
60
|
saveVersion: string;
|
|
60
61
|
shouldUpdateTablesAndWeight: boolean;
|
|
@@ -12,6 +12,7 @@ import type { SfxType } from "audio/IAudio";
|
|
|
12
12
|
import type { IEventEmitter } from "event/EventEmitter";
|
|
13
13
|
import Entity from "game/entity/Entity";
|
|
14
14
|
import type { IEntityConstructorOptions, IEntityEvents, IMoveToOptions } from "game/entity/IEntity";
|
|
15
|
+
import { MoveFlag } from "game/entity/IEntity";
|
|
15
16
|
import { DamageType, MoveType } from "game/entity/IEntity";
|
|
16
17
|
import { MovingClientSide } from "game/entity/IHuman";
|
|
17
18
|
import type { IMovementTime } from "game/IGame";
|
|
@@ -34,7 +35,7 @@ export interface IEntityMovableEvents extends IEntityEvents {
|
|
|
34
35
|
/**
|
|
35
36
|
* Called after moving.
|
|
36
37
|
*/
|
|
37
|
-
postMove(fromTile: Tile, toTile: Tile): void;
|
|
38
|
+
postMove(fromTile: Tile, toTile: Tile, flags: MoveFlag): void;
|
|
38
39
|
}
|
|
39
40
|
/**
|
|
40
41
|
* Entity class that allows movement
|
|
@@ -12,9 +12,10 @@ import type { IEventEmitter } from "event/EventEmitter";
|
|
|
12
12
|
import Doodad from "game/doodad/Doodad";
|
|
13
13
|
import type Creature from "game/entity/creature/Creature";
|
|
14
14
|
import type { IDamageInfo } from "game/entity/creature/ICreature";
|
|
15
|
+
import { CreatureType } from "game/entity/creature/ICreature";
|
|
15
16
|
import EntityWithStats from "game/entity/EntityWithStats";
|
|
16
17
|
import type { IAttack, ICausesDamage, IEntityConstructorOptions } from "game/entity/IEntity";
|
|
17
|
-
import { AttackType, IStatChangeInfo, StatusEffectChangeReason, StatusType } from "game/entity/IEntity";
|
|
18
|
+
import { AttackType, DamageType, IStatChangeInfo, StatusEffectChangeReason, StatusType } from "game/entity/IEntity";
|
|
18
19
|
import type { ICheckUnderOptions, ICrafted, ICustomizations, IHumanEvents, ILoadOnIslandOptions, IRestData, IVoyageInfo } from "game/entity/IHuman";
|
|
19
20
|
import { EquipType, RestCancelReason, SkillType } from "game/entity/IHuman";
|
|
20
21
|
import type { IStat } from "game/entity/IStats";
|
|
@@ -115,7 +116,7 @@ export default abstract class Human<TypeType extends number = number> extends En
|
|
|
115
116
|
* Flag that will prevent a humans vehicle from showing up until the movement finishews
|
|
116
117
|
*/
|
|
117
118
|
isMovingSuppressVehicleClientside: boolean;
|
|
118
|
-
protected readonly milestonesCollection: import("../options/modifiers/GameplayModifiersManager").GameplayModifiersCollection<import("../options/modifiers/milestone/MilestoneModifier").default, Milestone, import("../options/modifiers/milestone/MilestoneModifier").MilestoneModifierInstance
|
|
119
|
+
protected readonly milestonesCollection: import("../options/modifiers/GameplayModifiersManager").GameplayModifiersCollection<import("../options/modifiers/milestone/MilestoneModifier").default, Milestone, import("../options/modifiers/milestone/MilestoneModifier").MilestoneModifierInstance<any>, [(Human<number> | undefined)?]>;
|
|
119
120
|
protected gameOptionsCached?: IGameOptionsPlayer;
|
|
120
121
|
protected cachedMovementPenalty?: number;
|
|
121
122
|
constructor(entityOptions?: IEntityConstructorOptions<TypeType>);
|
|
@@ -123,7 +124,7 @@ export default abstract class Human<TypeType extends number = number> extends En
|
|
|
123
124
|
abstract createNoteManager(): INoteManager;
|
|
124
125
|
abstract createMessageManager(): IMessageManager;
|
|
125
126
|
abstract createQuestManager(): IQuestManager;
|
|
126
|
-
abstract addMilestone(milestone: Milestone, data?: number, update?: boolean): void;
|
|
127
|
+
abstract addMilestone(milestone: Milestone, data?: number | string, update?: boolean): void;
|
|
127
128
|
createSkillManager(): SkillManager;
|
|
128
129
|
isLocalPlayer(): boolean;
|
|
129
130
|
getGameOptionsBeforeModifiers(): IGameOptionsPlayer;
|
|
@@ -249,7 +250,7 @@ export default abstract class Human<TypeType extends number = number> extends En
|
|
|
249
250
|
unequip(item: Item, internal?: boolean, skipMessage?: boolean, skipRevertItem?: boolean): void;
|
|
250
251
|
private updateOffHandState;
|
|
251
252
|
unequipAll(): void;
|
|
252
|
-
|
|
253
|
+
getJumpTile(): Tile | undefined;
|
|
253
254
|
hasDelay(): boolean;
|
|
254
255
|
addDelay(delay: number, replace?: boolean, addStaminaDelay?: boolean): void;
|
|
255
256
|
/**
|
|
@@ -384,6 +385,10 @@ export default abstract class Human<TypeType extends number = number> extends En
|
|
|
384
385
|
* Gets this human's current carried weight, scaled down to what it would be without any weight bonuses applied
|
|
385
386
|
*/
|
|
386
387
|
getScaledWeight(): number;
|
|
388
|
+
hasDiscoveredVulnOrResist(creatureType: CreatureType, damageType: DamageType): boolean;
|
|
389
|
+
discoverVulnOrResist(creatureType: CreatureType, damageType: DamageType): void;
|
|
390
|
+
getDiscoveredVulnsAndResists(): Map<CreatureType, Set<DamageType>>;
|
|
391
|
+
getDiscoveredVulnsAndResists(creatureType: CreatureType): Set<DamageType>;
|
|
387
392
|
get asCorpse(): undefined;
|
|
388
393
|
get asCreature(): undefined;
|
|
389
394
|
get asDoodad(): undefined;
|
|
@@ -220,12 +220,16 @@ export declare enum DamageType {
|
|
|
220
220
|
export declare module DamageType {
|
|
221
221
|
function getAll(...damageTypes: DamageType[]): DamageType[];
|
|
222
222
|
}
|
|
223
|
+
export declare const RESIST_IMMUNITY = 99;
|
|
224
|
+
export declare const RESIST_REGEN = 100;
|
|
223
225
|
export declare class Defense {
|
|
224
226
|
base: number;
|
|
225
227
|
resist: Attributes;
|
|
226
228
|
vulnerable: Attributes;
|
|
227
229
|
constructor(base: number);
|
|
228
230
|
setResistance(damageTypes: DamageType, amount: number): this;
|
|
231
|
+
setImmunity(damageTypes: DamageType): this;
|
|
232
|
+
setRegen(damageTypes: DamageType): this;
|
|
229
233
|
setVulnerability(damageTypes: DamageType, amount: number): this;
|
|
230
234
|
copy(): Defense;
|
|
231
235
|
equals(defense: Defense): boolean;
|
|
@@ -239,7 +243,7 @@ declare class AttributesImpl {
|
|
|
239
243
|
reset(amount?: number): void;
|
|
240
244
|
all(): [DamageType, number][];
|
|
241
245
|
types(): DamageType[];
|
|
242
|
-
has(): boolean;
|
|
246
|
+
has(type?: DamageType): boolean;
|
|
243
247
|
copy(): Attributes;
|
|
244
248
|
equals(attrs: Attributes): boolean;
|
|
245
249
|
}
|
|
@@ -276,9 +280,20 @@ export interface IMoveToOptions {
|
|
|
276
280
|
movementDelay?: Delay | number;
|
|
277
281
|
animation?: MoveAnimation;
|
|
278
282
|
onMoveCompletedParticles?: IRGB;
|
|
283
|
+
/**
|
|
284
|
+
* What caused the move?
|
|
285
|
+
*/
|
|
286
|
+
flags?: MoveFlag;
|
|
279
287
|
}
|
|
280
288
|
export declare enum MoveAnimation {
|
|
281
289
|
Normal = 0,
|
|
282
290
|
Jump = 1
|
|
283
291
|
}
|
|
292
|
+
export declare enum MoveFlag {
|
|
293
|
+
None = 0,
|
|
294
|
+
/**
|
|
295
|
+
* Skips damage due to movement
|
|
296
|
+
*/
|
|
297
|
+
SkipEncumberedChecks = 1
|
|
298
|
+
}
|
|
284
299
|
export {};
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
import type { Events } from "event/EventEmitter";
|
|
12
12
|
import type Doodad from "game/doodad/Doodad";
|
|
13
13
|
import type { ActionType } from "game/entity/action/IAction";
|
|
14
|
-
import type { IDamageInfo } from "game/entity/creature/ICreature";
|
|
14
|
+
import type { CreatureType, IDamageInfo } from "game/entity/creature/ICreature";
|
|
15
15
|
import type EntityWithStats from "game/entity/EntityWithStats";
|
|
16
16
|
import type Human from "game/entity/Human";
|
|
17
|
-
import type { AttackType } from "game/entity/IEntity";
|
|
17
|
+
import type { AttackType, DamageType } from "game/entity/IEntity";
|
|
18
18
|
import type { IMovementIntent, WeightStatus } from "game/entity/player/IPlayer";
|
|
19
19
|
import type { ISkillEvents } from "game/entity/skill/SkillManager";
|
|
20
20
|
import type { IHasImagePath, Quality } from "game/IObject";
|
|
@@ -255,6 +255,9 @@ export interface IHumanEvents extends Events<EntityWithStats>, ISkillEvents {
|
|
|
255
255
|
* @param tile Tile the human is now on
|
|
256
256
|
*/
|
|
257
257
|
setPosition(tile: Tile): void;
|
|
258
|
+
discoverVulnOrResist(creatureType: CreatureType, damageType: DamageType): any;
|
|
259
|
+
hasDiscoveredVulnOrResist(creatureType: CreatureType, damageType: DamageType, defaultState: boolean): boolean | undefined;
|
|
260
|
+
getDiscoveredVulnsAndResists(): Map<CreatureType, Set<DamageType>>;
|
|
258
261
|
}
|
|
259
262
|
export interface IHairstyleDescription extends IModdable, IHasImagePath {
|
|
260
263
|
name: string;
|
|
@@ -19,7 +19,7 @@ export declare const actionDescriptionsSlow: {
|
|
|
19
19
|
75: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default<number>, void, import("./actions/ConsumeItem").IConsumeItemCanUse, [import("../../item/Item").default]>;
|
|
20
20
|
78: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default<number>, void, import("game/entity/action/actions/AttachContainer").IAttachContainerCanUse, [import("../../item/Item").default]>;
|
|
21
21
|
3: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.AttackType, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/Attack").IAttackCanUse, [(import("../../item/Item").default | undefined)?, (import("../IEntity").AttackType | undefined)?, (import("../../item/Item").default | undefined)?]>;
|
|
22
|
-
28: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby, [import("game/entity/action/IAction").ActionArgument.
|
|
22
|
+
28: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby, [import("game/entity/action/IAction").ActionArgument.Tile, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/Build").IBuildCanUse, [import("../../item/Item").default, (import("../../tile/Tile").default | undefined)?]>;
|
|
23
23
|
5: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/Butcher").IButcherCanUse, [import("../../item/Item").default]>;
|
|
24
24
|
120: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/CageCreature").ICageCreature, [import("../../item/Item").default]>;
|
|
25
25
|
16: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/Cast").ICastCanUse, [import("../../item/Item").default]>;
|
|
@@ -91,7 +91,7 @@ export declare const actionDescriptionsSlow: {
|
|
|
91
91
|
54: import("./Action").Action<[], import("../Human").default<number>, void, import("game/entity/action/actions/PickUpAllItems").IPickUpAllItemsCanUse, []>;
|
|
92
92
|
81: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/PickUpExcrement").IPickUpExcrementCanUse, [(import("../../item/Item").default | undefined)?]>;
|
|
93
93
|
53: import("./Action").Action<[], import("../Human").default<number>, void, import("game/entity/action/IAction").IActionUsable, []>;
|
|
94
|
-
74: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby, [import("game/entity/action/IAction").ActionArgument.
|
|
94
|
+
74: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby, [import("game/entity/action/IAction").ActionArgument.Tile, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/Build").IBuildCanUse, [import("../../item/Item").default, (import("../../tile/Tile").default | undefined)?]>;
|
|
95
95
|
25: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/Plant").IPlantCanUse, [import("../../item/Item").default]>;
|
|
96
96
|
24: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default<number>, void, import("game/entity/action/actions/Pour").IPourCanUse, [import("../../item/Item").default]>;
|
|
97
97
|
41: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default<number>, void, import("game/entity/action/actions/PourOnYourself").IPourOnYourselfCanUse, [import("../../item/Item").default]>;
|
|
@@ -18,5 +18,5 @@ export interface IBuildCanUse extends IActionUsable {
|
|
|
18
18
|
tile: Tile;
|
|
19
19
|
buildInfo: IItemBuild;
|
|
20
20
|
}
|
|
21
|
-
declare const _default: Action<[ActionArgument.ItemNearby, [ActionArgument.
|
|
21
|
+
declare const _default: Action<[ActionArgument.ItemNearby, [ActionArgument.Tile, ActionArgument.Undefined]], import("../../Human").default<number>, void, IBuildCanUse, [import("../../../item/Item").default, (Tile | undefined)?]>;
|
|
22
22
|
export default _default;
|
|
@@ -8,5 +8,5 @@
|
|
|
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
|
-
declare const _default: import("../Action").Action<[import("../IAction").ActionArgument.ItemNearby, [import("../IAction").ActionArgument.
|
|
11
|
+
declare const _default: import("../Action").Action<[import("../IAction").ActionArgument.ItemNearby, [import("../IAction").ActionArgument.Tile, import("../IAction").ActionArgument.Undefined]], import("../../Human").default<number>, void, import("game/entity/action/actions/Build").IBuildCanUse, [import("../../../item/Item").default, (import("../../../tile/Tile").default | undefined)?]>;
|
|
12
12
|
export default _default;
|
|
@@ -13,7 +13,7 @@ import type Human from "game/entity/Human";
|
|
|
13
13
|
import type Item from "game/item/Item";
|
|
14
14
|
import type DrawnMap from "game/mapping/DrawnMap";
|
|
15
15
|
import type { ITreasure } from "game/mapping/DrawnMap";
|
|
16
|
-
import type
|
|
16
|
+
import type Tile from "game/tile/Tile";
|
|
17
17
|
declare namespace TreasureGathering {
|
|
18
18
|
interface IGatherable {
|
|
19
19
|
map: DrawnMap;
|
|
@@ -21,7 +21,7 @@ declare namespace TreasureGathering {
|
|
|
21
21
|
toolRange?: number;
|
|
22
22
|
maxRange?: number;
|
|
23
23
|
treasure: ITreasure;
|
|
24
|
-
|
|
24
|
+
gatherPointTile: Tile;
|
|
25
25
|
}
|
|
26
26
|
enum GatherablesResult {
|
|
27
27
|
Blocked = 0,
|
|
@@ -40,7 +40,7 @@ declare namespace TreasureGathering {
|
|
|
40
40
|
}
|
|
41
41
|
interface IGatherResult {
|
|
42
42
|
result: Result;
|
|
43
|
-
|
|
43
|
+
tile?: Tile;
|
|
44
44
|
treasure?: ITreasure;
|
|
45
45
|
}
|
|
46
46
|
function gather(action: IActionHandlerApi<Human>, itemRange: number, requireMap: boolean, tool?: Item, canGather?: ICanGather): IGatherResult;
|
|
@@ -76,7 +76,7 @@ export declare abstract class InfoProvider extends EventEmitter.Host<IInfoProvid
|
|
|
76
76
|
static subtitle(...translations: Array<TranslationGenerator | undefined>): SimpleInfoProvider;
|
|
77
77
|
static description(...translations: Array<TranslationGenerator | undefined>): SimpleInfoProvider;
|
|
78
78
|
static text(...translations: Array<TranslationGenerator | undefined>): SimpleInfoProvider;
|
|
79
|
-
static list(...translations: Array<TranslationGenerator | undefined>): SimpleInfoProvider;
|
|
79
|
+
static list(...translations: Array<InfoProvider | TranslationGenerator | undefined>): SimpleInfoProvider;
|
|
80
80
|
static ofComponent(componentSupplier: () => Component): InfoProvider;
|
|
81
81
|
private displayLevel?;
|
|
82
82
|
protected component?: Component;
|
|
@@ -29,7 +29,7 @@ import SkillInspection from "game/inspection/inspections/SkillInspection";
|
|
|
29
29
|
import StatInspection from "game/inspection/inspections/StatInspection";
|
|
30
30
|
import TileEventInspection from "game/inspection/inspections/TileEventInspection";
|
|
31
31
|
import TileInspection from "game/inspection/inspections/TileInspection";
|
|
32
|
-
import type
|
|
32
|
+
import type Tile from "game/tile/Tile";
|
|
33
33
|
declare const inspectionTypeMap: {
|
|
34
34
|
12: typeof ActionInspection;
|
|
35
35
|
14: typeof CorpseInspection;
|
|
@@ -56,7 +56,7 @@ declare const inspectionTypeMap: {
|
|
|
56
56
|
};
|
|
57
57
|
export type InspectionClass = Class<Inspection<any>> & {
|
|
58
58
|
isWorldInspection?(inspectType: InspectType): boolean;
|
|
59
|
-
getFromTile?(
|
|
59
|
+
getFromTile?(tile: Tile, context: InfoProviderContext, inspectType: InspectType): ArrayOr<Inspection<any>>;
|
|
60
60
|
/**
|
|
61
61
|
* Whether or not this inspection class can handle the given arguments.
|
|
62
62
|
* @param args A list of arguments that an inspection can be provided
|
package/definitions/game/game/inspection/infoProviders/creature/ResistancesAndVulnerabilities.d.ts
CHANGED
|
@@ -9,15 +9,16 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type Creature from "game/entity/creature/Creature";
|
|
12
|
-
import type {
|
|
12
|
+
import type { CreatureType } from "game/entity/creature/ICreature";
|
|
13
|
+
import type Human from "game/entity/Human";
|
|
13
14
|
import { InfoDisplayLevel } from "game/inspection/IInfoProvider";
|
|
14
15
|
import { InfoProvider } from "game/inspection/InfoProvider";
|
|
15
16
|
import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
|
|
16
|
-
import Translation from "language/Translation";
|
|
17
17
|
import type { TranslationGenerator } from "ui/component/IComponent";
|
|
18
18
|
export default class ResistancesAndVulnerabilitiesInfoProvider extends InfoProvider {
|
|
19
19
|
private readonly creature;
|
|
20
|
-
static
|
|
20
|
+
static get(creatureType: CreatureType, human?: Human): import("game/inspection/InfoProvider").SimpleInfoProvider;
|
|
21
|
+
private static translateVulnOrResist;
|
|
21
22
|
constructor(creature: Creature);
|
|
22
23
|
getClass(): string[];
|
|
23
24
|
getDefaultDisplayLevel(): InfoDisplayLevel;
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
import type { BiomeType } from "game/biome/IBiome";
|
|
12
12
|
import type Doodad from "game/doodad/Doodad";
|
|
13
13
|
import type Creature from "game/entity/creature/Creature";
|
|
14
|
+
import type { CreatureType, IDamageOutcome, IDamageOutcomeInput } from "game/entity/creature/ICreature";
|
|
14
15
|
import type Human from "game/entity/Human";
|
|
16
|
+
import type { Defense } from "game/entity/IEntity";
|
|
15
17
|
import type NPC from "game/entity/npc/NPC";
|
|
16
18
|
import type { IIslandTemplate, TickFlag, TileUpdateType } from "game/IGame";
|
|
17
19
|
import type { MultiplayerLoadingDescription } from "game/meta/Loading";
|
|
@@ -87,6 +89,8 @@ export interface IIslandEvents {
|
|
|
87
89
|
* @param doodad Doodad that caused the change
|
|
88
90
|
*/
|
|
89
91
|
portsChanged(doodad: Doodad): any;
|
|
92
|
+
getDefense(defense: Defense | undefined, target: Human | Creature | CreatureType): Defense | undefined;
|
|
93
|
+
calculateAttackOutcome(damageOutcome: IDamageOutcome, input: IDamageOutcomeInput, attackValue: number, defenseValue: number): IDamageOutcome | undefined;
|
|
90
94
|
}
|
|
91
95
|
export interface ILegacySeeds {
|
|
92
96
|
type: SeedType.Legacy;
|
|
@@ -172,10 +172,6 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
172
172
|
* @returns The default terrain type with a fallback to dirt (which shouldn't happen without mods or bugs).
|
|
173
173
|
*/
|
|
174
174
|
getDefaultTerrainType(tile: Tile): TerrainType;
|
|
175
|
-
/**
|
|
176
|
-
* Ensures a point is valid and is not the edge of the map
|
|
177
|
-
*/
|
|
178
|
-
ensureValidPoint<T extends IVector2>(point?: T): T | undefined;
|
|
179
175
|
getDirectionFromMovement(x: number, y: number): Direction.East | Direction.North | Direction.West | Direction.South;
|
|
180
176
|
getTileFromPoint(point: IVector3): Tile;
|
|
181
177
|
getTile(x: number, y: number, z: number, disableLog?: boolean): Tile;
|
|
@@ -58,7 +58,8 @@ export declare enum Milestone {
|
|
|
58
58
|
Rouseabout = 46,
|
|
59
59
|
Murderer = 47,
|
|
60
60
|
Retailer = 48,
|
|
61
|
-
Masochist = 49
|
|
61
|
+
Masochist = 49,
|
|
62
|
+
Multidisciplined = 50
|
|
62
63
|
}
|
|
63
64
|
export type ExcludeInternalMilestones<MILESTONE extends Milestone> = PickValueKeys<typeof Milestone, MILESTONE> extends `Internal${string}` ? never : MILESTONE;
|
|
64
65
|
export declare enum MilestoneVisibility {
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import EventEmitter from "event/EventEmitter";
|
|
12
|
+
import type { CreatureType } from "game/entity/creature/ICreature";
|
|
13
|
+
import type { DamageType } from "game/entity/IEntity";
|
|
12
14
|
import type { Game } from "game/Game";
|
|
13
15
|
import { Milestone, MilestoneVisibility } from "game/milestones/IMilestone";
|
|
14
16
|
type IMilestoneUpdate = [Milestone, (number | string)?];
|
|
@@ -48,6 +50,8 @@ export declare class MilestoneManager extends EventEmitter.Host<IMilestoneEvents
|
|
|
48
50
|
isUnlockableInMode(milestone: Milestone, mode?: import("../options/IGameOptions").GameMode): boolean;
|
|
49
51
|
reset(): void;
|
|
50
52
|
getDiscovered(milestone: Milestone): (string | number)[] | undefined;
|
|
53
|
+
getDiscoveredResistsAndVulns(): Map<CreatureType, Set<DamageType>>;
|
|
54
|
+
getDiscoveredResistsAndVulns(creatureType: CreatureType): Set<DamageType>;
|
|
51
55
|
getVisibility(milestone: Milestone): MilestoneVisibility;
|
|
52
56
|
isDiscovered(milestone: Milestone, data: number | string): boolean;
|
|
53
57
|
private updateMilestone;
|
|
@@ -14,7 +14,7 @@ import type Translation from "language/Translation";
|
|
|
14
14
|
import { RandomInstance } from "utilities/random/IRandom";
|
|
15
15
|
import type { Random } from "utilities/random/Random";
|
|
16
16
|
import { RandomReference } from "utilities/random/RandomReference";
|
|
17
|
-
export declare abstract class GameplayModifierInstance<ID extends number, INSTANCE_ARGS extends any[] = []> {
|
|
17
|
+
export declare abstract class GameplayModifierInstance<ID extends number, INSTANCE_ARGS extends any[] = [], DATA = any> {
|
|
18
18
|
readonly id: ID;
|
|
19
19
|
readonly random: Random;
|
|
20
20
|
protected readonly args: INSTANCE_ARGS;
|
|
@@ -26,6 +26,9 @@ export declare abstract class GameplayModifierInstance<ID extends number, INSTAN
|
|
|
26
26
|
getTitle(): import("../../../language/impl/TranslationImpl").default;
|
|
27
27
|
protected abstract getDefaultTitle(): Translation;
|
|
28
28
|
setTitle(initializer: (defaultTitle: Translation) => Translation): this;
|
|
29
|
+
getData(): DATA | undefined;
|
|
30
|
+
setData(data?: DATA): this;
|
|
31
|
+
clearData(): this;
|
|
29
32
|
}
|
|
30
33
|
export type GetModifierInstance<MODIFIER extends GameplayModifier<number, GameplayModifierInstance<number, any[]>, any[]>> = MODIFIER extends GameplayModifier<number, infer INSTANCE, any[]> ? INSTANCE : never;
|
|
31
34
|
export type GetModifierId<MODIFIER extends GameplayModifier<number, GameplayModifierInstance<number, any[]>, any[]>> = MODIFIER extends GameplayModifier<infer ID, any, any[]> ? ID : never;
|
|
@@ -27,7 +27,7 @@ export declare enum MilestoneModifierGroup {
|
|
|
27
27
|
Merchants = 10
|
|
28
28
|
}
|
|
29
29
|
export declare const milestoneGroupIcons: Record<MilestoneModifierGroup, string>;
|
|
30
|
-
export declare class MilestoneModifierInstance extends GameplayModifierInstance<Milestone, [Human?]> {
|
|
30
|
+
export declare class MilestoneModifierInstance<DATA = any> extends GameplayModifierInstance<Milestone, [Human?], DATA> {
|
|
31
31
|
protected get player(): Human<number> | undefined;
|
|
32
32
|
isEnabledForPlayer(entity: Entity): boolean;
|
|
33
33
|
protected getDefaultTitle(): import("../../../../language/impl/TranslationImpl").default;
|
|
@@ -45,6 +45,6 @@ export default abstract class MilestoneModifier extends GameplayModifier<Milesto
|
|
|
45
45
|
constructor(id?: Milestone);
|
|
46
46
|
instantiate(id: Milestone, human?: Human): MilestoneModifierInstance | undefined;
|
|
47
47
|
abstract getOptions(): IGameOptionsPartial;
|
|
48
|
-
initialize(instance: MilestoneModifierInstance): MilestoneModifierInstance
|
|
48
|
+
initialize(instance: MilestoneModifierInstance): MilestoneModifierInstance<any>;
|
|
49
49
|
abstract getGroup(): MilestoneModifierGroup;
|
|
50
50
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2011-2021 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 Human from "game/entity/Human";
|
|
12
|
+
import { DamageType, Defense } from "game/entity/IEntity";
|
|
13
|
+
import type Creature from "game/entity/creature/Creature";
|
|
14
|
+
import type { CreatureType, IDamageOutcome, IDamageOutcomeInput } from "game/entity/creature/ICreature";
|
|
15
|
+
import type Player from "game/entity/player/Player";
|
|
16
|
+
import type Island from "game/island/Island";
|
|
17
|
+
import type { Milestone } from "game/milestones/IMilestone";
|
|
18
|
+
import type { IGameOptionsPartial } from "game/options/IGameOptions";
|
|
19
|
+
import MilestoneModifier, { MilestoneModifierGroup, MilestoneModifierInstance } from "game/options/modifiers/milestone/MilestoneModifier";
|
|
20
|
+
export default class Multidisciplined extends MilestoneModifier {
|
|
21
|
+
getOptions(): IGameOptionsPartial;
|
|
22
|
+
getGroup(): MilestoneModifierGroup;
|
|
23
|
+
instantiate(id: Milestone, player?: Player): MultidisciplinedMilestoneModifierInstance | undefined;
|
|
24
|
+
}
|
|
25
|
+
declare class MultidisciplinedMilestoneModifierInstance extends MilestoneModifierInstance<Record<string, Map<CreatureType, Set<DamageType>>>> {
|
|
26
|
+
protected getDefense(island: Island, defense: Defense | undefined, target: Human | Creature | CreatureType): Defense | undefined;
|
|
27
|
+
protected calculateAttackOutcome(island: Island, outcome: IDamageOutcome, input: IDamageOutcomeInput, attackValue: number, defenseValue: number): IDamageOutcome | undefined;
|
|
28
|
+
protected hasDiscoveredVulnOrResist(player: Player, creature: CreatureType, damageType: DamageType): boolean | undefined;
|
|
29
|
+
protected discoverVulnOrResist(player: Player, creature: CreatureType, damageType: DamageType): void;
|
|
30
|
+
protected getDiscoveredVulnsAndResists(player: Player): Map<CreatureType, Set<DamageType>>;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -12,14 +12,12 @@ import type Player from "game/entity/player/Player";
|
|
|
12
12
|
import type { Milestone } from "game/milestones/IMilestone";
|
|
13
13
|
import type { IGameOptionsPartial } from "game/options/IGameOptions";
|
|
14
14
|
import MilestoneModifier, { MilestoneModifierGroup, MilestoneModifierInstance } from "game/options/modifiers/milestone/MilestoneModifier";
|
|
15
|
-
import type { Random } from "utilities/random/Random";
|
|
16
15
|
export default class Retailer extends MilestoneModifier {
|
|
17
16
|
getOptions(): IGameOptionsPartial;
|
|
18
17
|
instantiate(id: Milestone, player?: Player): RetailerMilestoneModifierInstance | undefined;
|
|
19
18
|
getGroup(): MilestoneModifierGroup;
|
|
20
19
|
}
|
|
21
20
|
declare class RetailerMilestoneModifierInstance extends MilestoneModifierInstance {
|
|
22
|
-
constructor(id: Milestone, random: Random, player?: Player);
|
|
23
21
|
onSpawnPlayer(player: Player): void;
|
|
24
22
|
}
|
|
25
23
|
export {};
|
|
@@ -100,8 +100,8 @@ declare const dictionaryMap: {
|
|
|
100
100
|
10: typeof Challenge;
|
|
101
101
|
11: typeof ChangeType;
|
|
102
102
|
12: typeof CharacterSort;
|
|
103
|
-
13: typeof
|
|
104
|
-
14: typeof
|
|
103
|
+
13: typeof CombatDangerLevel;
|
|
104
|
+
14: typeof CombatStrength;
|
|
105
105
|
15: typeof Command;
|
|
106
106
|
16: typeof CreatureType;
|
|
107
107
|
17: typeof CraftEfficacy;
|
|
@@ -209,8 +209,8 @@ export declare const strictDictionaries: {
|
|
|
209
209
|
10: typeof Challenge;
|
|
210
210
|
11: typeof ChangeType;
|
|
211
211
|
12: typeof CharacterSort;
|
|
212
|
-
13: typeof
|
|
213
|
-
14: typeof
|
|
212
|
+
13: typeof CombatDangerLevel;
|
|
213
|
+
14: typeof CombatStrength;
|
|
214
214
|
15: typeof Command;
|
|
215
215
|
16: typeof CreatureType;
|
|
216
216
|
17: typeof CraftEfficacy;
|