isaacscript-common 51.2.2 → 51.2.3
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/dist/index.rollup.d.ts +4 -3
- package/dist/isaacscript-common.lua +7 -7
- package/dist/src/functions/bosses.d.ts +3 -2
- package/dist/src/functions/bosses.d.ts.map +1 -1
- package/dist/src/functions/bosses.lua +3 -2
- package/dist/src/functions/entities.d.ts +1 -1
- package/dist/src/functions/entities.lua +4 -4
- package/dist/src/sets/bossSets.lua +1 -1
- package/dist/src/sets/storyBossEntityTypesSet.d.ts +3 -0
- package/dist/src/sets/storyBossEntityTypesSet.d.ts.map +1 -0
- package/dist/src/sets/{storyBossesSet.lua → storyBossEntityTypesSet.lua} +1 -1
- package/package.json +1 -1
- package/src/functions/bosses.ts +3 -2
- package/src/functions/entities.ts +3 -3
- package/src/sets/bossSets.ts +1 -1
- package/src/sets/{storyBossesSet.ts → storyBossEntityTypesSet.ts} +1 -1
- package/dist/src/sets/storyBossesSet.d.ts +0 -3
- package/dist/src/sets/storyBossesSet.d.ts.map +0 -1
package/dist/index.rollup.d.ts
CHANGED
|
@@ -4720,7 +4720,8 @@ export declare function getAliveBosses(entityType?: EntityType | -1, variant?: n
|
|
|
4720
4720
|
export declare function getAliveNPCs(entityType?: EntityType | -1, variant?: number, subType?: number, ignoreFriendly?: boolean): EntityNPC[];
|
|
4721
4721
|
|
|
4722
4722
|
/**
|
|
4723
|
-
* Helper function to get the set of every boss in the game
|
|
4723
|
+
* Helper function to get the set of every boss in the game (which is derived from the `BossID`
|
|
4724
|
+
* enum).
|
|
4724
4725
|
*
|
|
4725
4726
|
* This includes:
|
|
4726
4727
|
* - Ultra Greed
|
|
@@ -4729,7 +4730,7 @@ export declare function getAliveNPCs(entityType?: EntityType | -1, variant?: num
|
|
|
4729
4730
|
* - mini-bosses (e.g. Ultra Pride, Krampus)
|
|
4730
4731
|
* - bosses that do not appear in Boss Rooms (e.g. Uriel, Gabriel)
|
|
4731
4732
|
* - the second phase of multi-phase bosses (e.g. Mega Satan 2)
|
|
4732
|
-
* - sub-bosses of The Beast
|
|
4733
|
+
* - sub-bosses of The Beast fight (e.g. Ultra Famine, Ultra Pestilence, Ultra War, Ultra Death)
|
|
4733
4734
|
* - bosses that do not have any Boss Rooms defined due to being unfinished (e.g. Raglich)
|
|
4734
4735
|
*
|
|
4735
4736
|
* Also see the `getBossSet` and `getCombinedBossSet` functions.
|
|
@@ -9489,7 +9490,7 @@ export declare function isStageWithStoryBoss(stage: LevelStage): boolean;
|
|
|
9489
9490
|
/**
|
|
9490
9491
|
* Helper function to determine if the specified entity type is an end-game story boss, like Isaac,
|
|
9491
9492
|
* Blue Baby, Mega Satan, The Beast, and so on. This is useful because certain effects should only
|
|
9492
|
-
* apply to non-story bosses, like Vanishing Twin.
|
|
9493
|
+
* apply to non-story bosses, like Vanishing Twin.
|
|
9493
9494
|
*/
|
|
9494
9495
|
export declare function isStoryBoss(entityType: EntityType): boolean;
|
|
9495
9496
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 51.2.
|
|
3
|
+
isaacscript-common 51.2.3
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -21438,7 +21438,7 @@ ____exports.ENTITIES_WITH_ARMOR_SET = __TS__New(
|
|
|
21438
21438
|
)
|
|
21439
21439
|
return ____exports
|
|
21440
21440
|
end,
|
|
21441
|
-
["src.sets.
|
|
21441
|
+
["src.sets.storyBossEntityTypesSet"] = function(...)
|
|
21442
21442
|
local ____lualib = require("lualib_bundle")
|
|
21443
21443
|
local __TS__New = ____lualib.__TS__New
|
|
21444
21444
|
local ____exports = {}
|
|
@@ -21446,7 +21446,7 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescri
|
|
|
21446
21446
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
21447
21447
|
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
21448
21448
|
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
21449
|
-
____exports.
|
|
21449
|
+
____exports.STORY_BOSS_ENTITY_TYPES_SET = __TS__New(ReadonlySet, {
|
|
21450
21450
|
EntityType.MOM,
|
|
21451
21451
|
EntityType.MOMS_HEART,
|
|
21452
21452
|
EntityType.SATAN,
|
|
@@ -21576,8 +21576,8 @@ local ____constants = require("src.core.constants")
|
|
|
21576
21576
|
local VectorZero = ____constants.VectorZero
|
|
21577
21577
|
local ____entitiesWithArmorSet = require("src.sets.entitiesWithArmorSet")
|
|
21578
21578
|
local ENTITIES_WITH_ARMOR_SET = ____entitiesWithArmorSet.ENTITIES_WITH_ARMOR_SET
|
|
21579
|
-
local
|
|
21580
|
-
local
|
|
21579
|
+
local ____storyBossEntityTypesSet = require("src.sets.storyBossEntityTypesSet")
|
|
21580
|
+
local STORY_BOSS_ENTITY_TYPES_SET = ____storyBossEntityTypesSet.STORY_BOSS_ENTITY_TYPES_SET
|
|
21581
21581
|
local ____isaacAPIClass = require("src.functions.isaacAPIClass")
|
|
21582
21582
|
local getIsaacAPIClassName = ____isaacAPIClass.getIsaacAPIClassName
|
|
21583
21583
|
local ____random = require("src.functions.random")
|
|
@@ -21818,7 +21818,7 @@ function ____exports.isEntityMoving(self, entity, threshold)
|
|
|
21818
21818
|
return doesVectorHaveLength(nil, entity.Velocity, threshold)
|
|
21819
21819
|
end
|
|
21820
21820
|
function ____exports.isStoryBoss(self, entityType)
|
|
21821
|
-
return
|
|
21821
|
+
return STORY_BOSS_ENTITY_TYPES_SET:has(entityType)
|
|
21822
21822
|
end
|
|
21823
21823
|
function ____exports.parseEntityID(self, entityID)
|
|
21824
21824
|
local entityIDArray = __TS__StringSplit(entityID, ".")
|
|
@@ -44307,7 +44307,7 @@ ____exports.ALL_BOSSES_SET = __TS__New(
|
|
|
44307
44307
|
ReadonlySet,
|
|
44308
44308
|
__TS__ArrayFilter(
|
|
44309
44309
|
BOSS_IDS,
|
|
44310
|
-
function(____, bossID) return bossID
|
|
44310
|
+
function(____, bossID) return bossID ~= BossID.RAGLICH end
|
|
44311
44311
|
)
|
|
44312
44312
|
)
|
|
44313
44313
|
local STORY_BOSS_IDS_SET = __TS__New(ReadonlySet, {
|
|
@@ -16,7 +16,8 @@ import { EntityType } from "isaac-typescript-definitions";
|
|
|
16
16
|
*/
|
|
17
17
|
export declare function getAliveBosses(entityType?: EntityType | -1, variant?: number, subType?: number, ignoreFriendly?: boolean): EntityNPC[];
|
|
18
18
|
/**
|
|
19
|
-
* Helper function to get the set of every boss in the game
|
|
19
|
+
* Helper function to get the set of every boss in the game (which is derived from the `BossID`
|
|
20
|
+
* enum).
|
|
20
21
|
*
|
|
21
22
|
* This includes:
|
|
22
23
|
* - Ultra Greed
|
|
@@ -25,7 +26,7 @@ export declare function getAliveBosses(entityType?: EntityType | -1, variant?: n
|
|
|
25
26
|
* - mini-bosses (e.g. Ultra Pride, Krampus)
|
|
26
27
|
* - bosses that do not appear in Boss Rooms (e.g. Uriel, Gabriel)
|
|
27
28
|
* - the second phase of multi-phase bosses (e.g. Mega Satan 2)
|
|
28
|
-
* - sub-bosses of The Beast
|
|
29
|
+
* - sub-bosses of The Beast fight (e.g. Ultra Famine, Ultra Pestilence, Ultra War, Ultra Death)
|
|
29
30
|
* - bosses that do not have any Boss Rooms defined due to being unfinished (e.g. Raglich)
|
|
30
31
|
*
|
|
31
32
|
* Also see the `getBossSet` and `getCombinedBossSet` functions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bosses.d.ts","sourceRoot":"","sources":["../../../src/functions/bosses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,UAAU,EACV,SAAS,EACV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAe,MAAM,8BAA8B,CAAC;AA4BvE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,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E5B;AAED,6FAA6F;AAC7F,wBAAgB,KAAK,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAE7C;AAmCD;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CACvB,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,MAAM,GAAG,GAAG,EACjC,QAAQ,GAAE,MAAmB,EAC7B,OAAO,GAAE,MAAM,GAAG,SAAqB,EACvC,SAAS,GAAE,IAAI,GAAG,GAAG,GAAG,SAAqB,EAC7C,WAAW,CAAC,EAAE,GAAG,GAChB,SAAS,CAiCX;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,MAAM,GAAG,GAAG,EACjC,SAAS,EAAE,IAAI,GAAG,GAAG,EACrB,QAAQ,GAAE,MAAmB,EAC7B,OAAO,GAAE,MAAM,GAAG,SAAqB,EACvC,WAAW,CAAC,EAAE,GAAG,GAChB,SAAS,CAYX"}
|
|
@@ -76,7 +76,8 @@ function ____exports.getAliveBosses(self, entityType, variant, subType, ignoreFr
|
|
|
76
76
|
function(____, aliveNPC) return aliveNPC:IsBoss() end
|
|
77
77
|
)
|
|
78
78
|
end
|
|
79
|
-
--- Helper function to get the set of every boss in the game
|
|
79
|
+
--- Helper function to get the set of every boss in the game (which is derived from the `BossID`
|
|
80
|
+
-- enum).
|
|
80
81
|
--
|
|
81
82
|
-- This includes:
|
|
82
83
|
-- - Ultra Greed
|
|
@@ -85,7 +86,7 @@ end
|
|
|
85
86
|
-- - mini-bosses (e.g. Ultra Pride, Krampus)
|
|
86
87
|
-- - bosses that do not appear in Boss Rooms (e.g. Uriel, Gabriel)
|
|
87
88
|
-- - the second phase of multi-phase bosses (e.g. Mega Satan 2)
|
|
88
|
-
-- - sub-bosses of The Beast
|
|
89
|
+
-- - sub-bosses of The Beast fight (e.g. Ultra Famine, Ultra Pestilence, Ultra War, Ultra Death)
|
|
89
90
|
-- - bosses that do not have any Boss Rooms defined due to being unfinished (e.g. Raglich)
|
|
90
91
|
--
|
|
91
92
|
-- Also see the `getBossSet` and `getCombinedBossSet` functions.
|
|
@@ -127,7 +127,7 @@ export declare function isEntityMoving(entity: Entity, threshold?: number): bool
|
|
|
127
127
|
/**
|
|
128
128
|
* Helper function to determine if the specified entity type is an end-game story boss, like Isaac,
|
|
129
129
|
* Blue Baby, Mega Satan, The Beast, and so on. This is useful because certain effects should only
|
|
130
|
-
* apply to non-story bosses, like Vanishing Twin.
|
|
130
|
+
* apply to non-story bosses, like Vanishing Twin.
|
|
131
131
|
*/
|
|
132
132
|
export declare function isStoryBoss(entityType: EntityType): boolean;
|
|
133
133
|
/**
|
|
@@ -16,8 +16,8 @@ local ____constants = require("src.core.constants")
|
|
|
16
16
|
local VectorZero = ____constants.VectorZero
|
|
17
17
|
local ____entitiesWithArmorSet = require("src.sets.entitiesWithArmorSet")
|
|
18
18
|
local ENTITIES_WITH_ARMOR_SET = ____entitiesWithArmorSet.ENTITIES_WITH_ARMOR_SET
|
|
19
|
-
local
|
|
20
|
-
local
|
|
19
|
+
local ____storyBossEntityTypesSet = require("src.sets.storyBossEntityTypesSet")
|
|
20
|
+
local STORY_BOSS_ENTITY_TYPES_SET = ____storyBossEntityTypesSet.STORY_BOSS_ENTITY_TYPES_SET
|
|
21
21
|
local ____isaacAPIClass = require("src.functions.isaacAPIClass")
|
|
22
22
|
local getIsaacAPIClassName = ____isaacAPIClass.getIsaacAPIClassName
|
|
23
23
|
local ____random = require("src.functions.random")
|
|
@@ -352,9 +352,9 @@ function ____exports.isEntityMoving(self, entity, threshold)
|
|
|
352
352
|
end
|
|
353
353
|
--- Helper function to determine if the specified entity type is an end-game story boss, like Isaac,
|
|
354
354
|
-- Blue Baby, Mega Satan, The Beast, and so on. This is useful because certain effects should only
|
|
355
|
-
-- apply to non-story bosses, like Vanishing Twin.
|
|
355
|
+
-- apply to non-story bosses, like Vanishing Twin.
|
|
356
356
|
function ____exports.isStoryBoss(self, entityType)
|
|
357
|
-
return
|
|
357
|
+
return STORY_BOSS_ENTITY_TYPES_SET:has(entityType)
|
|
358
358
|
end
|
|
359
359
|
--- Helper function to parse a string that contains an entity type, a variant, and a sub-type,
|
|
360
360
|
-- separated by periods.
|
|
@@ -365,7 +365,7 @@ ____exports.ALL_BOSSES_SET = __TS__New(
|
|
|
365
365
|
ReadonlySet,
|
|
366
366
|
__TS__ArrayFilter(
|
|
367
367
|
BOSS_IDS,
|
|
368
|
-
function(____, bossID) return bossID
|
|
368
|
+
function(____, bossID) return bossID ~= BossID.RAGLICH end
|
|
369
369
|
)
|
|
370
370
|
)
|
|
371
371
|
local STORY_BOSS_IDS_SET = __TS__New(ReadonlySet, {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyBossEntityTypesSet.d.ts","sourceRoot":"","sources":["../../../src/sets/storyBossEntityTypesSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAG1D,eAAO,MAAM,2BAA2B,yBActC,CAAC"}
|
|
@@ -5,7 +5,7 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
|
|
|
5
5
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
6
6
|
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
7
7
|
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
8
|
-
____exports.
|
|
8
|
+
____exports.STORY_BOSS_ENTITY_TYPES_SET = __TS__New(ReadonlySet, {
|
|
9
9
|
EntityType.MOM,
|
|
10
10
|
EntityType.MOMS_HEART,
|
|
11
11
|
EntityType.SATAN,
|
package/package.json
CHANGED
package/src/functions/bosses.ts
CHANGED
|
@@ -56,7 +56,8 @@ export function getAliveBosses(
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
* Helper function to get the set of every boss in the game
|
|
59
|
+
* Helper function to get the set of every boss in the game (which is derived from the `BossID`
|
|
60
|
+
* enum).
|
|
60
61
|
*
|
|
61
62
|
* This includes:
|
|
62
63
|
* - Ultra Greed
|
|
@@ -65,7 +66,7 @@ export function getAliveBosses(
|
|
|
65
66
|
* - mini-bosses (e.g. Ultra Pride, Krampus)
|
|
66
67
|
* - bosses that do not appear in Boss Rooms (e.g. Uriel, Gabriel)
|
|
67
68
|
* - the second phase of multi-phase bosses (e.g. Mega Satan 2)
|
|
68
|
-
* - sub-bosses of The Beast
|
|
69
|
+
* - sub-bosses of The Beast fight (e.g. Ultra Famine, Ultra Pestilence, Ultra War, Ultra Death)
|
|
69
70
|
* - bosses that do not have any Boss Rooms defined due to being unfinished (e.g. Raglich)
|
|
70
71
|
*
|
|
71
72
|
* Also see the `getBossSet` and `getCombinedBossSet` functions.
|
|
@@ -3,7 +3,7 @@ import { EntityFlag } from "isaac-typescript-definitions";
|
|
|
3
3
|
import { game } from "../core/cachedClasses";
|
|
4
4
|
import { VectorZero } from "../core/constants";
|
|
5
5
|
import { ENTITIES_WITH_ARMOR_SET } from "../sets/entitiesWithArmorSet";
|
|
6
|
-
import {
|
|
6
|
+
import { STORY_BOSS_ENTITY_TYPES_SET } from "../sets/storyBossEntityTypesSet";
|
|
7
7
|
import type { AnyEntity } from "../types/AnyEntity";
|
|
8
8
|
import type { EntityID } from "../types/EntityID";
|
|
9
9
|
import { getIsaacAPIClassName } from "./isaacAPIClass";
|
|
@@ -367,10 +367,10 @@ export function isEntityMoving(entity: Entity, threshold = 0.01): boolean {
|
|
|
367
367
|
/**
|
|
368
368
|
* Helper function to determine if the specified entity type is an end-game story boss, like Isaac,
|
|
369
369
|
* Blue Baby, Mega Satan, The Beast, and so on. This is useful because certain effects should only
|
|
370
|
-
* apply to non-story bosses, like Vanishing Twin.
|
|
370
|
+
* apply to non-story bosses, like Vanishing Twin.
|
|
371
371
|
*/
|
|
372
372
|
export function isStoryBoss(entityType: EntityType): boolean {
|
|
373
|
-
return
|
|
373
|
+
return STORY_BOSS_ENTITY_TYPES_SET.has(entityType);
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
/**
|
package/src/sets/bossSets.ts
CHANGED
|
@@ -530,7 +530,7 @@ export const STAGE_TO_COMBINED_BOSS_SET_MAP = new ReadonlyMap<
|
|
|
530
530
|
]);
|
|
531
531
|
|
|
532
532
|
export const ALL_BOSSES_SET = new ReadonlySet<BossID>(
|
|
533
|
-
BOSS_IDS.filter((bossID) => bossID
|
|
533
|
+
BOSS_IDS.filter((bossID) => bossID !== BossID.RAGLICH),
|
|
534
534
|
);
|
|
535
535
|
|
|
536
536
|
const STORY_BOSS_IDS_SET = new ReadonlySet([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EntityType } from "isaac-typescript-definitions";
|
|
2
2
|
import { ReadonlySet } from "../types/ReadonlySet";
|
|
3
3
|
|
|
4
|
-
export const
|
|
4
|
+
export const STORY_BOSS_ENTITY_TYPES_SET = new ReadonlySet<EntityType>([
|
|
5
5
|
EntityType.MOM, // 45
|
|
6
6
|
EntityType.MOMS_HEART, // 78
|
|
7
7
|
EntityType.SATAN, // 84
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storyBossesSet.d.ts","sourceRoot":"","sources":["../../../src/sets/storyBossesSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAG1D,eAAO,MAAM,gBAAgB,yBAc3B,CAAC"}
|