@wayward/types 2.13.0-beta.dev.20230404.1 → 2.13.0-beta.dev.20230406.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/event/EventBuses.d.ts +4 -1
- package/definitions/game/event/EventManager.d.ts +4 -1
- package/definitions/game/game/doodad/Doodad.d.ts +4 -0
- package/definitions/game/game/entity/CombatStrengthManager.d.ts +3 -1
- package/definitions/game/game/entity/Entity.d.ts +2 -1
- package/definitions/game/game/entity/IEntity.d.ts +4 -0
- package/definitions/game/game/entity/IHuman.d.ts +5 -0
- package/definitions/game/game/entity/action/ActionsRegistration.d.ts +4 -4
- package/definitions/game/game/entity/action/actions/Attack.d.ts +0 -1
- package/definitions/game/game/entity/action/actions/Chop.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Dig.d.ts +1 -0
- package/definitions/game/game/entity/action/actions/Gather.d.ts +2 -2
- package/definitions/game/game/entity/action/actions/Harvest.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Mine.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/helper/ConfirmGatherHarvest.d.ts +2 -1
- package/definitions/game/game/entity/creature/Creature.d.ts +6 -3
- package/definitions/game/game/entity/creature/ICreature.d.ts +33 -0
- package/definitions/game/game/entity/npc/npcs/Merchant.d.ts +2 -3
- package/definitions/game/game/entity/player/IPlayer.d.ts +0 -6
- package/definitions/game/game/inspection/infoProviders/LabelledValue.d.ts +2 -1
- package/definitions/game/game/inspection/infoProviders/creature/Aberrant.d.ts +3 -1
- package/definitions/game/game/inspection/infoProviders/creature/Difficulty.d.ts +2 -0
- package/definitions/game/game/inspection/infoProviders/creature/ResistancesAndVulnerabilities.d.ts +6 -1
- package/definitions/game/game/inspection/infoProviders/item/MagicalDamageType.d.ts +17 -0
- package/definitions/game/game/island/IIsland.d.ts +2 -2
- package/definitions/game/game/island/Island.d.ts +1 -8
- package/definitions/game/game/item/IItemManager.d.ts +2 -2
- package/definitions/game/game/item/Item.d.ts +2 -1
- package/definitions/game/game/magic/MagicalPropertyType.d.ts +4 -1
- package/definitions/game/game/milestones/IMilestone.d.ts +1 -1
- package/definitions/game/game/options/modifiers/milestone/modifiers/{Multidisciplined.d.ts → Versatile.d.ts} +8 -4
- package/definitions/game/game/tile/Tile.d.ts +14 -0
- package/definitions/game/game/tile/TileEventManager.d.ts +4 -1
- package/definitions/game/language/Translation.d.ts +1 -0
- package/definitions/game/language/dictionary/Misc.d.ts +2 -1
- package/definitions/game/language/dictionary/UiTranslation.d.ts +730 -725
- package/definitions/game/ui/Ui.d.ts +2 -0
- package/definitions/game/ui/input/Bindable.d.ts +166 -166
- package/definitions/game/ui/input/BindableManager.d.ts +2 -2
- package/definitions/game/ui/old/screens/InGameScreen.d.ts +2 -0
- package/definitions/game/ui/screen/screens/GameScreen.d.ts +0 -2
- package/definitions/game/utilities/math/Range.d.ts +3 -0
- package/package.json +1 -1
|
@@ -30,6 +30,7 @@ import type Item from "game/item/Item";
|
|
|
30
30
|
import type ItemManager from "game/item/ItemManager";
|
|
31
31
|
import type Loading from "game/meta/Loading";
|
|
32
32
|
import type Prompts from "game/meta/prompt/Prompts";
|
|
33
|
+
import type { MilestoneManager } from "game/milestones/MilestoneManager";
|
|
33
34
|
import type TileEvent from "game/tile/TileEvent";
|
|
34
35
|
import type TileEventManager from "game/tile/TileEventManager";
|
|
35
36
|
import type LanguageManager from "language/LanguageManager";
|
|
@@ -77,7 +78,8 @@ export declare enum EventBus {
|
|
|
77
78
|
Ui = 32,
|
|
78
79
|
UiActionBar = 33,
|
|
79
80
|
UiMovementHandler = 34,
|
|
80
|
-
WorldRenderer = 35
|
|
81
|
+
WorldRenderer = 35,
|
|
82
|
+
Milestones = 36
|
|
81
83
|
}
|
|
82
84
|
declare const eventBuses: {
|
|
83
85
|
[EventBus.Actions](): ActionExecutor<any, any, any, any, any>;
|
|
@@ -116,6 +118,7 @@ declare const eventBuses: {
|
|
|
116
118
|
[EventBus.UiActionBar](): ActionBar;
|
|
117
119
|
[EventBus.UiMovementHandler](): MovementHandler;
|
|
118
120
|
[EventBus.WorldRenderer](): WorldRenderer;
|
|
121
|
+
[EventBus.Milestones](): MilestoneManager;
|
|
119
122
|
};
|
|
120
123
|
export interface IEventBusRegistration {
|
|
121
124
|
subscribe: NullaryFunction;
|
|
@@ -11,8 +11,11 @@
|
|
|
11
11
|
import type { EventBusHost } from "event/EventBuses";
|
|
12
12
|
import { EventBus } from "event/EventBuses";
|
|
13
13
|
import type { Events, IEventEmitterHost, IEventEmitterHostClass } from "event/EventEmitter";
|
|
14
|
+
import type EventEmitter from "event/EventEmitter";
|
|
14
15
|
type HostOrHostClass = IEventEmitterHost<any> | IEventEmitterHostClass<any>;
|
|
15
|
-
type HostFromHostOrHostClass<H> = H extends
|
|
16
|
+
type HostFromHostOrHostClass<H> = H extends {
|
|
17
|
+
event: EventEmitter<null, any>;
|
|
18
|
+
} ? H : H extends IEventEmitterHostClass<any> ? InstanceOf<H> : H;
|
|
16
19
|
export type Emitter = HostOrHostClass;
|
|
17
20
|
export type EmitterOrBus = EventBus | Emitter;
|
|
18
21
|
export type Event<E extends EmitterOrBus> = keyof Events<E extends EventBus ? EventBusHost<E> : E>;
|
|
@@ -189,6 +189,10 @@ export default class Doodad extends Entity<IDoodadDescription, DoodadType, Dooda
|
|
|
189
189
|
unhitch(): void;
|
|
190
190
|
damage(forceBreak?: boolean, skipDropAsItem?: boolean, skipSound?: boolean, skipResources?: boolean): void;
|
|
191
191
|
getDefaultDurability(random?: import("../../utilities/random/Random").Random<import("../../utilities/random/generators/LegacySeededGenerator").LegacySeededGenerator | import("../../utilities/random/generators/PCGSeededGenerator").PCGSeededGenerator>): number;
|
|
192
|
+
/**
|
|
193
|
+
* Gets the container to use for doodad executed actions
|
|
194
|
+
*/
|
|
195
|
+
getTargetContainer(): IContainer | undefined;
|
|
192
196
|
addTreasureChestLoot(): void;
|
|
193
197
|
attachStillContainer(item: Item): void;
|
|
194
198
|
detachStillContainer(human: Human): Item | undefined;
|
|
@@ -46,7 +46,9 @@ export default class CombatStrengthManager {
|
|
|
46
46
|
* Calculates a float value between 0 and 1 representing a creature's difficulty.
|
|
47
47
|
*/
|
|
48
48
|
getCreature(creature: Creature | CreatureType, aberrant?: boolean): number;
|
|
49
|
-
getCreatureDifficultyAgainstHuman(creature: Creature
|
|
49
|
+
getCreatureDifficultyAgainstHuman(creature: Creature, human: Human): number;
|
|
50
|
+
private getEstimatedTurnsToKillHuman;
|
|
51
|
+
private getEstimatedTurnsToKillCreature;
|
|
50
52
|
/**
|
|
51
53
|
* Calculates a value representing a creature's combat strength.
|
|
52
54
|
*
|
|
@@ -34,7 +34,8 @@ import type EntityWithStats from "game/entity/EntityWithStats";
|
|
|
34
34
|
import type Tile from "game/tile/Tile";
|
|
35
35
|
import type EntityMovable from "game/entity/EntityMovable";
|
|
36
36
|
import type { RenderSource, UpdateRenderFlag } from "renderer/IRenderer";
|
|
37
|
-
|
|
37
|
+
import type { IVector4 } from "utilities/math/Vector4";
|
|
38
|
+
export default abstract class Entity<DescriptionType = unknown, TypeType extends number = number, TagType = unknown, CounterType = unknown> extends EventEmitter.Host<IEntityEvents> implements IReferenceable, IInspector, ITemperatureSource, INotificationLocation, IVector4 {
|
|
38
39
|
abstract readonly entityType: EntityType;
|
|
39
40
|
abstract readonly tileUpdateType: TileUpdateType;
|
|
40
41
|
id: number;
|
|
@@ -244,6 +244,10 @@ declare class AttributesImpl {
|
|
|
244
244
|
all(): [DamageType, number][];
|
|
245
245
|
types(): DamageType[];
|
|
246
246
|
has(type?: DamageType): boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Returns true if any of the given damage types are exactly the given value.
|
|
249
|
+
*/
|
|
250
|
+
hasTypeAtValue(damage: DamageType, exactly: number): boolean;
|
|
247
251
|
copy(): Attributes;
|
|
248
252
|
equals(attrs: Attributes): boolean;
|
|
249
253
|
}
|
|
@@ -191,6 +191,11 @@ export interface IHumanEvents extends Events<EntityWithStats>, ISkillEvents {
|
|
|
191
191
|
* @returns The amount of damage the player should take (the player will take this damage)
|
|
192
192
|
*/
|
|
193
193
|
damage(damageInfo: IDamageInfo): number | void;
|
|
194
|
+
/**
|
|
195
|
+
* Called when an doodad is picked up
|
|
196
|
+
* @param doodad The doodad object
|
|
197
|
+
*/
|
|
198
|
+
pickUpDoodad?(doodad: Doodad): any;
|
|
194
199
|
/**
|
|
195
200
|
* Called when the player tick starts
|
|
196
201
|
*/
|
|
@@ -23,7 +23,7 @@ export declare const actionDescriptionsSlow: {
|
|
|
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]>;
|
|
26
|
-
99: 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/Gather").IGatherCanUse, [(import("../../item/Item").default | undefined)?]>;
|
|
26
|
+
99: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Tile, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../../doodad/Doodad").default | import("../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../item/Item").default | undefined)?, (import("../../tile/Tile").default | undefined)?]>;
|
|
27
27
|
71: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.Container, import("game/entity/action/IAction").ActionArgument.NPCNearby, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/ToggleContainer").IToggleContainerCanUse, [(import("../npc/NPC").default | import("../../item/IItem").IContainer | undefined)?, (boolean | undefined)?]>;
|
|
28
28
|
50: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.Doodad, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, true | undefined, import("game/entity/action/actions/ToggleDoor").IToggleDoorCanUse, [(import("../../doodad/Doodad").default | undefined)?, (boolean | undefined)?]>;
|
|
29
29
|
26: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default<number>, void, import("game/entity/action/IAction").IActionUsable, [import("../../item/Item").default]>;
|
|
@@ -49,11 +49,11 @@ export declare const actionDescriptionsSlow: {
|
|
|
49
49
|
38: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.Undefined, import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Doodad]], import("../Human").default<number>, void, import("game/entity/action/IAction").IActionUsable, [(import("../../doodad/Doodad").default | import("../../item/Item").default | undefined)?]>;
|
|
50
50
|
110: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory, [import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/Exude").IExudeCanUse, [import("../../item/Item").default, (import("../../item/Item").default | undefined)?]>;
|
|
51
51
|
36: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/Attack").IAttackCloseUpCanUse | import("game/entity/action/actions/Attack").IAttackThrowItemCanUse | import("game/entity/action/actions/Attack").IAttackRangedWeaponCanUse, [import("../../item/Item").default]>;
|
|
52
|
-
22: 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/Gather").IGatherCanUse, [(import("../../item/Item").default | undefined)?]>;
|
|
52
|
+
22: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Tile, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../../doodad/Doodad").default | import("../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../item/Item").default | undefined)?, (import("../../tile/Tile").default | undefined)?]>;
|
|
53
53
|
15: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default<number>, void, import("game/entity/action/actions/GatherLiquid").IGatherLiquidCanUse, [import("../../item/Item").default]>;
|
|
54
54
|
86: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearbyIncludingTradeContainer, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Container, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.ItemType, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Quality, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.String, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/MoveItem").MoveItemCanUse, [(import("../../item/Item").default | undefined)?, (import("../../item/IItem").IContainer | undefined)?, (import("../../item/IItem").ItemType | undefined)?, (import("../../IObject").Quality | undefined)?, (string | undefined)?]>;
|
|
55
55
|
52: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/Grasp").IGraspCanUse, [import("../../item/Item").default]>;
|
|
56
|
-
69: 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/Harvest").IHarvestCanUse, [(import("../../item/Item").default | undefined)?]>;
|
|
56
|
+
69: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Tile, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../../doodad/Doodad").default | import("../Human").default<number>, void, import("game/entity/action/actions/Harvest").IHarvestCanUse, [(import("../../item/Item").default | undefined)?, (import("../../tile/Tile").default | undefined)?]>;
|
|
57
57
|
12: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default<number>, void, import("./actions/ConsumeItem").IConsumeItemCanUse, [import("../../item/Item").default]>;
|
|
58
58
|
46: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/HealOther").IHealOtherCanUse, [import("../../item/Item").default]>;
|
|
59
59
|
76: import("./Action").Action<[], import("../Human").default<number>, void, import("game/entity/action/actions/ToggleHitch").IToggleHitchCanUse, []>;
|
|
@@ -67,7 +67,7 @@ export declare const actionDescriptionsSlow: {
|
|
|
67
67
|
}, [import("../../item/Item").default]>;
|
|
68
68
|
17: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/Lockpick").ILockpickCanUse, [import("../../item/Item").default]>;
|
|
69
69
|
85: 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)?]>;
|
|
70
|
-
100: 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/Gather").IGatherCanUse, [(import("../../item/Item").default | undefined)?]>;
|
|
70
|
+
100: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Tile, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../../doodad/Doodad").default | import("../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../item/Item").default | undefined)?, (import("../../tile/Tile").default | undefined)?]>;
|
|
71
71
|
58: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Direction], import("../Human").default<number>, void, {
|
|
72
72
|
usable: true;
|
|
73
73
|
}, [import("../../../utilities/math/Direction").Direction.None | import("../../../utilities/math/Direction").Direction.East | import("../../../utilities/math/Direction").Direction.North | import("../../../utilities/math/Direction").Direction.West | import("../../../utilities/math/Direction").Direction.South]>;
|
|
@@ -37,7 +37,6 @@ export interface IAttackThrowItemCanUse extends IBaseCanUse {
|
|
|
37
37
|
export interface IAttackRangedWeaponCanUse extends IBaseCanUse {
|
|
38
38
|
attackType: AttackType.RangedWeapon;
|
|
39
39
|
weapon: Item;
|
|
40
|
-
weaponDescription: IItemDescription;
|
|
41
40
|
ranged: IRanged;
|
|
42
41
|
rangedRequiredWeapon?: Item;
|
|
43
42
|
ammoItem: Item;
|
|
@@ -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.ItemInventory, import("../IAction").ActionArgument.Undefined]], import("../../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../../item/Item").default | undefined)?]>;
|
|
11
|
+
declare const _default: import("../Action").Action<[[import("../IAction").ActionArgument.ItemInventory, import("../IAction").ActionArgument.Undefined], [import("../IAction").ActionArgument.Tile, import("../IAction").ActionArgument.Undefined]], import("../../../doodad/Doodad").default | import("../../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../../item/Item").default | undefined)?, (import("../../../tile/Tile").default | undefined)?]>;
|
|
12
12
|
export default _default;
|
|
@@ -17,6 +17,7 @@ import { TerrainType } from "game/tile/ITerrain";
|
|
|
17
17
|
import type Tile from "game/tile/Tile";
|
|
18
18
|
export interface IDigGenericCanUse extends IActionUsable {
|
|
19
19
|
type: "PickUpExcrement" | "PickUp" | "Gather";
|
|
20
|
+
tile: Tile;
|
|
20
21
|
}
|
|
21
22
|
export interface IDigTileCanUse extends IActionUsable {
|
|
22
23
|
type: "Tile";
|
|
@@ -54,7 +54,7 @@ export interface IGatherDoodadCanUse extends IGatherBaseCanUse {
|
|
|
54
54
|
doodadDescription: IDoodadDescription;
|
|
55
55
|
growingStage?: GrowingStage;
|
|
56
56
|
}
|
|
57
|
-
export interface IGatherDoodadHarvestCanUse extends
|
|
57
|
+
export interface IGatherDoodadHarvestCanUse extends IGatherBaseCanUse {
|
|
58
58
|
gatherType: GatherType.DoodadHarvest;
|
|
59
59
|
tool?: Item;
|
|
60
60
|
}
|
|
@@ -63,5 +63,5 @@ export interface IGatherTerrainCanUse extends IGatherBaseCanUse {
|
|
|
63
63
|
terrainDescription: ITerrainDescription;
|
|
64
64
|
}
|
|
65
65
|
export type IGatherCanUse = IGatherTileEventCanUse | IGatherDoodadCanUse | IGatherDoodadHarvestCanUse | IGatherTerrainCanUse;
|
|
66
|
-
declare const _default: Action<[[ActionArgument.ItemInventory, ActionArgument.Undefined]], import("../../Human").default<number>, void, IGatherCanUse, [(Item | undefined)?]>;
|
|
66
|
+
declare const _default: Action<[[ActionArgument.ItemInventory, ActionArgument.Undefined], [ActionArgument.Tile, ActionArgument.Undefined]], Doodad | import("../../Human").default<number>, void, IGatherCanUse, [(Item | undefined)?, (Tile | undefined)?]>;
|
|
67
67
|
export default _default;
|
|
@@ -20,5 +20,5 @@ export interface IHarvestCanUse extends IActionUsable {
|
|
|
20
20
|
doodad: Doodad;
|
|
21
21
|
resources: ILootItem[];
|
|
22
22
|
}
|
|
23
|
-
declare const _default: Action<[[ActionArgument.ItemInventory, ActionArgument.Undefined]], import("../../Human").default<number>, void, IHarvestCanUse, [(Item | undefined)?]>;
|
|
23
|
+
declare const _default: Action<[[ActionArgument.ItemInventory, ActionArgument.Undefined], [ActionArgument.Tile, ActionArgument.Undefined]], Doodad | import("../../Human").default<number>, void, IHarvestCanUse, [(Item | undefined)?, (import("../../../tile/Tile").default | undefined)?]>;
|
|
24
24
|
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.ItemInventory, import("../IAction").ActionArgument.Undefined]], import("../../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../../item/Item").default | undefined)?]>;
|
|
11
|
+
declare const _default: import("../Action").Action<[[import("../IAction").ActionArgument.ItemInventory, import("../IAction").ActionArgument.Undefined], [import("../IAction").ActionArgument.Tile, import("../IAction").ActionArgument.Undefined]], import("../../../doodad/Doodad").default | import("../../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../../item/Item").default | undefined)?, (import("../../../tile/Tile").default | undefined)?]>;
|
|
12
12
|
export default _default;
|
|
@@ -8,6 +8,7 @@
|
|
|
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 Doodad from "game/doodad/Doodad";
|
|
11
12
|
import type { IActionConfirmerApi } from "game/entity/action/IAction";
|
|
12
13
|
import type Human from "game/entity/Human";
|
|
13
|
-
export default function (action: IActionConfirmerApi<Human>): Promise<boolean>;
|
|
14
|
+
export default function (action: IActionConfirmerApi<Human | Doodad>): Promise<boolean>;
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { SfxType } from "audio/IAudio";
|
|
12
12
|
import type { IEventEmitter } from "event/EventEmitter";
|
|
13
|
-
import type { CreatureType, ICreatureDescription, ICreatureEvents, IDamageInfo, IHitch } from "game/entity/creature/ICreature";
|
|
13
|
+
import type { CreatureAttackOutcome, CreatureType, ICreatureAttackOutcomeAttack, ICreatureDescription, ICreatureEvents, IDamageInfo, IHitch } from "game/entity/creature/ICreature";
|
|
14
14
|
import EntityWithStats from "game/entity/EntityWithStats";
|
|
15
15
|
import type Human from "game/entity/Human";
|
|
16
16
|
import type { IEntityConstructorOptions, IStatChangeInfo } from "game/entity/IEntity";
|
|
17
|
-
import { AiType, EntityType, MoveType } from "game/entity/IEntity";
|
|
17
|
+
import { AiType, Defense, EntityType, MoveType } from "game/entity/IEntity";
|
|
18
18
|
import type { IStat } from "game/entity/IStats";
|
|
19
19
|
import type { IMovementTime } from "game/IGame";
|
|
20
20
|
import { TileUpdateType } from "game/IGame";
|
|
@@ -80,6 +80,7 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
|
|
|
80
80
|
isTamed(): boolean;
|
|
81
81
|
isValid(): boolean;
|
|
82
82
|
getCommandedAiType(): AiType | undefined;
|
|
83
|
+
getDefense(human?: Human): Defense;
|
|
83
84
|
/**
|
|
84
85
|
* Check is a creature is allowed to attack the target (rules of engagement)
|
|
85
86
|
* @param target Target thing to attack
|
|
@@ -131,7 +132,9 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
|
|
|
131
132
|
* Large creatures should render over the doodad over layer, which means we should hide the doodad over layer for doodads on the creatures tile.
|
|
132
133
|
*/
|
|
133
134
|
updateDoodadOverHiddenState(tile: Tile, shouldBeHidden: boolean): void;
|
|
134
|
-
|
|
135
|
+
getAttackOutcome(enemy: Human | Creature | undefined, force: true, humans?: Human[], description?: ICreatureDescription, moveType?: MoveType): ICreatureAttackOutcomeAttack;
|
|
136
|
+
getAttackOutcome(enemy: Human | Creature | undefined, force?: boolean, humans?: Human[], description?: ICreatureDescription, moveType?: MoveType): CreatureAttackOutcome;
|
|
137
|
+
processAttack(description: ICreatureDescription, humans: Human[], moveType: MoveType | undefined, enemyIn: Human | Creature | undefined): boolean;
|
|
135
138
|
getProducedTemperature(): number | undefined;
|
|
136
139
|
protected updateDoodadOverHiddenStateForCurrentTile(hidden?: boolean): void;
|
|
137
140
|
protected updateTile(fromTile: Tile, toTile: Tile): boolean;
|
|
@@ -19,6 +19,7 @@ import { AiType } from "game/entity/IEntity";
|
|
|
19
19
|
import type { IStat } from "game/entity/IStats";
|
|
20
20
|
import type { IPackedMessage } from "game/entity/player/IMessageManager";
|
|
21
21
|
import type { ItemType, ItemTypeGroup } from "game/item/IItem";
|
|
22
|
+
import type Item from "game/item/Item";
|
|
22
23
|
import type { LootGroupType } from "game/item/LootGroups";
|
|
23
24
|
import type { ITemperatureDescription } from "game/temperature/ITemperature";
|
|
24
25
|
import type { TileEventType } from "game/tile/ITileEvent";
|
|
@@ -30,6 +31,7 @@ import type Translation from "language/Translation";
|
|
|
30
31
|
import type { IModdable } from "mod/ModRegistry";
|
|
31
32
|
import type { StatNotificationType } from "renderer/notifier/INotifier";
|
|
32
33
|
import type { IRGB } from "utilities/Color";
|
|
34
|
+
import type { IRange } from "utilities/math/Range";
|
|
33
35
|
export declare enum CreatureType {
|
|
34
36
|
Slime = 0,
|
|
35
37
|
JellyCube = 1,
|
|
@@ -388,3 +390,34 @@ export declare const CREATURE_FLEE_DISTANCE_SQ: number;
|
|
|
388
390
|
export declare const TAMED_CREATURE_FOLLOW_CLOSE_DISTANCE = 1;
|
|
389
391
|
export declare const TAMED_CREATURE_FOLLOW_FAR_DISTANCE = 6;
|
|
390
392
|
export declare const settableAiTypes: Set<AiType>;
|
|
393
|
+
export interface ICreatureAttackOutcomeBase {
|
|
394
|
+
enemy?: Human | Creature;
|
|
395
|
+
willAttack: boolean;
|
|
396
|
+
breakAway: boolean;
|
|
397
|
+
hidden: boolean;
|
|
398
|
+
ai: AiType;
|
|
399
|
+
}
|
|
400
|
+
export interface ICreatureAttackOutcomeNoAttack extends ICreatureAttackOutcomeBase {
|
|
401
|
+
willAttack: false;
|
|
402
|
+
hidden: false;
|
|
403
|
+
}
|
|
404
|
+
export interface ICreatureAttackOutcomeHidden extends ICreatureAttackOutcomeBase {
|
|
405
|
+
willAttack: true;
|
|
406
|
+
hidden: true;
|
|
407
|
+
}
|
|
408
|
+
export interface ICreatureAttackOutcomeAttack extends ICreatureAttackOutcomeBase {
|
|
409
|
+
enemy: Human | Creature;
|
|
410
|
+
willAttack: true;
|
|
411
|
+
hidden: false;
|
|
412
|
+
ai: AiType;
|
|
413
|
+
maxParryingMultiplier: number;
|
|
414
|
+
damagedVehicle?: Item;
|
|
415
|
+
combatNote?: any[];
|
|
416
|
+
damageEquipment: boolean;
|
|
417
|
+
creatureHitRange: IRange;
|
|
418
|
+
enemyDefense: number;
|
|
419
|
+
pityPointOfDamageChance: number;
|
|
420
|
+
effectiveness: number;
|
|
421
|
+
damageScale: number;
|
|
422
|
+
}
|
|
423
|
+
export type CreatureAttackOutcome = ICreatureAttackOutcomeNoAttack | ICreatureAttackOutcomeHidden | ICreatureAttackOutcomeAttack;
|
|
@@ -14,7 +14,6 @@ import { AiType } from "game/entity/IEntity";
|
|
|
14
14
|
import { EquipType } from "game/entity/IHuman";
|
|
15
15
|
import type { INPCConstructorOptions } from "game/entity/npc/INPC";
|
|
16
16
|
import NPC from "game/entity/npc/NPC";
|
|
17
|
-
import type Player from "game/entity/player/Player";
|
|
18
17
|
import type { IContainer } from "game/item/IItem";
|
|
19
18
|
import { ItemType } from "game/item/IItem";
|
|
20
19
|
import type Item from "game/item/Item";
|
|
@@ -30,8 +29,8 @@ export default class MerchantNPC extends NPC {
|
|
|
30
29
|
modifyCustomerCredit(customer: Human, creditChange: number): number;
|
|
31
30
|
getActions(): ActionType[] | undefined;
|
|
32
31
|
getPublicContainer(): IContainer | undefined;
|
|
33
|
-
getSellPrice(
|
|
34
|
-
getBuyPrice(
|
|
32
|
+
getSellPrice(human: Human, item: Item): number | undefined;
|
|
33
|
+
getBuyPrice(human: Human, item: Item): IMerchantBuyPrice | undefined;
|
|
35
34
|
/**
|
|
36
35
|
* Closes container dialogs
|
|
37
36
|
*/
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type { Events } from "event/EventEmitter";
|
|
12
|
-
import type Doodad from "game/doodad/Doodad";
|
|
13
12
|
import type Human from "game/entity/Human";
|
|
14
13
|
import type { HairColor, HairStyle, SkinColor } from "game/entity/IHuman";
|
|
15
14
|
import type { IMessage } from "game/entity/player/IMessageManager";
|
|
@@ -86,11 +85,6 @@ export interface IPlayerEvents extends Events<Human> {
|
|
|
86
85
|
* @param id The id of the note that was read.
|
|
87
86
|
*/
|
|
88
87
|
readNote(id: number): any;
|
|
89
|
-
/**
|
|
90
|
-
* Called when an doodad is picked up
|
|
91
|
-
* @param doodad The doodad object
|
|
92
|
-
*/
|
|
93
|
-
pickUpDoodad?(doodad: Doodad): any;
|
|
94
88
|
/**
|
|
95
89
|
* Called when a player sails to civilization.
|
|
96
90
|
*/
|
|
@@ -19,7 +19,8 @@ export declare enum LabelledValueDisplayMode {
|
|
|
19
19
|
"label (value)" = 1,
|
|
20
20
|
"value label" = 2,
|
|
21
21
|
"value (label)" = 3,
|
|
22
|
-
"label value" = 4
|
|
22
|
+
"label value" = 4,
|
|
23
|
+
"label - value" = 5
|
|
23
24
|
}
|
|
24
25
|
export default class LabelledValue extends InfoProvider {
|
|
25
26
|
private readonly label;
|
|
@@ -10,12 +10,14 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type Creature from "game/entity/creature/Creature";
|
|
12
12
|
import { InfoProvider } from "game/inspection/InfoProvider";
|
|
13
|
+
import LabelledValue from "game/inspection/infoProviders/LabelledValue";
|
|
13
14
|
export default class AberrantInfoProvider extends InfoProvider {
|
|
14
15
|
private readonly creature;
|
|
15
16
|
private aberrant;
|
|
17
|
+
private tamed;
|
|
16
18
|
constructor(creature: Creature);
|
|
17
19
|
getClass(): string[];
|
|
18
20
|
hasContent(): boolean;
|
|
19
|
-
get():
|
|
21
|
+
get(): LabelledValue;
|
|
20
22
|
onTickEnd(): void;
|
|
21
23
|
}
|
|
@@ -16,8 +16,10 @@ export default class DifficultyInfoProvider extends InfoProvider {
|
|
|
16
16
|
private health;
|
|
17
17
|
private ai;
|
|
18
18
|
private aberrant;
|
|
19
|
+
private tamed;
|
|
19
20
|
constructor(creature: Creature);
|
|
20
21
|
getClass(): string[];
|
|
22
|
+
hasContent(): boolean;
|
|
21
23
|
get(): LabelledValue;
|
|
22
24
|
onTickEnd(): void;
|
|
23
25
|
}
|
package/definitions/game/game/inspection/infoProviders/creature/ResistancesAndVulnerabilities.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
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 EventEmitter from "event/EventEmitter";
|
|
11
12
|
import type Creature from "game/entity/creature/Creature";
|
|
12
13
|
import type { CreatureType } from "game/entity/creature/ICreature";
|
|
13
14
|
import type Human from "game/entity/Human";
|
|
@@ -15,9 +16,13 @@ import { InfoDisplayLevel } from "game/inspection/IInfoProvider";
|
|
|
15
16
|
import { InfoProvider } from "game/inspection/InfoProvider";
|
|
16
17
|
import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
|
|
17
18
|
import type { TranslationGenerator } from "ui/component/IComponent";
|
|
19
|
+
export interface IResistancesAndVulnerabilitiesInfoProviderClassEvents {
|
|
20
|
+
shouldDisplayUndiscoveredResistsAndVulns(skill: number, human: Human): boolean | undefined;
|
|
21
|
+
}
|
|
18
22
|
export default class ResistancesAndVulnerabilitiesInfoProvider extends InfoProvider {
|
|
19
23
|
private readonly creature;
|
|
20
|
-
static
|
|
24
|
+
static event: EventEmitter<null, IResistancesAndVulnerabilitiesInfoProviderClassEvents>;
|
|
25
|
+
static get(creatureType: CreatureType, human?: Human): import("game/inspection/InfoProvider").SimpleInfoProvider[];
|
|
21
26
|
private static translateVulnOrResist;
|
|
22
27
|
constructor(creature: Creature);
|
|
23
28
|
getClass(): string[];
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { DamageType } from "game/entity/IEntity";
|
|
12
|
+
import type { IItemDescription } from "game/item/IItem";
|
|
13
|
+
import type Item from "game/item/Item";
|
|
14
|
+
declare namespace MagicalDamageType {
|
|
15
|
+
function translate(item?: Item, description?: IItemDescription, defaultDamageType?: DamageType): import("../../../../language/impl/TranslationImpl").default;
|
|
16
|
+
}
|
|
17
|
+
export default MagicalDamageType;
|
|
@@ -13,7 +13,7 @@ import type Doodad from "game/doodad/Doodad";
|
|
|
13
13
|
import type Creature from "game/entity/creature/Creature";
|
|
14
14
|
import type { CreatureType, IDamageOutcome, IDamageOutcomeInput } from "game/entity/creature/ICreature";
|
|
15
15
|
import type Human from "game/entity/Human";
|
|
16
|
-
import type { Defense } from "game/entity/IEntity";
|
|
16
|
+
import type { DamageType, Defense } from "game/entity/IEntity";
|
|
17
17
|
import type NPC from "game/entity/npc/NPC";
|
|
18
18
|
import type { IIslandTemplate, TickFlag, TileUpdateType } from "game/IGame";
|
|
19
19
|
import type { MultiplayerLoadingDescription } from "game/meta/Loading";
|
|
@@ -89,7 +89,7 @@ export interface IIslandEvents {
|
|
|
89
89
|
* @param doodad Doodad that caused the change
|
|
90
90
|
*/
|
|
91
91
|
portsChanged(doodad: Doodad): any;
|
|
92
|
-
getDefense(defense: Defense | undefined, target: Human | Creature | CreatureType): Defense | undefined;
|
|
92
|
+
getDefense(defense: Defense | undefined, target: Human | Creature | CreatureType, damageType?: DamageType): Defense | undefined;
|
|
93
93
|
calculateAttackOutcome(damageOutcome: IDamageOutcome, input: IDamageOutcomeInput, attackValue: number, defenseValue: number): IDamageOutcome | undefined;
|
|
94
94
|
}
|
|
95
95
|
export interface ILegacySeeds {
|
|
@@ -19,7 +19,7 @@ import CreatureManager from "game/entity/creature/CreatureManager";
|
|
|
19
19
|
import type { IDamageInfo, IDamageOutcome, IDamageOutcomeInput } from "game/entity/creature/ICreature";
|
|
20
20
|
import FlowFieldManager from "game/entity/flowfield/FlowFieldManager";
|
|
21
21
|
import Human from "game/entity/Human";
|
|
22
|
-
import { SkillType } from "game/entity/IHuman";
|
|
22
|
+
import type { SkillType } from "game/entity/IHuman";
|
|
23
23
|
import NPCManager from "game/entity/npc/NPCManager";
|
|
24
24
|
import type { Game } from "game/Game";
|
|
25
25
|
import type { IGameOld } from "game/IGame";
|
|
@@ -179,8 +179,6 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
179
179
|
createTile(x: number, y: number, z: number, index: number): Tile;
|
|
180
180
|
setTile(x: number, y: number, z: number, tile: Tile): Tile;
|
|
181
181
|
getOrCreateTile(index: number, x: number, y: number, z: number): Tile;
|
|
182
|
-
makeLavaPassage(human: Human): TerrainType | undefined;
|
|
183
|
-
makeCaveEntrance(human: Human, chance?: number): TerrainType | undefined;
|
|
184
182
|
updateFlowFieldTile(tile: Tile, tileUpdateType: TileUpdateType, updatedRenderer?: boolean): void;
|
|
185
183
|
/**
|
|
186
184
|
* Checks if island.tileData is synced with Tile.data
|
|
@@ -215,11 +213,6 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
215
213
|
checkForTargetInRange(tile: Tile, direction: Direction.Cardinal, range: number, includePlayers?: boolean): IMobCheck;
|
|
216
214
|
fireBreath(x: number, y: number, z: number, facingDirection: Direction, itemName?: Translation, player?: boolean): void;
|
|
217
215
|
coolFires(requirements: IRequirementInfo, human: Human): void;
|
|
218
|
-
/**
|
|
219
|
-
* Create puddles around a point and limit them (so they can't expand infinitely).
|
|
220
|
-
* @param point x/y/z of the splash/puddle source.
|
|
221
|
-
*/
|
|
222
|
-
createPuddles(point: IVector3): void;
|
|
223
216
|
/**
|
|
224
217
|
* Resets & recalculates the civilization score
|
|
225
218
|
*/
|
|
@@ -15,9 +15,9 @@ import type Creature from "game/entity/creature/Creature";
|
|
|
15
15
|
import type { Quality } from "game/IObject";
|
|
16
16
|
import type { IMoveToTileOptions, ItemType, ItemTypeGroup } from "game/item/IItem";
|
|
17
17
|
import type Item from "game/item/Item";
|
|
18
|
+
import type Tile from "game/tile/Tile";
|
|
18
19
|
import type TileEvent from "game/tile/TileEvent";
|
|
19
20
|
import type { Direction } from "utilities/math/Direction";
|
|
20
|
-
import type { IVector3 } from "utilities/math/IVector";
|
|
21
21
|
/**
|
|
22
22
|
* Includes all protected items by default
|
|
23
23
|
*/
|
|
@@ -81,7 +81,7 @@ export interface IRequirementInfo {
|
|
|
81
81
|
missingDoodads?: Set<DoodadType | DoodadTypeGroup>;
|
|
82
82
|
fireSourceDoodad?: Doodad;
|
|
83
83
|
fireSourceTileEvent?: TileEvent;
|
|
84
|
-
|
|
84
|
+
fireSourceLavaTile?: Tile;
|
|
85
85
|
faceDirection?: Direction.Cardinal;
|
|
86
86
|
actionNotUsable?: IActionNotUsable;
|
|
87
87
|
}
|
|
@@ -26,7 +26,7 @@ import type { IObject, IObjectOptions } from "game/IObject";
|
|
|
26
26
|
import { Quality } from "game/IObject";
|
|
27
27
|
import type { IslandId } from "game/island/IIsland";
|
|
28
28
|
import type { ContainerReference, DisplayableItemType, IConstructedInfo, IContainable, IContainer, IItemDescription, IItemDisassembleResult, IItemUsed, IMagicalPropertyInfo, IMoveToTileOptions, ItemCounter, ItemTag, ItemTypeExtra } from "game/item/IItem";
|
|
29
|
-
import { BookType, ItemType, ItemTypeGroup, ItemWeightChange, SYMBOL_CONTAINER_CACHED_REFERENCE
|
|
29
|
+
import { BookType, ItemDamageResult, ItemType, ItemTypeGroup, ItemWeightChange, SYMBOL_CONTAINER_CACHED_REFERENCE } from "game/item/IItem";
|
|
30
30
|
import type { IPlaceOnTileOptions } from "game/item/IItemManager";
|
|
31
31
|
import ItemMapManager from "game/item/ItemMapManager";
|
|
32
32
|
import type { IHasMagic, MagicalSubPropertySubTypes } from "game/magic/MagicalPropertyManager";
|
|
@@ -294,6 +294,7 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Item
|
|
|
294
294
|
* Gets the inherit item type.
|
|
295
295
|
*/
|
|
296
296
|
getInheritItemRecipeSkill(): SkillType;
|
|
297
|
+
getDamageType(): DamageType;
|
|
297
298
|
/**
|
|
298
299
|
* Returns the damage types associated with a skill with a fallback for whatever damage types the item normally provides
|
|
299
300
|
* @param skillType The skill to get default damage types from
|
|
@@ -8,6 +8,7 @@
|
|
|
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 { DamageType } from "game/entity/IEntity";
|
|
11
12
|
import { SkillType } from "game/entity/IHuman";
|
|
12
13
|
import { Stat } from "game/entity/IStats";
|
|
13
14
|
import type { IItemDescription, IMagicalPropertyInfo } from "game/item/IItem";
|
|
@@ -64,7 +65,8 @@ export declare enum MagicalPropertyType {
|
|
|
64
65
|
/**
|
|
65
66
|
* Adds a property that emits skill bonus to anybody within range (3x3 square) of the doodad.
|
|
66
67
|
*/
|
|
67
|
-
DoodadSkill = 27
|
|
68
|
+
DoodadSkill = 27,
|
|
69
|
+
ElementalDamage = 28
|
|
68
70
|
}
|
|
69
71
|
export interface IMagicalPropertyDescription {
|
|
70
72
|
/**
|
|
@@ -86,5 +88,6 @@ export interface MagicalPropertyTypeSubTypeMap {
|
|
|
86
88
|
[MagicalPropertyType.Skill]: SkillType;
|
|
87
89
|
[MagicalPropertyType.Reputation]: Stat;
|
|
88
90
|
[MagicalPropertyType.DoodadSkill]: SkillType;
|
|
91
|
+
[MagicalPropertyType.ElementalDamage]: DamageType;
|
|
89
92
|
}
|
|
90
93
|
export declare const magicalPropertyDescriptions: PartialRecord<MagicalPropertyType, IMagicalPropertyDescription>;
|
|
@@ -59,7 +59,7 @@ export declare enum Milestone {
|
|
|
59
59
|
Murderer = 47,
|
|
60
60
|
Retailer = 48,
|
|
61
61
|
Masochist = 49,
|
|
62
|
-
|
|
62
|
+
Versatile = 50
|
|
63
63
|
}
|
|
64
64
|
export type ExcludeInternalMilestones<MILESTONE extends Milestone> = PickValueKeys<typeof Milestone, MILESTONE> extends `Internal${string}` ? never : MILESTONE;
|
|
65
65
|
export declare enum MilestoneVisibility {
|
|
@@ -14,19 +14,23 @@ import type Creature from "game/entity/creature/Creature";
|
|
|
14
14
|
import type { CreatureType, IDamageOutcome, IDamageOutcomeInput } from "game/entity/creature/ICreature";
|
|
15
15
|
import type Player from "game/entity/player/Player";
|
|
16
16
|
import type Island from "game/island/Island";
|
|
17
|
+
import type Item from "game/item/Item";
|
|
18
|
+
import type ItemManager from "game/item/ItemManager";
|
|
17
19
|
import type { Milestone } from "game/milestones/IMilestone";
|
|
18
20
|
import type { IGameOptionsPartial } from "game/options/IGameOptions";
|
|
19
21
|
import MilestoneModifier, { MilestoneModifierGroup, MilestoneModifierInstance } from "game/options/modifiers/milestone/MilestoneModifier";
|
|
20
|
-
export default class
|
|
22
|
+
export default class Versatile extends MilestoneModifier {
|
|
21
23
|
getOptions(): IGameOptionsPartial;
|
|
22
24
|
getGroup(): MilestoneModifierGroup;
|
|
23
|
-
instantiate(id: Milestone, player?: Player):
|
|
25
|
+
instantiate(id: Milestone, player?: Player): VersatileMilestoneModifierInstance | undefined;
|
|
24
26
|
}
|
|
25
|
-
declare class
|
|
26
|
-
protected
|
|
27
|
+
declare class VersatileMilestoneModifierInstance extends MilestoneModifierInstance<Record<string, Map<CreatureType, Set<DamageType>>>> {
|
|
28
|
+
protected onCreateItem(manager: ItemManager, item: Item): void;
|
|
29
|
+
protected getDefense(island: Island, defense: Defense | undefined, target: Human | Creature | CreatureType, damageType?: DamageType): Defense | undefined;
|
|
27
30
|
protected calculateAttackOutcome(island: Island, outcome: IDamageOutcome, input: IDamageOutcomeInput, attackValue: number, defenseValue: number): IDamageOutcome | undefined;
|
|
28
31
|
protected hasDiscoveredVulnOrResist(player: Player, creature: CreatureType, damageType: DamageType): boolean | undefined;
|
|
29
32
|
protected discoverVulnOrResist(player: Player, creature: CreatureType, damageType: DamageType): void;
|
|
30
33
|
protected getDiscoveredVulnsAndResists(player: Player): Map<CreatureType, Set<DamageType>>;
|
|
34
|
+
protected shouldDisplayUndiscoveredResistsAndVulns(host: any, skill: number, human: Human): boolean | undefined;
|
|
31
35
|
}
|
|
32
36
|
export {};
|
|
@@ -235,6 +235,20 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
|
|
|
235
235
|
* Decrease the depth of a water tile if under 6 connected tiles
|
|
236
236
|
*/
|
|
237
237
|
consumeWaterTile(): void;
|
|
238
|
+
/**
|
|
239
|
+
* Used to check if lava exists below, then create a passage above
|
|
240
|
+
* @returns True if it created a lava passage
|
|
241
|
+
*/
|
|
242
|
+
makeLavaPassage(source: Human | undefined): boolean;
|
|
243
|
+
/**
|
|
244
|
+
* Used to genererate and find appropriate cave entrances
|
|
245
|
+
* @returns True if it created cave entrances
|
|
246
|
+
*/
|
|
247
|
+
makeCaveEntrance(source: Human | undefined, chance?: number): boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Create puddles around a point and limit them (so they can't expand infinitely)
|
|
250
|
+
*/
|
|
251
|
+
createPuddles(): void;
|
|
238
252
|
addOrUpdateOverlay(overlay: IOverlayInfo): void;
|
|
239
253
|
removeOverlay(overlay: IOverlayInfo): void;
|
|
240
254
|
canSeeObject(type: CanASeeBType, object: IVector4 & {
|