isaacscript-common 9.8.3 → 9.10.0
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/features/extraConsoleCommands/listCommands.d.ts +5 -5
- package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +23 -23
- package/dist/functions/entities.d.ts +6 -0
- package/dist/functions/entities.d.ts.map +1 -1
- package/dist/functions/entities.lua +11 -0
- package/dist/functions/logEntities.d.ts +10 -0
- package/dist/functions/logEntities.d.ts.map +1 -1
- package/dist/functions/logEntities.lua +19 -0
- package/dist/functions/minimap.d.ts +3 -0
- package/dist/functions/minimap.d.ts.map +1 -1
- package/dist/functions/minimap.lua +3 -0
- package/dist/functions/npcs.d.ts +6 -0
- package/dist/functions/npcs.d.ts.map +1 -1
- package/dist/functions/npcs.lua +10 -0
- package/dist/index.d.ts +29 -0
- package/dist/maps/cardMap.lua +2 -2
- package/package.json +1 -1
- package/src/features/extraConsoleCommands/listCommands.ts +23 -23
- package/src/functions/entities.ts +10 -0
- package/src/functions/logEntities.ts +25 -1
- package/src/functions/minimap.ts +3 -0
- package/src/functions/npcs.ts +19 -0
- package/src/maps/cardMap.ts +2 -2
|
@@ -84,7 +84,7 @@ export declare function chaosCardTears(): void;
|
|
|
84
84
|
* - character 2 - Restarts as Cain.
|
|
85
85
|
* - character ta - Restarts as Tainted Azazel.
|
|
86
86
|
*/
|
|
87
|
-
export declare function
|
|
87
|
+
export declare function character(params: string): void;
|
|
88
88
|
/** Alias for the "addCharges" command. */
|
|
89
89
|
export declare function charge(params: string): void;
|
|
90
90
|
/** Warps to the first Clean Bedroom on the floor. */
|
|
@@ -278,13 +278,13 @@ export declare function pocket(params: string): void;
|
|
|
278
278
|
*/
|
|
279
279
|
export declare function poopMana(params: string): void;
|
|
280
280
|
/** Alias for the "getPosition" command. */
|
|
281
|
-
export declare function
|
|
281
|
+
export declare function position(): void;
|
|
282
282
|
/** Alias for the "hearts" command. */
|
|
283
283
|
export declare function redHearts(params: string): void;
|
|
284
284
|
/** Moves the player 0.5 units right. Provide a number to move a custom amount of units. */
|
|
285
285
|
export declare function right(params: string): void;
|
|
286
286
|
/** Logs information about the room to the "log.txt" file. */
|
|
287
|
-
export declare function
|
|
287
|
+
export declare function room(): void;
|
|
288
288
|
/**
|
|
289
289
|
* Gives a rotten heart. Provide a number to give a custom amount of hearts. (You can use negative
|
|
290
290
|
* numbers to remove hearts.)
|
|
@@ -313,7 +313,7 @@ export declare function secretRoom(): void;
|
|
|
313
313
|
/** Changes to a seeded run, using the seed of the current run. */
|
|
314
314
|
export declare function seedStick(): void;
|
|
315
315
|
/** Logs all of the current run's seed effects to the "log.txt" file. */
|
|
316
|
-
export declare function
|
|
316
|
+
export declare function seeds(): void;
|
|
317
317
|
/**
|
|
318
318
|
* Sets a charge to the player's specified active item. You must provide the active slot number and
|
|
319
319
|
* the number of charges to set.
|
|
@@ -372,7 +372,7 @@ export declare function tears(): void;
|
|
|
372
372
|
/** Alias for the "runTests" command. */
|
|
373
373
|
export declare function tests(): void;
|
|
374
374
|
/** Creates a trapdoor next to the player. */
|
|
375
|
-
export declare function
|
|
375
|
+
export declare function trapdoor(): void;
|
|
376
376
|
/** Warps to the first Treasure Room on the floor. */
|
|
377
377
|
export declare function treasureRoom(): void;
|
|
378
378
|
/** Warps to the first Ultra Secret Room on the floor. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listCommands.d.ts","sourceRoot":"","sources":["../../../src/features/extraConsoleCommands/listCommands.ts"],"names":[],"mappings":"AAyHA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA2C/C;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,gEAAgE;AAChE,wBAAgB,MAAM,IAAI,IAAI,CAK7B;AAED,sEAAsE;AACtE,wBAAgB,OAAO,IAAI,IAAI,CAkB9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,eAAe,IAAI,IAAI,CAEtC;AAED,8CAA8C;AAC9C,wBAAgB,OAAO,IAAI,IAAI,CAG9B;AAED,sFAAsF;AACtF,wBAAgB,MAAM,IAAI,IAAI,CAQ7B;AAED,wFAAwF;AACxF,wBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA0BzC"}
|
|
@@ -405,11 +405,11 @@ function ____exports.cards(self)
|
|
|
405
405
|
if asCardType(nil, cardType) == lastCardType then
|
|
406
406
|
return
|
|
407
407
|
end
|
|
408
|
-
local
|
|
408
|
+
local worldPosition = gridCoordinatesToWorldPosition(nil, x, y)
|
|
409
409
|
spawnCard(
|
|
410
410
|
nil,
|
|
411
411
|
asCardType(nil, cardType),
|
|
412
|
-
|
|
412
|
+
worldPosition
|
|
413
413
|
)
|
|
414
414
|
cardType = cardType + 1
|
|
415
415
|
x = x + 1
|
|
@@ -429,12 +429,12 @@ end
|
|
|
429
429
|
-- For example:
|
|
430
430
|
-- - character 2 - Restarts as Cain.
|
|
431
431
|
-- - character ta - Restarts as Tainted Azazel.
|
|
432
|
-
function ____exports.
|
|
432
|
+
function ____exports.character(self, params)
|
|
433
433
|
if params == "" then
|
|
434
434
|
printConsole(nil, "You must specify a character name or number.")
|
|
435
435
|
return
|
|
436
436
|
end
|
|
437
|
-
local
|
|
437
|
+
local playerType
|
|
438
438
|
local num = tonumber(params)
|
|
439
439
|
if num == nil then
|
|
440
440
|
local match = getMapPartialMatch(nil, params, CHARACTER_MAP)
|
|
@@ -442,7 +442,7 @@ function ____exports.characterCommand(self, params)
|
|
|
442
442
|
printConsole(nil, "Unknown character: " .. params)
|
|
443
443
|
return
|
|
444
444
|
end
|
|
445
|
-
|
|
445
|
+
playerType = match[2]
|
|
446
446
|
else
|
|
447
447
|
if num < FIRST_CHARACTER or num > LAST_VANILLA_CHARACTER then
|
|
448
448
|
printConsole(
|
|
@@ -451,13 +451,13 @@ function ____exports.characterCommand(self, params)
|
|
|
451
451
|
)
|
|
452
452
|
return
|
|
453
453
|
end
|
|
454
|
-
|
|
454
|
+
playerType = num
|
|
455
455
|
end
|
|
456
|
-
local characterName = getCharacterName(nil,
|
|
457
|
-
restart(nil,
|
|
456
|
+
local characterName = getCharacterName(nil, playerType)
|
|
457
|
+
restart(nil, playerType)
|
|
458
458
|
printConsole(
|
|
459
459
|
nil,
|
|
460
|
-
((("Restarting as character: " .. characterName) .. " (") .. tostring(
|
|
460
|
+
((("Restarting as character: " .. characterName) .. " (") .. tostring(playerType)) .. ")"
|
|
461
461
|
)
|
|
462
462
|
end
|
|
463
463
|
--- Alias for the "addCharges" command.
|
|
@@ -664,8 +664,8 @@ function ____exports.gridEntities(self)
|
|
|
664
664
|
if gridEntityType == nil then
|
|
665
665
|
return
|
|
666
666
|
end
|
|
667
|
-
local
|
|
668
|
-
spawnGridEntity(nil, gridEntityType,
|
|
667
|
+
local worldPosition = gridCoordinatesToWorldPosition(nil, x, y)
|
|
668
|
+
spawnGridEntity(nil, gridEntityType, worldPosition)
|
|
669
669
|
x = x + 1
|
|
670
670
|
end
|
|
671
671
|
end
|
|
@@ -853,8 +853,8 @@ function ____exports.pills(self)
|
|
|
853
853
|
if pillColor == nil then
|
|
854
854
|
return
|
|
855
855
|
end
|
|
856
|
-
local
|
|
857
|
-
spawnPill(nil, pillColor,
|
|
856
|
+
local worldPosition = gridCoordinatesToWorldPosition(nil, x, y)
|
|
857
|
+
spawnPill(nil, pillColor, worldPosition)
|
|
858
858
|
x = x + 1
|
|
859
859
|
end
|
|
860
860
|
end
|
|
@@ -889,7 +889,7 @@ function ____exports.pocket(self, params)
|
|
|
889
889
|
player:SetPocketActiveItem(collectibleType, ActiveSlot.POCKET)
|
|
890
890
|
end
|
|
891
891
|
--- Alias for the "getPosition" command.
|
|
892
|
-
function ____exports.
|
|
892
|
+
function ____exports.position(self)
|
|
893
893
|
____exports.getPosition(nil)
|
|
894
894
|
end
|
|
895
895
|
--- Alias for the "hearts" command.
|
|
@@ -901,7 +901,7 @@ function ____exports.right(self, params)
|
|
|
901
901
|
movePlayer(nil, params, Direction.RIGHT)
|
|
902
902
|
end
|
|
903
903
|
--- Logs information about the room to the "log.txt" file.
|
|
904
|
-
function ____exports.
|
|
904
|
+
function ____exports.room(self)
|
|
905
905
|
logRoom()
|
|
906
906
|
printConsole(nil, "Logged room information to the \"log.txt\" file.")
|
|
907
907
|
end
|
|
@@ -966,12 +966,12 @@ function ____exports.secretRoom(self)
|
|
|
966
966
|
end
|
|
967
967
|
--- Changes to a seeded run, using the seed of the current run.
|
|
968
968
|
function ____exports.seedStick(self)
|
|
969
|
-
local
|
|
970
|
-
local startSeedString =
|
|
969
|
+
local seedsClass = game:GetSeeds()
|
|
970
|
+
local startSeedString = seedsClass:GetStartSeedString()
|
|
971
971
|
Isaac.ExecuteCommand("seed " .. startSeedString)
|
|
972
972
|
end
|
|
973
973
|
--- Logs all of the current run's seed effects to the "log.txt" file.
|
|
974
|
-
function ____exports.
|
|
974
|
+
function ____exports.seeds(self)
|
|
975
975
|
logSeedEffects()
|
|
976
976
|
printConsole(nil, "Logged the seed effects to the \"log.txt\" file.")
|
|
977
977
|
end
|
|
@@ -1058,8 +1058,8 @@ function ____exports.setPosition(self, params)
|
|
|
1058
1058
|
return
|
|
1059
1059
|
end
|
|
1060
1060
|
local player = Isaac.GetPlayer()
|
|
1061
|
-
local
|
|
1062
|
-
player.Position =
|
|
1061
|
+
local newPosition = Vector(x, y)
|
|
1062
|
+
player.Position = newPosition
|
|
1063
1063
|
end
|
|
1064
1064
|
--- Warps to the first shop on the floor.
|
|
1065
1065
|
function ____exports.shop(self)
|
|
@@ -1113,8 +1113,8 @@ function ____exports.spawnGoldenTrinket(self, params)
|
|
|
1113
1113
|
return
|
|
1114
1114
|
end
|
|
1115
1115
|
local goldenTrinketType = getGoldenTrinketType(nil, trinketType)
|
|
1116
|
-
local
|
|
1117
|
-
local centerPos =
|
|
1116
|
+
local roomClass = game:GetRoom()
|
|
1117
|
+
local centerPos = roomClass:GetCenterPos()
|
|
1118
1118
|
spawnTrinket(nil, goldenTrinketType, centerPos)
|
|
1119
1119
|
end
|
|
1120
1120
|
--- Toggles maximum movement speed and flight for the player.
|
|
@@ -1149,7 +1149,7 @@ function ____exports.tests(self)
|
|
|
1149
1149
|
____exports.runTests(nil)
|
|
1150
1150
|
end
|
|
1151
1151
|
--- Creates a trapdoor next to the player.
|
|
1152
|
-
function ____exports.
|
|
1152
|
+
function ____exports.trapdoor(self)
|
|
1153
1153
|
spawnTrapdoorOrCrawlSpace(nil, true)
|
|
1154
1154
|
end
|
|
1155
1155
|
--- Warps to the first Treasure Room on the floor.
|
|
@@ -71,6 +71,12 @@ export declare function getEntities(entityType?: EntityType, variant?: number, s
|
|
|
71
71
|
* as comparing other types is non-trivial.
|
|
72
72
|
*/
|
|
73
73
|
export declare function getEntityFields(entity: Entity): LuaMap<string, boolean | number | string>;
|
|
74
|
+
/**
|
|
75
|
+
* Helper function to get an entity from a `PtrHash`. Note that doing this is very expensive, so you
|
|
76
|
+
* should only use this function when debugging. (Normally, if you need to work backwards from a
|
|
77
|
+
* reference, you would use an `EntityPtr` instead of a `PtrHash`.
|
|
78
|
+
*/
|
|
79
|
+
export declare function getEntityFromPtrHash(ptrHash: PtrHash): Entity | undefined;
|
|
74
80
|
/** Helper function to return a string containing the entity's type, variant, and sub-type. */
|
|
75
81
|
export declare function getEntityID(entity: Entity): string;
|
|
76
82
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/functions/entities.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAI1D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAO/C;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,UAAU,GAAE,UAAe,EAC3B,OAA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AQ,GAAE,MAAmB,EAC7B,OAAO,GAAE,MAAM,GAAG,SAAqB,EACvC,SAAS,GAAE,IAAI,GAAG,GAAG,GAAG,SAAqB,GAC5C,MAAM,CAsCR;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,IAAI,GAAG,GAAG,EACrB,QAAQ,GAAE,MAAmB,EAC7B,OAAO,GAAE,MAAM,GAAG,SAAqB,GACtC,MAAM,CAUR"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
2
3
|
local Set = ____lualib.Set
|
|
3
4
|
local __TS__New = ____lualib.__TS__New
|
|
4
5
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
@@ -208,6 +209,16 @@ function ____exports.getEntityFields(self, entity)
|
|
|
208
209
|
setPrimitiveEntityFields(nil, entity, parentTable, entityFields)
|
|
209
210
|
return entityFields
|
|
210
211
|
end
|
|
212
|
+
--- Helper function to get an entity from a `PtrHash`. Note that doing this is very expensive, so you
|
|
213
|
+
-- should only use this function when debugging. (Normally, if you need to work backwards from a
|
|
214
|
+
-- reference, you would use an `EntityPtr` instead of a `PtrHash`.
|
|
215
|
+
function ____exports.getEntityFromPtrHash(self, ptrHash)
|
|
216
|
+
local entities = ____exports.getEntities(nil)
|
|
217
|
+
return __TS__ArrayFind(
|
|
218
|
+
entities,
|
|
219
|
+
function(____, entity) return GetPtrHash(entity) == ptrHash end
|
|
220
|
+
)
|
|
221
|
+
end
|
|
211
222
|
--- Helper function to return a string containing the entity's type, variant, and sub-type.
|
|
212
223
|
function ____exports.getEntityID(self, entity)
|
|
213
224
|
return (((tostring(entity.Type) .. ".") .. tostring(entity.Variant)) .. ".") .. tostring(entity.SubType)
|
|
@@ -13,4 +13,14 @@ export declare function logEntity(this: void, entity: Entity): void;
|
|
|
13
13
|
export declare function logGridEntities(this: void, gridEntities: GridEntity[]): void;
|
|
14
14
|
/** Helper function for log information about a specific grid entity. */
|
|
15
15
|
export declare function logGridEntity(this: void, gridEntity: GridEntity): void;
|
|
16
|
+
/**
|
|
17
|
+
* Helper function to log information about the entity that corresponding to a pointer hash. (Only
|
|
18
|
+
* use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
19
|
+
*/
|
|
20
|
+
export declare function logPtrHash(this: void, ptrHash: PtrHash): void;
|
|
21
|
+
/**
|
|
22
|
+
* Helper function to log information about the entity that corresponding to one or more pointer
|
|
23
|
+
* hashes. (Only use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
24
|
+
*/
|
|
25
|
+
export declare function logPtrHashes(this: void, ptrHashes: PtrHash[]): void;
|
|
16
26
|
//# sourceMappingURL=logEntities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logEntities.d.ts","sourceRoot":"","sources":["../../src/functions/logEntities.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,cAAc,EACf,MAAM,8BAA8B,CAAC;AAiBtC,8FAA8F;AAC9F,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,EACV,wBAAwB,EAAE,OAAO,EACjC,gBAAgB,CAAC,EAAE,UAAU,GAC5B,IAAI,CAuCN;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,OAAO,EACrB,oBAAoB,CAAC,EAAE,cAAc,GACpC,IAAI,CA6CN;AAED,iEAAiE;AACjE,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAIhE;AAED,kEAAkE;AAClE,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAG1D;AA2ED,s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,GAAG,IAAI,CAInE"}
|
|
@@ -9,6 +9,7 @@ local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
|
|
|
9
9
|
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
10
10
|
local ____entities = require("functions.entities")
|
|
11
11
|
local getEntities = ____entities.getEntities
|
|
12
|
+
local getEntityFromPtrHash = ____entities.getEntityFromPtrHash
|
|
12
13
|
local getEntityID = ____entities.getEntityID
|
|
13
14
|
local ____gridEntities = require("functions.gridEntities")
|
|
14
15
|
local getGridEntities = ____gridEntities.getGridEntities
|
|
@@ -217,4 +218,22 @@ function ____exports.logGridEntities(gridEntities)
|
|
|
217
218
|
____exports.logGridEntity(gridEntity)
|
|
218
219
|
end
|
|
219
220
|
end
|
|
221
|
+
--- Helper function to log information about the entity that corresponding to a pointer hash. (Only
|
|
222
|
+
-- use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
223
|
+
function ____exports.logPtrHash(ptrHash)
|
|
224
|
+
log("PtrHash: " .. tostring(ptrHash))
|
|
225
|
+
local entity = getEntityFromPtrHash(nil, ptrHash)
|
|
226
|
+
if entity == nil then
|
|
227
|
+
log("No corresponding entity found.")
|
|
228
|
+
else
|
|
229
|
+
____exports.logEntity(entity)
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
--- Helper function to log information about the entity that corresponding to one or more pointer
|
|
233
|
+
-- hashes. (Only use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
234
|
+
function ____exports.logPtrHashes(ptrHashes)
|
|
235
|
+
for ____, ptrHash in ipairs(ptrHashes) do
|
|
236
|
+
____exports.logPtrHash(ptrHash)
|
|
237
|
+
end
|
|
238
|
+
end
|
|
220
239
|
return ____exports
|
|
@@ -33,6 +33,9 @@ export declare function setFloorDisplayFlags(displayFlagsMap: Map<int, BitFlags<
|
|
|
33
33
|
* Helper function to set a particular room's minimap display flags (e.g. whether or not it is
|
|
34
34
|
* visible and so on).
|
|
35
35
|
*
|
|
36
|
+
* You must call the `Level.UpdateVisibility` method after using this function for the changes to
|
|
37
|
+
* take effect.
|
|
38
|
+
*
|
|
36
39
|
* @param roomGridIndex Set to undefined to use the current room index.
|
|
37
40
|
* @param displayFlags The bit flags value to set. (See the `DisplayFlag` enum.)
|
|
38
41
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minimap.d.ts","sourceRoot":"","sources":["../../src/functions/minimap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,8BAA8B,CAAC;AAK5E;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAS7C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAYtE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,CAAC,EAAE,GAAG,GAClB,QAAQ,CAAC,WAAW,CAAC,CAGvB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,eAAe,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,GAC/C,IAAI,CAgBN;AAED,gDAAgD;AAChD,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,GAC/C,IAAI,CAEN;AAED
|
|
1
|
+
{"version":3,"file":"minimap.d.ts","sourceRoot":"","sources":["../../src/functions/minimap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,8BAA8B,CAAC;AAK5E;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAS7C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAYtE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,CAAC,EAAE,GAAG,GAClB,QAAQ,CAAC,WAAW,CAAC,CAGvB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,eAAe,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,GAC/C,IAAI,CAgBN;AAED,gDAAgD;AAChD,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,GAC/C,IAAI,CAEN;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,GAAG,GAAG,SAAS,EAC9B,YAAY,EAAE,QAAQ,CAAC,WAAW,CAAC,GAClC,IAAI,CAGN"}
|
|
@@ -14,6 +14,9 @@ local getRoomsInsideGrid = ____rooms.getRoomsInsideGrid
|
|
|
14
14
|
--- Helper function to set a particular room's minimap display flags (e.g. whether or not it is
|
|
15
15
|
-- visible and so on).
|
|
16
16
|
--
|
|
17
|
+
-- You must call the `Level.UpdateVisibility` method after using this function for the changes to
|
|
18
|
+
-- take effect.
|
|
19
|
+
--
|
|
17
20
|
-- @param roomGridIndex Set to undefined to use the current room index.
|
|
18
21
|
-- @param displayFlags The bit flags value to set. (See the `DisplayFlag` enum.)
|
|
19
22
|
function ____exports.setRoomDisplayFlags(self, roomGridIndex, displayFlags)
|
package/dist/functions/npcs.d.ts
CHANGED
|
@@ -28,6 +28,12 @@ export declare function isAliveExceptionNPC(npc: EntityNPC): boolean;
|
|
|
28
28
|
* the way to tell them apart is to check for a non-undefined `Entity.SpawnerEntity` field.
|
|
29
29
|
*/
|
|
30
30
|
export declare function isDaddyLongLegsChildStompEntity(npc: EntityNPC): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Helper function to detect the custom death state of a Dump. When Dumps die, they go to
|
|
33
|
+
* `NpcState.SPECIAL`, spit out their head, and then slowly fade away while shooting a burst of
|
|
34
|
+
* tears.
|
|
35
|
+
*/
|
|
36
|
+
export declare function isDyingDump(npc: EntityNPC): boolean;
|
|
31
37
|
/**
|
|
32
38
|
* Helper function to detect the custom death state of an Eggy. Eggies are never actually marked
|
|
33
39
|
* dead by the game. Instead, when Eggies take fatal damage, they go into NpcState.STATE_SUICIDE and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npcs.d.ts","sourceRoot":"","sources":["../../src/functions/npcs.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"npcs.d.ts","sourceRoot":"","sources":["../../src/functions/npcs.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,UAAU,EASX,MAAM,8BAA8B,CAAC;AAgCtC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAC1B,UAAU,GAAE,UAAe,EAC3B,OAAO,SAAK,EACZ,OAAO,SAAK,EACZ,cAAc,UAAQ,GACrB,SAAS,EAAE,CAGb;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAiC3D;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAIvE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAMnD;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAOpE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAO3D"}
|
package/dist/functions/npcs.lua
CHANGED
|
@@ -11,6 +11,7 @@ local ChargerSubType = ____isaac_2Dtypescript_2Ddefinitions.ChargerSubType
|
|
|
11
11
|
local ChargerVariant = ____isaac_2Dtypescript_2Ddefinitions.ChargerVariant
|
|
12
12
|
local DarkEsauVariant = ____isaac_2Dtypescript_2Ddefinitions.DarkEsauVariant
|
|
13
13
|
local DeathVariant = ____isaac_2Dtypescript_2Ddefinitions.DeathVariant
|
|
14
|
+
local DumpVariant = ____isaac_2Dtypescript_2Ddefinitions.DumpVariant
|
|
14
15
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
15
16
|
local HopperVariant = ____isaac_2Dtypescript_2Ddefinitions.HopperVariant
|
|
16
17
|
local MamaGurdyVariant = ____isaac_2Dtypescript_2Ddefinitions.MamaGurdyVariant
|
|
@@ -46,6 +47,9 @@ function ____exports.isAliveExceptionNPC(self, npc)
|
|
|
46
47
|
if ____exports.isRaglingDeathPatch(nil, npc) then
|
|
47
48
|
return true
|
|
48
49
|
end
|
|
50
|
+
if ____exports.isDyingDump(nil, npc) then
|
|
51
|
+
return true
|
|
52
|
+
end
|
|
49
53
|
return false
|
|
50
54
|
end
|
|
51
55
|
--- Helper function to distinguish between a normal Daddy Long Legs / Triachnid and the child entity
|
|
@@ -57,6 +61,12 @@ end
|
|
|
57
61
|
function ____exports.isDaddyLongLegsChildStompEntity(self, npc)
|
|
58
62
|
return npc.Type == EntityType.DADDY_LONG_LEGS and npc.SpawnerEntity ~= nil
|
|
59
63
|
end
|
|
64
|
+
--- Helper function to detect the custom death state of a Dump. When Dumps die, they go to
|
|
65
|
+
-- `NpcState.SPECIAL`, spit out their head, and then slowly fade away while shooting a burst of
|
|
66
|
+
-- tears.
|
|
67
|
+
function ____exports.isDyingDump(self, npc)
|
|
68
|
+
return npc.Type == EntityType.DUMP and npc.Variant == asNumber(nil, DumpVariant.DUMP) and npc.State == NpcState.SPECIAL
|
|
69
|
+
end
|
|
60
70
|
--- Helper function to detect the custom death state of an Eggy. Eggies are never actually marked
|
|
61
71
|
-- dead by the game. Instead, when Eggies take fatal damage, they go into NpcState.STATE_SUICIDE and
|
|
62
72
|
-- spawn 14 Swarm Spiders while their StateFrame ticks upwards.
|
package/dist/index.d.ts
CHANGED
|
@@ -2983,6 +2983,13 @@ export declare function getEntities(entityType?: EntityType, variant?: number, s
|
|
|
2983
2983
|
*/
|
|
2984
2984
|
export declare function getEntityFields(entity: Entity): LuaMap<string, boolean | number | string>;
|
|
2985
2985
|
|
|
2986
|
+
/**
|
|
2987
|
+
* Helper function to get an entity from a `PtrHash`. Note that doing this is very expensive, so you
|
|
2988
|
+
* should only use this function when debugging. (Normally, if you need to work backwards from a
|
|
2989
|
+
* reference, you would use an `EntityPtr` instead of a `PtrHash`.
|
|
2990
|
+
*/
|
|
2991
|
+
export declare function getEntityFromPtrHash(ptrHash: PtrHash): Entity | undefined;
|
|
2992
|
+
|
|
2986
2993
|
/** Helper function to return a string containing the entity's type, variant, and sub-type. */
|
|
2987
2994
|
export declare function getEntityID(entity: Entity): string;
|
|
2988
2995
|
|
|
@@ -5778,6 +5785,13 @@ export declare function isDoorToMines(door: GridEntityDoor): boolean;
|
|
|
5778
5785
|
*/
|
|
5779
5786
|
export declare function isDoorToMomsHeart(door: GridEntityDoor): boolean;
|
|
5780
5787
|
|
|
5788
|
+
/**
|
|
5789
|
+
* Helper function to detect the custom death state of a Dump. When Dumps die, they go to
|
|
5790
|
+
* `NpcState.SPECIAL`, spit out their head, and then slowly fade away while shooting a burst of
|
|
5791
|
+
* tears.
|
|
5792
|
+
*/
|
|
5793
|
+
export declare function isDyingDump(npc: EntityNPC): boolean;
|
|
5794
|
+
|
|
5781
5795
|
/**
|
|
5782
5796
|
* Helper function to detect the custom death state of an Eggy. Eggies are never actually marked
|
|
5783
5797
|
* dead by the game. Instead, when Eggies take fatal damage, they go into NpcState.STATE_SUICIDE and
|
|
@@ -6588,6 +6602,18 @@ export declare function logPlayerHealth(this: void, player: EntityPlayer): void;
|
|
|
6588
6602
|
*/
|
|
6589
6603
|
export declare function logProjectileFlags(this: void, flags: ProjectileFlag | BitFlags<ProjectileFlag>): void;
|
|
6590
6604
|
|
|
6605
|
+
/**
|
|
6606
|
+
* Helper function to log information about the entity that corresponding to a pointer hash. (Only
|
|
6607
|
+
* use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
6608
|
+
*/
|
|
6609
|
+
export declare function logPtrHash(this: void, ptrHash: PtrHash): void;
|
|
6610
|
+
|
|
6611
|
+
/**
|
|
6612
|
+
* Helper function to log information about the entity that corresponding to one or more pointer
|
|
6613
|
+
* hashes. (Only use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
6614
|
+
*/
|
|
6615
|
+
export declare function logPtrHashes(this: void, ptrHashes: PtrHash[]): void;
|
|
6616
|
+
|
|
6591
6617
|
/** Helper function for logging information about the current room. */
|
|
6592
6618
|
export declare function logRoom(this: void): void;
|
|
6593
6619
|
|
|
@@ -10630,6 +10656,9 @@ export declare function setRoomData(roomGridIndex: int, roomData: Readonly<RoomC
|
|
|
10630
10656
|
* Helper function to set a particular room's minimap display flags (e.g. whether or not it is
|
|
10631
10657
|
* visible and so on).
|
|
10632
10658
|
*
|
|
10659
|
+
* You must call the `Level.UpdateVisibility` method after using this function for the changes to
|
|
10660
|
+
* take effect.
|
|
10661
|
+
*
|
|
10633
10662
|
* @param roomGridIndex Set to undefined to use the current room index.
|
|
10634
10663
|
* @param displayFlags The bit flags value to set. (See the `DisplayFlag` enum.)
|
|
10635
10664
|
*/
|
package/dist/maps/cardMap.lua
CHANGED
|
@@ -73,8 +73,8 @@ ____exports.CARD_MAP = __TS__New(Map, {
|
|
|
73
73
|
{"algiz", CardType.RUNE_ALGIZ},
|
|
74
74
|
{"resistance", CardType.RUNE_ALGIZ},
|
|
75
75
|
{"shield", CardType.RUNE_ALGIZ},
|
|
76
|
-
{"
|
|
77
|
-
{"
|
|
76
|
+
{"blankRune", CardType.RUNE_BLANK},
|
|
77
|
+
{"blackRune", CardType.RUNE_BLACK},
|
|
78
78
|
{"chaos", CardType.CHAOS},
|
|
79
79
|
{"credit", CardType.CREDIT},
|
|
80
80
|
{"rules", CardType.RULES},
|
package/package.json
CHANGED
|
@@ -380,8 +380,8 @@ export function cards(): void {
|
|
|
380
380
|
return;
|
|
381
381
|
}
|
|
382
382
|
|
|
383
|
-
const
|
|
384
|
-
spawnCard(asCardType(cardType),
|
|
383
|
+
const worldPosition = gridCoordinatesToWorldPosition(x, y);
|
|
384
|
+
spawnCard(asCardType(cardType), worldPosition);
|
|
385
385
|
cardType++;
|
|
386
386
|
}
|
|
387
387
|
}
|
|
@@ -409,13 +409,13 @@ export function chaosCardTears(): void {
|
|
|
409
409
|
* - character 2 - Restarts as Cain.
|
|
410
410
|
* - character ta - Restarts as Tainted Azazel.
|
|
411
411
|
*/
|
|
412
|
-
export function
|
|
412
|
+
export function character(params: string): void {
|
|
413
413
|
if (params === "") {
|
|
414
414
|
printConsole("You must specify a character name or number.");
|
|
415
415
|
return;
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
-
let
|
|
418
|
+
let playerType: PlayerType;
|
|
419
419
|
const num = tonumber(params) as PlayerType | undefined;
|
|
420
420
|
if (num === undefined) {
|
|
421
421
|
const match = getMapPartialMatch(params, CHARACTER_MAP);
|
|
@@ -424,19 +424,19 @@ export function characterCommand(params: string): void {
|
|
|
424
424
|
return;
|
|
425
425
|
}
|
|
426
426
|
|
|
427
|
-
|
|
427
|
+
playerType = match[1];
|
|
428
428
|
} else {
|
|
429
429
|
if (num < FIRST_CHARACTER || num > LAST_VANILLA_CHARACTER) {
|
|
430
430
|
printConsole(`Invalid player sub-type: ${num}`);
|
|
431
431
|
return;
|
|
432
432
|
}
|
|
433
433
|
|
|
434
|
-
|
|
434
|
+
playerType = num;
|
|
435
435
|
}
|
|
436
436
|
|
|
437
|
-
const characterName = getCharacterName(
|
|
438
|
-
restart(
|
|
439
|
-
printConsole(`Restarting as character: ${characterName} (${
|
|
437
|
+
const characterName = getCharacterName(playerType);
|
|
438
|
+
restart(playerType);
|
|
439
|
+
printConsole(`Restarting as character: ${characterName} (${playerType})`);
|
|
440
440
|
}
|
|
441
441
|
|
|
442
442
|
/** Alias for the "addCharges" command. */
|
|
@@ -734,8 +734,8 @@ export function gridEntities(): void {
|
|
|
734
734
|
return;
|
|
735
735
|
}
|
|
736
736
|
|
|
737
|
-
const
|
|
738
|
-
spawnGridEntity(gridEntityType,
|
|
737
|
+
const worldPosition = gridCoordinatesToWorldPosition(x, y);
|
|
738
|
+
spawnGridEntity(gridEntityType, worldPosition);
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
741
|
}
|
|
@@ -980,8 +980,8 @@ export function pills(): void {
|
|
|
980
980
|
return;
|
|
981
981
|
}
|
|
982
982
|
|
|
983
|
-
const
|
|
984
|
-
spawnPill(pillColor,
|
|
983
|
+
const worldPosition = gridCoordinatesToWorldPosition(x, y);
|
|
984
|
+
spawnPill(pillColor, worldPosition);
|
|
985
985
|
}
|
|
986
986
|
}
|
|
987
987
|
}
|
|
@@ -1041,7 +1041,7 @@ export function poopMana(params: string): void {
|
|
|
1041
1041
|
}
|
|
1042
1042
|
|
|
1043
1043
|
/** Alias for the "getPosition" command. */
|
|
1044
|
-
export function
|
|
1044
|
+
export function position(): void {
|
|
1045
1045
|
getPosition();
|
|
1046
1046
|
}
|
|
1047
1047
|
|
|
@@ -1056,7 +1056,7 @@ export function right(params: string): void {
|
|
|
1056
1056
|
}
|
|
1057
1057
|
|
|
1058
1058
|
/** Logs information about the room to the "log.txt" file. */
|
|
1059
|
-
export function
|
|
1059
|
+
export function room(): void {
|
|
1060
1060
|
logRoom();
|
|
1061
1061
|
printConsole('Logged room information to the "log.txt" file.');
|
|
1062
1062
|
}
|
|
@@ -1140,13 +1140,13 @@ export function secretRoom(): void {
|
|
|
1140
1140
|
|
|
1141
1141
|
/** Changes to a seeded run, using the seed of the current run. */
|
|
1142
1142
|
export function seedStick(): void {
|
|
1143
|
-
const
|
|
1144
|
-
const startSeedString =
|
|
1143
|
+
const seedsClass = game.GetSeeds();
|
|
1144
|
+
const startSeedString = seedsClass.GetStartSeedString();
|
|
1145
1145
|
Isaac.ExecuteCommand(`seed ${startSeedString}`);
|
|
1146
1146
|
}
|
|
1147
1147
|
|
|
1148
1148
|
/** Logs all of the current run's seed effects to the "log.txt" file. */
|
|
1149
|
-
export function
|
|
1149
|
+
export function seeds(): void {
|
|
1150
1150
|
logSeedEffects();
|
|
1151
1151
|
printConsole('Logged the seed effects to the "log.txt" file.');
|
|
1152
1152
|
}
|
|
@@ -1237,8 +1237,8 @@ export function setPosition(params: string): void {
|
|
|
1237
1237
|
}
|
|
1238
1238
|
|
|
1239
1239
|
const player = Isaac.GetPlayer();
|
|
1240
|
-
const
|
|
1241
|
-
player.Position =
|
|
1240
|
+
const newPosition = Vector(x, y);
|
|
1241
|
+
player.Position = newPosition;
|
|
1242
1242
|
}
|
|
1243
1243
|
|
|
1244
1244
|
/** Warps to the first shop on the floor. */
|
|
@@ -1329,8 +1329,8 @@ export function spawnGoldenTrinket(params: string): void {
|
|
|
1329
1329
|
}
|
|
1330
1330
|
|
|
1331
1331
|
const goldenTrinketType = getGoldenTrinketType(trinketType);
|
|
1332
|
-
const
|
|
1333
|
-
const centerPos =
|
|
1332
|
+
const roomClass = game.GetRoom();
|
|
1333
|
+
const centerPos = roomClass.GetCenterPos();
|
|
1334
1334
|
spawnTrinket(goldenTrinketType, centerPos);
|
|
1335
1335
|
}
|
|
1336
1336
|
|
|
@@ -1386,7 +1386,7 @@ export function tests(): void {
|
|
|
1386
1386
|
}
|
|
1387
1387
|
|
|
1388
1388
|
/** Creates a trapdoor next to the player. */
|
|
1389
|
-
export function
|
|
1389
|
+
export function trapdoor(): void {
|
|
1390
1390
|
spawnTrapdoorOrCrawlSpace(true);
|
|
1391
1391
|
}
|
|
1392
1392
|
|
|
@@ -194,6 +194,16 @@ function setPrimitiveEntityFields(
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
+
/**
|
|
198
|
+
* Helper function to get an entity from a `PtrHash`. Note that doing this is very expensive, so you
|
|
199
|
+
* should only use this function when debugging. (Normally, if you need to work backwards from a
|
|
200
|
+
* reference, you would use an `EntityPtr` instead of a `PtrHash`.
|
|
201
|
+
*/
|
|
202
|
+
export function getEntityFromPtrHash(ptrHash: PtrHash): Entity | undefined {
|
|
203
|
+
const entities = getEntities();
|
|
204
|
+
return entities.find((entity) => GetPtrHash(entity) === ptrHash);
|
|
205
|
+
}
|
|
206
|
+
|
|
197
207
|
/** Helper function to return a string containing the entity's type, variant, and sub-type. */
|
|
198
208
|
export function getEntityID(entity: Entity): string {
|
|
199
209
|
return `${entity.Type}.${entity.Variant}.${entity.SubType}`;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
EntityType,
|
|
4
4
|
GridEntityType,
|
|
5
5
|
} from "isaac-typescript-definitions";
|
|
6
|
-
import { getEntities, getEntityID } from "./entities";
|
|
6
|
+
import { getEntities, getEntityFromPtrHash, getEntityID } from "./entities";
|
|
7
7
|
import { getGridEntities, getGridEntityID } from "./gridEntities";
|
|
8
8
|
import { log } from "./log";
|
|
9
9
|
|
|
@@ -274,3 +274,27 @@ function getGridEntityLogLine(gridEntity: GridEntity, num?: int): string {
|
|
|
274
274
|
|
|
275
275
|
return msg;
|
|
276
276
|
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Helper function to log information about the entity that corresponding to a pointer hash. (Only
|
|
280
|
+
* use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
281
|
+
*/
|
|
282
|
+
export function logPtrHash(this: void, ptrHash: PtrHash): void {
|
|
283
|
+
log(`PtrHash: ${ptrHash}`);
|
|
284
|
+
const entity = getEntityFromPtrHash(ptrHash);
|
|
285
|
+
if (entity === undefined) {
|
|
286
|
+
log("No corresponding entity found.");
|
|
287
|
+
} else {
|
|
288
|
+
logEntity(entity);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Helper function to log information about the entity that corresponding to one or more pointer
|
|
294
|
+
* hashes. (Only use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
295
|
+
*/
|
|
296
|
+
export function logPtrHashes(this: void, ptrHashes: PtrHash[]): void {
|
|
297
|
+
for (const ptrHash of ptrHashes) {
|
|
298
|
+
logPtrHash(ptrHash);
|
|
299
|
+
}
|
|
300
|
+
}
|
package/src/functions/minimap.ts
CHANGED
|
@@ -90,6 +90,9 @@ export function setFloorDisplayFlags(
|
|
|
90
90
|
* Helper function to set a particular room's minimap display flags (e.g. whether or not it is
|
|
91
91
|
* visible and so on).
|
|
92
92
|
*
|
|
93
|
+
* You must call the `Level.UpdateVisibility` method after using this function for the changes to
|
|
94
|
+
* take effect.
|
|
95
|
+
*
|
|
93
96
|
* @param roomGridIndex Set to undefined to use the current room index.
|
|
94
97
|
* @param displayFlags The bit flags value to set. (See the `DisplayFlag` enum.)
|
|
95
98
|
*/
|
package/src/functions/npcs.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
ChargerVariant,
|
|
6
6
|
DarkEsauVariant,
|
|
7
7
|
DeathVariant,
|
|
8
|
+
DumpVariant,
|
|
8
9
|
EntityType,
|
|
9
10
|
HopperVariant,
|
|
10
11
|
MamaGurdyVariant,
|
|
@@ -101,6 +102,11 @@ export function isAliveExceptionNPC(npc: EntityNPC): boolean {
|
|
|
101
102
|
return true;
|
|
102
103
|
}
|
|
103
104
|
|
|
105
|
+
// EntityType.DUMP (876)
|
|
106
|
+
if (isDyingDump(npc)) {
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
|
|
104
110
|
return false;
|
|
105
111
|
}
|
|
106
112
|
|
|
@@ -118,6 +124,19 @@ export function isDaddyLongLegsChildStompEntity(npc: EntityNPC): boolean {
|
|
|
118
124
|
);
|
|
119
125
|
}
|
|
120
126
|
|
|
127
|
+
/**
|
|
128
|
+
* Helper function to detect the custom death state of a Dump. When Dumps die, they go to
|
|
129
|
+
* `NpcState.SPECIAL`, spit out their head, and then slowly fade away while shooting a burst of
|
|
130
|
+
* tears.
|
|
131
|
+
*/
|
|
132
|
+
export function isDyingDump(npc: EntityNPC): boolean {
|
|
133
|
+
return (
|
|
134
|
+
npc.Type === EntityType.DUMP &&
|
|
135
|
+
npc.Variant === asNumber(DumpVariant.DUMP) &&
|
|
136
|
+
npc.State === NpcState.SPECIAL
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
121
140
|
/**
|
|
122
141
|
* Helper function to detect the custom death state of an Eggy. Eggies are never actually marked
|
|
123
142
|
* dead by the game. Instead, when Eggies take fatal damage, they go into NpcState.STATE_SUICIDE and
|
package/src/maps/cardMap.ts
CHANGED
|
@@ -71,8 +71,8 @@ export const CARD_MAP: ReadonlyMap<string, CardType> = new Map([
|
|
|
71
71
|
["algiz", CardType.RUNE_ALGIZ], // 39
|
|
72
72
|
["resistance", CardType.RUNE_ALGIZ], // 39
|
|
73
73
|
["shield", CardType.RUNE_ALGIZ], // 39
|
|
74
|
-
["
|
|
75
|
-
["
|
|
74
|
+
["blankRune", CardType.RUNE_BLANK], // 40
|
|
75
|
+
["blackRune", CardType.RUNE_BLACK], // 41
|
|
76
76
|
["chaos", CardType.CHAOS], // 42
|
|
77
77
|
["credit", CardType.CREDIT], // 43
|
|
78
78
|
["rules", CardType.RULES], // 44
|