isaacscript-common 87.9.7 → 87.9.8
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/cachedEnumValues.js +29 -32
- package/dist/callbackClasses.js +142 -289
- package/dist/callbacks.js +147 -183
- package/dist/classes/DefaultMap.js +4 -8
- package/dist/classes/ModFeature.js +21 -25
- package/dist/classes/ModUpgraded.js +43 -47
- package/dist/classes/callbacks/EntityTakeDmgFilter.js +6 -10
- package/dist/classes/callbacks/EntityTakeDmgPlayer.js +7 -11
- package/dist/classes/callbacks/InputActionFilter.js +4 -8
- package/dist/classes/callbacks/InputActionPlayer.js +4 -8
- package/dist/classes/callbacks/PostAmbushFinished.js +10 -14
- package/dist/classes/callbacks/PostAmbushStarted.js +10 -14
- package/dist/classes/callbacks/PostBombExploded.js +8 -12
- package/dist/classes/callbacks/PostBombInitFilter.js +6 -10
- package/dist/classes/callbacks/PostBombInitLate.js +6 -10
- package/dist/classes/callbacks/PostBombRenderFilter.js +6 -10
- package/dist/classes/callbacks/PostBombUpdateFilter.js +6 -10
- package/dist/classes/callbacks/PostBoneSwing.js +7 -11
- package/dist/classes/callbacks/PostCollectibleEmpty.js +6 -10
- package/dist/classes/callbacks/PostCursedTeleport.js +30 -34
- package/dist/classes/callbacks/PostCustomRevive.js +4 -8
- package/dist/classes/callbacks/PostDiceRoomActivated.js +9 -13
- package/dist/classes/callbacks/PostDoorRender.js +8 -12
- package/dist/classes/callbacks/PostDoorUpdate.js +8 -12
- package/dist/classes/callbacks/PostEffectInitFilter.js +6 -10
- package/dist/classes/callbacks/PostEffectInitLate.js +6 -10
- package/dist/classes/callbacks/PostEffectRenderFilter.js +6 -10
- package/dist/classes/callbacks/PostEffectStateChanged.js +8 -12
- package/dist/classes/callbacks/PostEffectUpdateFilter.js +6 -10
- package/dist/classes/callbacks/PostEntityKillFilter.js +6 -10
- package/dist/classes/callbacks/PostEntityRemoveFilter.js +6 -10
- package/dist/classes/callbacks/PostEsauJr.js +4 -8
- package/dist/classes/callbacks/PostFamiliarInitFilter.js +6 -10
- package/dist/classes/callbacks/PostFamiliarInitLate.js +6 -10
- package/dist/classes/callbacks/PostFamiliarRenderFilter.js +6 -10
- package/dist/classes/callbacks/PostFamiliarStateChanged.js +8 -12
- package/dist/classes/callbacks/PostFamiliarUpdateFilter.js +6 -10
- package/dist/classes/callbacks/PostFirstEsauJr.js +4 -8
- package/dist/classes/callbacks/PostFirstFlip.js +4 -8
- package/dist/classes/callbacks/PostFlip.js +4 -8
- package/dist/classes/callbacks/PostGameEndFilter.js +6 -10
- package/dist/classes/callbacks/PostGameStartedReordered.js +6 -10
- package/dist/classes/callbacks/PostGameStartedReorderedLast.js +6 -10
- package/dist/classes/callbacks/PostGreedModeWave.js +7 -11
- package/dist/classes/callbacks/PostGridEntityBroken.js +6 -10
- package/dist/classes/callbacks/PostGridEntityCollision.js +4 -8
- package/dist/classes/callbacks/PostGridEntityCustomBroken.js +6 -10
- package/dist/classes/callbacks/PostGridEntityCustomCollision.js +4 -8
- package/dist/classes/callbacks/PostGridEntityCustomInit.js +6 -10
- package/dist/classes/callbacks/PostGridEntityCustomRemove.js +4 -8
- package/dist/classes/callbacks/PostGridEntityCustomRender.js +6 -10
- package/dist/classes/callbacks/PostGridEntityCustomStateChanged.js +6 -10
- package/dist/classes/callbacks/PostGridEntityCustomUpdate.js +6 -10
- package/dist/classes/callbacks/PostGridEntityInit.js +6 -10
- package/dist/classes/callbacks/PostGridEntityRemove.js +4 -8
- package/dist/classes/callbacks/PostGridEntityRender.js +6 -10
- package/dist/classes/callbacks/PostGridEntityStateChanged.js +6 -10
- package/dist/classes/callbacks/PostGridEntityUpdate.js +6 -10
- package/dist/classes/callbacks/PostHolyMantleRemoved.js +15 -19
- package/dist/classes/callbacks/PostItemDischarge.js +23 -27
- package/dist/classes/callbacks/PostItemPickup.js +6 -10
- package/dist/classes/callbacks/PostKeyboardChanged.js +9 -13
- package/dist/classes/callbacks/PostKnifeInitFilter.js +6 -10
- package/dist/classes/callbacks/PostKnifeInitLate.js +6 -10
- package/dist/classes/callbacks/PostKnifeRenderFilter.js +6 -10
- package/dist/classes/callbacks/PostKnifeUpdateFilter.js +6 -10
- package/dist/classes/callbacks/PostLaserInitFilter.js +6 -10
- package/dist/classes/callbacks/PostLaserInitLate.js +6 -10
- package/dist/classes/callbacks/PostLaserRenderFilter.js +6 -10
- package/dist/classes/callbacks/PostLaserUpdateFilter.js +6 -10
- package/dist/classes/callbacks/PostNPCDeathFilter.js +6 -10
- package/dist/classes/callbacks/PostNPCInitFilter.js +6 -10
- package/dist/classes/callbacks/PostNPCInitLate.js +6 -10
- package/dist/classes/callbacks/PostNPCRenderFilter.js +6 -10
- package/dist/classes/callbacks/PostNPCStateChanged.js +8 -12
- package/dist/classes/callbacks/PostNPCUpdateFilter.js +6 -10
- package/dist/classes/callbacks/PostNewLevelReordered.js +6 -10
- package/dist/classes/callbacks/PostNewRoomEarly.js +17 -21
- package/dist/classes/callbacks/PostNewRoomReordered.js +6 -10
- package/dist/classes/callbacks/PostPEffectUpdateReordered.js +6 -10
- package/dist/classes/callbacks/PostPickupChanged.js +6 -10
- package/dist/classes/callbacks/PostPickupCollect.js +8 -12
- package/dist/classes/callbacks/PostPickupInitFilter.js +6 -10
- package/dist/classes/callbacks/PostPickupInitFirst.js +10 -14
- package/dist/classes/callbacks/PostPickupInitLate.js +6 -10
- package/dist/classes/callbacks/PostPickupRenderFilter.js +6 -10
- package/dist/classes/callbacks/PostPickupSelectionFilter.js +4 -8
- package/dist/classes/callbacks/PostPickupStateChanged.js +8 -12
- package/dist/classes/callbacks/PostPickupUpdateFilter.js +6 -10
- package/dist/classes/callbacks/PostPitRender.js +8 -12
- package/dist/classes/callbacks/PostPitUpdate.js +8 -12
- package/dist/classes/callbacks/PostPlayerChangeHealth.js +14 -18
- package/dist/classes/callbacks/PostPlayerChangeStat.js +26 -30
- package/dist/classes/callbacks/PostPlayerChangeType.js +11 -15
- package/dist/classes/callbacks/PostPlayerCollectibleAdded.js +6 -10
- package/dist/classes/callbacks/PostPlayerCollectibleRemoved.js +6 -10
- package/dist/classes/callbacks/PostPlayerFatalDamage.js +24 -28
- package/dist/classes/callbacks/PostPlayerInitFirst.js +12 -16
- package/dist/classes/callbacks/PostPlayerInitLate.js +9 -13
- package/dist/classes/callbacks/PostPlayerRenderReordered.js +6 -10
- package/dist/classes/callbacks/PostPlayerUpdateReordered.js +6 -10
- package/dist/classes/callbacks/PostPoopRender.js +8 -12
- package/dist/classes/callbacks/PostPoopUpdate.js +8 -12
- package/dist/classes/callbacks/PostPressurePlateRender.js +8 -12
- package/dist/classes/callbacks/PostPressurePlateUpdate.js +8 -12
- package/dist/classes/callbacks/PostProjectileInitFilter.js +6 -10
- package/dist/classes/callbacks/PostProjectileInitLate.js +6 -10
- package/dist/classes/callbacks/PostProjectileKill.js +8 -12
- package/dist/classes/callbacks/PostProjectileRenderFilter.js +6 -10
- package/dist/classes/callbacks/PostProjectileUpdateFilter.js +6 -10
- package/dist/classes/callbacks/PostPurchase.js +21 -25
- package/dist/classes/callbacks/PostRockRender.js +8 -12
- package/dist/classes/callbacks/PostRockUpdate.js +8 -12
- package/dist/classes/callbacks/PostRoomClearChanged.js +9 -13
- package/dist/classes/callbacks/PostSacrifice.js +12 -16
- package/dist/classes/callbacks/PostSlotAnimationChanged.js +6 -10
- package/dist/classes/callbacks/PostSlotCollision.js +8 -12
- package/dist/classes/callbacks/PostSlotDestroyed.js +6 -10
- package/dist/classes/callbacks/PostSlotInit.js +6 -10
- package/dist/classes/callbacks/PostSlotRender.js +6 -10
- package/dist/classes/callbacks/PostSlotUpdate.js +6 -10
- package/dist/classes/callbacks/PostSpikesRender.js +8 -12
- package/dist/classes/callbacks/PostSpikesUpdate.js +8 -12
- package/dist/classes/callbacks/PostTNTRender.js +8 -12
- package/dist/classes/callbacks/PostTNTUpdate.js +8 -12
- package/dist/classes/callbacks/PostTearInitFilter.js +6 -10
- package/dist/classes/callbacks/PostTearInitLate.js +6 -10
- package/dist/classes/callbacks/PostTearInitVeryLate.js +6 -10
- package/dist/classes/callbacks/PostTearKill.js +8 -12
- package/dist/classes/callbacks/PostTearRenderFilter.js +6 -10
- package/dist/classes/callbacks/PostTearUpdateFilter.js +6 -10
- package/dist/classes/callbacks/PostTransformation.js +10 -14
- package/dist/classes/callbacks/PostTrinketBreak.js +16 -20
- package/dist/classes/callbacks/PostUsePillFilter.js +18 -22
- package/dist/classes/callbacks/PreBerserkDeath.js +14 -18
- package/dist/classes/callbacks/PreBombCollisionFilter.js +6 -10
- package/dist/classes/callbacks/PreCustomRevive.js +6 -10
- package/dist/classes/callbacks/PreEntitySpawnFilter.js +4 -8
- package/dist/classes/callbacks/PreFamiliarCollisionFilter.js +6 -10
- package/dist/classes/callbacks/PreGetPedestal.js +8 -12
- package/dist/classes/callbacks/PreItemPickup.js +6 -10
- package/dist/classes/callbacks/PreKnifeCollisionFilter.js +6 -10
- package/dist/classes/callbacks/PreNPCCollisionFilter.js +6 -10
- package/dist/classes/callbacks/PreNPCUpdateFilter.js +6 -10
- package/dist/classes/callbacks/PreNewLevel.js +10 -14
- package/dist/classes/callbacks/PreProjectileCollisionFilter.js +6 -10
- package/dist/classes/callbacks/PreRoomEntitySpawnFilter.js +4 -8
- package/dist/classes/callbacks/PreTearCollisionFilter.js +6 -10
- package/dist/classes/features/callbackLogic/CustomGridEntities.js +46 -50
- package/dist/classes/features/callbackLogic/CustomRevive.js +28 -32
- package/dist/classes/features/callbackLogic/EsauJrDetection.js +11 -15
- package/dist/classes/features/callbackLogic/FlipDetection.js +11 -15
- package/dist/classes/features/callbackLogic/GameReorderedCallbacks.js +26 -30
- package/dist/classes/features/callbackLogic/GridEntityCollisionDetection.js +10 -14
- package/dist/classes/features/callbackLogic/GridEntityRenderDetection.js +6 -10
- package/dist/classes/features/callbackLogic/GridEntityUpdateDetection.js +12 -16
- package/dist/classes/features/callbackLogic/ItemPickupDetection.js +17 -21
- package/dist/classes/features/callbackLogic/PickupChangeDetection.js +6 -10
- package/dist/classes/features/callbackLogic/PlayerCollectibleDetection.js +39 -43
- package/dist/classes/features/callbackLogic/PlayerReorderedCallbacks.js +18 -22
- package/dist/classes/features/callbackLogic/SlotDestroyedDetection.js +17 -21
- package/dist/classes/features/callbackLogic/SlotRenderDetection.js +8 -12
- package/dist/classes/features/callbackLogic/SlotUpdateDetection.js +9 -13
- package/dist/classes/features/other/CharacterHealthConversion.js +13 -17
- package/dist/classes/features/other/CharacterStats.js +9 -13
- package/dist/classes/features/other/CollectibleItemPoolType.js +17 -21
- package/dist/classes/features/other/CustomHotkeys.js +15 -19
- package/dist/classes/features/other/CustomItemPools.js +20 -24
- package/dist/classes/features/other/CustomPickups.js +15 -19
- package/dist/classes/features/other/CustomStages.js +116 -153
- package/dist/classes/features/other/CustomTrapdoors.js +119 -123
- package/dist/classes/features/other/DebugDisplay.js +77 -81
- package/dist/classes/features/other/DeployJSONRoom.js +65 -69
- package/dist/classes/features/other/DisableAllSound.js +14 -18
- package/dist/classes/features/other/DisableInputs.js +24 -28
- package/dist/classes/features/other/EdenStartingStatsHealth.js +36 -40
- package/dist/classes/features/other/ExtraConsoleCommands.js +65 -102
- package/dist/classes/features/other/FadeInRemover.js +9 -13
- package/dist/classes/features/other/FastReset.js +18 -22
- package/dist/classes/features/other/FlyingDetection.js +10 -14
- package/dist/classes/features/other/ForgottenSwitch.js +8 -12
- package/dist/classes/features/other/ItemPoolDetection.js +35 -39
- package/dist/classes/features/other/ModdedElementDetection.js +43 -47
- package/dist/classes/features/other/ModdedElementSets.js +135 -139
- package/dist/classes/features/other/NoSirenSteal.js +7 -11
- package/dist/classes/features/other/Pause.js +48 -52
- package/dist/classes/features/other/PersistentEntities.js +16 -20
- package/dist/classes/features/other/PickupIndexCreation.js +31 -35
- package/dist/classes/features/other/PlayerCollectibleTracking.js +18 -22
- package/dist/classes/features/other/PonyDetection.js +22 -26
- package/dist/classes/features/other/PressInput.js +10 -14
- package/dist/classes/features/other/PreventChildEntities.js +6 -10
- package/dist/classes/features/other/PreventGridEntityRespawn.js +34 -38
- package/dist/classes/features/other/RerunDetection.js +11 -15
- package/dist/classes/features/other/RoomClearFrame.js +11 -15
- package/dist/classes/features/other/RoomHistory.js +30 -34
- package/dist/classes/features/other/RunInNFrames.js +24 -28
- package/dist/classes/features/other/RunNextRoom.js +8 -12
- package/dist/classes/features/other/RunNextRun.js +8 -12
- package/dist/classes/features/other/SaveDataManager.js +61 -65
- package/dist/classes/features/other/SpawnRockAltRewards.js +115 -119
- package/dist/classes/features/other/StageHistory.js +76 -80
- package/dist/classes/features/other/StartAmbush.js +12 -16
- package/dist/classes/features/other/TaintedLazarusPlayers.js +10 -14
- package/dist/classes/features/other/UnlockAchievementsDetection.js +10 -14
- package/dist/classes/features/other/customStages/backdrop.js +68 -71
- package/dist/classes/features/other/customStages/constants.js +7 -10
- package/dist/classes/features/other/customStages/gridEntities.js +23 -30
- package/dist/classes/features/other/customStages/shadows.js +27 -30
- package/dist/classes/features/other/customStages/streakText.js +55 -60
- package/dist/classes/features/other/customStages/utils.js +13 -17
- package/dist/classes/features/other/customStages/v.js +4 -7
- package/dist/classes/features/other/customStages/versusScreen.js +46 -50
- package/dist/classes/features/other/debugDisplay/DebugDisplayBomb.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplayDoor.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplayEffect.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplayFamiliar.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplayKnife.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplayLaser.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplayNPC.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplayPickup.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplayPit.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplayPlayer.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplayPoop.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplayPressurePlate.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplayProjectile.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplayRock.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplaySlot.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplaySpikes.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplayTNT.js +8 -12
- package/dist/classes/features/other/debugDisplay/DebugDisplayTear.js +8 -12
- package/dist/classes/features/other/debugDisplay/utils.js +6 -10
- package/dist/classes/features/other/extraConsoleCommands/commands.js +411 -557
- package/dist/classes/features/other/extraConsoleCommands/subroutines.js +47 -57
- package/dist/classes/features/other/extraConsoleCommands/v.js +1 -4
- package/dist/classes/features/other/saveDataManager/constants.js +1 -4
- package/dist/classes/features/other/saveDataManager/glowingHourGlass.js +17 -21
- package/dist/classes/features/other/saveDataManager/loadFromDisk.js +19 -22
- package/dist/classes/features/other/saveDataManager/restoreDefaults.js +20 -25
- package/dist/classes/features/other/saveDataManager/saveToDisk.js +13 -16
- package/dist/classes/private/CustomCallback.js +4 -8
- package/dist/classes/private/Feature.js +1 -5
- package/dist/core/cachedClasses.js +12 -15
- package/dist/core/constants.js +126 -130
- package/dist/core/constantsFirstLast.js +22 -25
- package/dist/core/constantsVanilla.js +25 -28
- package/dist/core/upgradeMod.js +7 -10
- package/dist/decorators.js +6 -10
- package/dist/enums/AmbushType.js +2 -5
- package/dist/enums/CornerType.js +2 -5
- package/dist/enums/HealthType.js +2 -5
- package/dist/enums/ISCFeature.js +2 -5
- package/dist/enums/LadderSubTypeCustom.js +2 -5
- package/dist/enums/ModCallbackCustom.js +2 -5
- package/dist/enums/MysteriousPaperEffect.js +2 -5
- package/dist/enums/PlayerStat.js +2 -5
- package/dist/enums/PocketItemType.js +2 -5
- package/dist/enums/RockAltType.js +2 -5
- package/dist/enums/SaveDataKey.js +2 -5
- package/dist/enums/SerializationType.js +2 -5
- package/dist/enums/SlotDestructionType.js +2 -5
- package/dist/enums/private/GridEntityTypeCustom.js +1 -4
- package/dist/enums/private/SerializationBrand.js +2 -5
- package/dist/enums/private/StageTravelState.js +2 -5
- package/dist/enums/private/TrapdoorAnimation.js +2 -5
- package/dist/enums/private/UIStreakAnimation.js +2 -5
- package/dist/features.js +138 -141
- package/dist/functions/ambush.js +9 -12
- package/dist/functions/array.js +45 -76
- package/dist/functions/arrayLua.js +7 -16
- package/dist/functions/benchmark.js +4 -7
- package/dist/functions/bitSet128.js +19 -26
- package/dist/functions/bitwise.js +14 -23
- package/dist/functions/bombs.js +1 -4
- package/dist/functions/bosses.js +68 -85
- package/dist/functions/cards.js +44 -62
- package/dist/functions/challenges.js +28 -39
- package/dist/functions/characters.js +68 -87
- package/dist/functions/charge.js +41 -52
- package/dist/functions/chargeBar.js +2 -6
- package/dist/functions/collectibleTag.js +9 -13
- package/dist/functions/collectibles.js +133 -172
- package/dist/functions/color.js +29 -38
- package/dist/functions/console.js +4 -8
- package/dist/functions/curses.js +6 -10
- package/dist/functions/debugFunctions.js +7 -14
- package/dist/functions/decorators.js +13 -19
- package/dist/functions/deepCopy.js +96 -99
- package/dist/functions/deepCopyTests.js +56 -59
- package/dist/functions/dimensions.js +10 -14
- package/dist/functions/direction.js +22 -30
- package/dist/functions/doors.js +104 -154
- package/dist/functions/easing.js +30 -62
- package/dist/functions/effects.js +6 -10
- package/dist/functions/emptyRoom.js +30 -34
- package/dist/functions/entities.js +88 -115
- package/dist/functions/entitiesSpecific.js +83 -125
- package/dist/functions/entityTypes.js +3 -6
- package/dist/functions/enums.js +27 -41
- package/dist/functions/external.js +4 -8
- package/dist/functions/familiars.js +17 -25
- package/dist/functions/flag.js +10 -19
- package/dist/functions/frames.js +31 -51
- package/dist/functions/globals.js +26 -66
- package/dist/functions/gridEntities.js +231 -269
- package/dist/functions/gridEntitiesSpecific.js +86 -126
- package/dist/functions/gridIndex.js +8 -11
- package/dist/functions/hash.js +1 -4
- package/dist/functions/hex.js +7 -11
- package/dist/functions/input.js +65 -88
- package/dist/functions/isaacAPIClass.js +28 -53
- package/dist/functions/itemPool.js +39 -48
- package/dist/functions/jsonHelpers.js +5 -42
- package/dist/functions/jsonRoom.js +39 -46
- package/dist/functions/kColor.js +30 -39
- package/dist/functions/language.js +3 -6
- package/dist/functions/level.js +20 -26
- package/dist/functions/levelGrid.js +81 -108
- package/dist/functions/log.js +6 -12
- package/dist/functions/logEntities.js +49 -59
- package/dist/functions/logMisc.js +183 -214
- package/dist/functions/map.js +10 -20
- package/dist/functions/math.js +16 -31
- package/dist/functions/merge.js +48 -51
- package/dist/functions/mergeTests.js +34 -37
- package/dist/functions/minimap.js +34 -46
- package/dist/functions/modFeatures.js +1 -4
- package/dist/functions/newArray.js +5 -8
- package/dist/functions/nextStage.js +63 -67
- package/dist/functions/npcDataStructures.js +9 -20
- package/dist/functions/npcs.js +37 -45
- package/dist/functions/pickupVariants.js +26 -39
- package/dist/functions/pickups.js +43 -59
- package/dist/functions/pickupsSpecific.js +76 -118
- package/dist/functions/pills.js +52 -72
- package/dist/functions/playerCenter.js +13 -16
- package/dist/functions/playerCollectibles.js +59 -79
- package/dist/functions/playerDataStructures.js +18 -29
- package/dist/functions/playerEffects.js +12 -19
- package/dist/functions/playerHealth.js +91 -113
- package/dist/functions/playerIndex.js +22 -33
- package/dist/functions/playerTrinkets.js +31 -43
- package/dist/functions/players.js +87 -126
- package/dist/functions/pocketItems.js +33 -43
- package/dist/functions/positionVelocity.js +23 -32
- package/dist/functions/pressurePlate.js +7 -10
- package/dist/functions/projectiles.js +11 -15
- package/dist/functions/random.js +8 -13
- package/dist/functions/readOnly.js +3 -8
- package/dist/functions/render.js +7 -12
- package/dist/functions/revive.js +38 -45
- package/dist/functions/rng.js +31 -44
- package/dist/functions/rockAlt.js +18 -22
- package/dist/functions/roomData.js +24 -40
- package/dist/functions/roomGrid.js +17 -25
- package/dist/functions/roomShape.js +39 -55
- package/dist/functions/roomShapeWalls.js +67 -71
- package/dist/functions/roomTransition.js +13 -17
- package/dist/functions/rooms.js +181 -244
- package/dist/functions/run.js +29 -39
- package/dist/functions/seeds.js +6 -10
- package/dist/functions/serialization.js +27 -34
- package/dist/functions/set.js +24 -40
- package/dist/functions/slots.js +18 -22
- package/dist/functions/sort.js +9 -15
- package/dist/functions/sound.js +12 -16
- package/dist/functions/spawnCollectible.js +21 -26
- package/dist/functions/sprites.js +16 -24
- package/dist/functions/stage.js +122 -164
- package/dist/functions/stats.js +37 -43
- package/dist/functions/storyBosses.js +36 -40
- package/dist/functions/string.js +19 -33
- package/dist/functions/table.js +21 -31
- package/dist/functions/tears.js +6 -14
- package/dist/functions/transformations.js +35 -42
- package/dist/functions/trinketGive.js +29 -36
- package/dist/functions/trinkets.js +45 -60
- package/dist/functions/tstlClass.js +11 -20
- package/dist/functions/types.js +22 -46
- package/dist/functions/ui.js +25 -40
- package/dist/functions/utils.js +22 -36
- package/dist/functions/vector.js +33 -46
- package/dist/functions/versusScreen.js +12 -18
- package/dist/functions/weighted.js +8 -12
- package/dist/index.js +150 -166
- package/dist/indexLua.js +151 -167
- package/dist/interfaces/ChargeBarSprites.js +1 -2
- package/dist/interfaces/Corner.js +1 -2
- package/dist/interfaces/CustomStageTSConfig.js +1 -2
- package/dist/interfaces/GridEntityCustomData.js +1 -2
- package/dist/interfaces/JSONRoomsFile.js +1 -2
- package/dist/interfaces/PlayerHealth.js +1 -2
- package/dist/interfaces/PlayerStats.js +2 -4
- package/dist/interfaces/PocketItemDescription.js +1 -2
- package/dist/interfaces/RoomDescription.js +1 -2
- package/dist/interfaces/SaveData.js +1 -2
- package/dist/interfaces/StageHistoryEntry.js +1 -2
- package/dist/interfaces/TSTLClassMetatable.js +1 -2
- package/dist/interfaces/TrinketSituation.js +1 -2
- package/dist/interfaces/private/AddCallbackParametersCustom.js +2 -4
- package/dist/interfaces/private/CustomStage.js +1 -2
- package/dist/interfaces/private/CustomTrapdoorDescription.js +1 -2
- package/dist/interfaces/private/ModUpgradedInterface.js +1 -2
- package/dist/isaacscript-common.lua +1 -1
- package/dist/maps/PHDPillConversionsMap.js +19 -22
- package/dist/maps/cardNameToTypeMap.js +205 -208
- package/dist/maps/characterNameToTypeMap.js +85 -88
- package/dist/maps/collectibleNameToTypeMap.js +5 -8
- package/dist/maps/defaultPlayerStatMap.js +10 -13
- package/dist/maps/entityTypeVariantToBossIDMap.js +3 -6
- package/dist/maps/falsePHDPillConversionsMap.js +33 -36
- package/dist/maps/gridEntityTypeToBrokenStateMap.js +15 -18
- package/dist/maps/gridEntityXMLMap.js +52 -55
- package/dist/maps/itemPoolTypeToItemPoolName.js +33 -36
- package/dist/maps/keyboardToStringMap.js +66 -69
- package/dist/maps/pillNameToEffectMap.js +83 -86
- package/dist/maps/roomNameToTypeMap.js +38 -41
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.js +9 -12
- package/dist/maps/transformationNameToPlayerFormMap.js +30 -33
- package/dist/maps/trinketNameToTypeMap.js +5 -8
- package/dist/objects/LRoomShapeToRectangles.js +22 -25
- package/dist/objects/backdropTypeToRockAltType.js +65 -68
- package/dist/objects/batteryNames.js +8 -11
- package/dist/objects/bombNames.js +11 -14
- package/dist/objects/bossIDToEntityTypeVariant.js +116 -119
- package/dist/objects/bossNamePNGFileNames.js +104 -107
- package/dist/objects/bossNames.js +105 -108
- package/dist/objects/bossPortraitPNGFileNames.js +104 -107
- package/dist/objects/cardDescriptions.js +101 -104
- package/dist/objects/cardNames.js +101 -104
- package/dist/objects/challengeBosses.js +49 -52
- package/dist/objects/challengeCharacters.js +49 -52
- package/dist/objects/challengeCollectibleTypes.js +160 -163
- package/dist/objects/challengeNames.js +49 -52
- package/dist/objects/challengeTrinketType.js +48 -51
- package/dist/objects/characterDamageMultipliers.js +44 -47
- package/dist/objects/characterNames.js +44 -47
- package/dist/objects/characterSpritePNGFileNames.js +44 -47
- package/dist/objects/characterStartingCollectibleTypes.js +49 -52
- package/dist/objects/characterStartingTrinketTypes.js +44 -47
- package/dist/objects/chestNames.js +15 -18
- package/dist/objects/coinNames.js +11 -14
- package/dist/objects/coinSubTypeToValue.js +11 -14
- package/dist/objects/collectibleDescriptions.js +725 -728
- package/dist/objects/collectibleNames.js +725 -728
- package/dist/objects/colors.js +1 -4
- package/dist/objects/directionNames.js +7 -10
- package/dist/objects/directionToDegrees.js +7 -10
- package/dist/objects/directionToMoveAction.js +7 -10
- package/dist/objects/directionToShootAction.js +7 -10
- package/dist/objects/directionToVector.js +9 -12
- package/dist/objects/doorSlotFlagToDoorSlot.js +11 -14
- package/dist/objects/doorSlotToDirection.js +11 -14
- package/dist/objects/doorSlotToDoorSlotFlag.js +11 -14
- package/dist/objects/gridEntityTypeToANM2Name.js +30 -33
- package/dist/objects/heartNames.js +16 -19
- package/dist/objects/isaacAPIClassTypeToBrand.js +8 -11
- package/dist/objects/isaacAPIClassTypeToFunctions.js +37 -40
- package/dist/objects/itemPoolTypeToCollectibleTypesSet.js +9 -45
- package/dist/objects/kColors.js +1 -4
- package/dist/objects/keyNames.js +8 -11
- package/dist/objects/languageNames.js +9 -12
- package/dist/objects/oppositeDoorSlots.js +11 -14
- package/dist/objects/pillEffectClasses.js +53 -56
- package/dist/objects/pillEffectNames.js +53 -56
- package/dist/objects/pillEffectTypeToPillEffects.js +11 -14
- package/dist/objects/pillEffectTypes.js +53 -56
- package/dist/objects/playerNamePNGFileNames.js +44 -47
- package/dist/objects/playerPortraitPNGFileNames.js +44 -47
- package/dist/objects/roomShapeBounds.js +23 -26
- package/dist/objects/roomShapeCorners.js +128 -131
- package/dist/objects/roomShapeLayoutSizes.js +23 -26
- package/dist/objects/roomShapeToBottomRightPosition.js +17 -20
- package/dist/objects/roomShapeToDoorSlotCoordinates.js +78 -81
- package/dist/objects/roomShapeToDoorSlots.js +48 -51
- package/dist/objects/roomShapeToDoorSlotsToGridIndexDelta.js +82 -85
- package/dist/objects/roomShapeToGridWidth.js +14 -17
- package/dist/objects/roomShapeToTopLeftPosition.js +18 -21
- package/dist/objects/roomShapeVolumes.js +21 -24
- package/dist/objects/roomTypeNames.js +32 -35
- package/dist/objects/roomTypeSpecialGotoPrefixes.js +32 -35
- package/dist/objects/sackNames.js +6 -9
- package/dist/objects/slotNames.js +21 -24
- package/dist/objects/stageIDNames.js +33 -36
- package/dist/objects/stageToMusic.js +69 -72
- package/dist/objects/stageToStageID.js +90 -93
- package/dist/objects/stageTypeSuffixes.js +8 -11
- package/dist/objects/transformationNames.js +16 -19
- package/dist/objects/trinketDescriptions.js +192 -195
- package/dist/objects/trinketNames.js +192 -195
- package/dist/objects/versusScreenBackgroundColors.js +39 -42
- package/dist/objects/versusScreenDirtSpotColors.js +39 -42
- package/dist/patchErrorFunctions.js +4 -7
- package/dist/serialization.js +6 -9
- package/dist/sets/LRoomShapesSet.js +7 -10
- package/dist/sets/bigRoomShapesSet.js +10 -13
- package/dist/sets/bossSets.js +261 -264
- package/dist/sets/charactersThatStartWithAnActiveItemSet.js +14 -17
- package/dist/sets/charactersWithBlackHeartFromEternalHeartSet.js +5 -8
- package/dist/sets/charactersWithFreeDevilDealsSet.js +3 -6
- package/dist/sets/charactersWithNoRedHeartsSet.js +11 -14
- package/dist/sets/charactersWithNoSoulHeartsSet.js +8 -11
- package/dist/sets/consoleCommandsSet.js +2 -5
- package/dist/sets/entitiesWithArmorSet.js +44 -47
- package/dist/sets/familiarsThatShootPlayerTearsSet.js +11 -14
- package/dist/sets/itemConfigCardTypesForCards.js +7 -10
- package/dist/sets/lostStyleCharactersSet.js +8 -11
- package/dist/sets/mineShaftRoomSubTypesSet.js +8 -11
- package/dist/sets/narrowRoomShapesSet.js +7 -10
- package/dist/sets/poopGridEntityXMLTypesSet.js +12 -15
- package/dist/sets/redHeartSubTypesSet.js +6 -9
- package/dist/sets/repentanceBossIDsSet.js +26 -29
- package/dist/sets/sinEntityTypesSet.js +10 -13
- package/dist/sets/singleUseActiveCollectibleTypesSet.js +11 -14
- package/dist/shaderCrashFix.js +4 -7
- package/dist/shouldFire.js +28 -58
- package/dist/types/AddSubtract.js +1 -2
- package/dist/types/AllButFirst.js +1 -2
- package/dist/types/AllButLast.js +1 -2
- package/dist/types/AnyClass.js +1 -2
- package/dist/types/AnyEntity.js +1 -2
- package/dist/types/AnyFunction.js +1 -2
- package/dist/types/AnyGridEntity.js +1 -2
- package/dist/types/CompositionTypeSatisfiesEnum.js +1 -2
- package/dist/types/ConversionHeartSubType.js +1 -2
- package/dist/types/Decrement.js +1 -2
- package/dist/types/ERange.js +1 -2
- package/dist/types/EntityID.js +1 -2
- package/dist/types/FunctionTuple.js +1 -2
- package/dist/types/GridEntityID.js +1 -2
- package/dist/types/HasFunction.js +1 -2
- package/dist/types/IRange.js +1 -2
- package/dist/types/Immutable.js +1 -2
- package/dist/types/Increment.js +1 -2
- package/dist/types/LowercaseKeys.js +1 -2
- package/dist/types/NaturalNumbersLessThan.js +1 -2
- package/dist/types/NaturalNumbersLessThanOrEqualTo.js +1 -2
- package/dist/types/ObjectValues.js +1 -2
- package/dist/types/PickingUpItem.js +15 -22
- package/dist/types/PickupIndex.js +1 -2
- package/dist/types/PlayerIndex.js +1 -2
- package/dist/types/PossibleStatType.js +1 -2
- package/dist/types/PublicInterface.js +1 -2
- package/dist/types/ReadonlyMap.js +1 -4
- package/dist/types/ReadonlyRecord.js +1 -2
- package/dist/types/ReadonlySet.js +1 -4
- package/dist/types/StartsWithLowercase.js +1 -2
- package/dist/types/StartsWithUppercase.js +1 -2
- package/dist/types/TSTLClass.js +1 -2
- package/dist/types/Tuple.js +1 -2
- package/dist/types/TupleKeys.js +1 -2
- package/dist/types/TupleToIntersection.js +1 -2
- package/dist/types/TupleToUnion.js +1 -2
- package/dist/types/TupleWithLengthBetween.js +1 -2
- package/dist/types/TupleWithMaxLength.js +1 -2
- package/dist/types/UnionToIntersection.js +1 -2
- package/dist/types/UppercaseKeys.js +1 -2
- package/dist/types/WeightedArray.js +1 -2
- package/dist/types/WidenLiteral.js +1 -2
- package/dist/types/Writable.js +1 -2
- package/dist/types/private/CallbackTuple.js +1 -2
- package/dist/types/private/ModUpgradedWithFeatures.js +1 -2
- package/package.json +3 -3
package/dist/core/constants.js
CHANGED
|
@@ -1,67 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const types_1 = require("../functions/types");
|
|
10
|
-
const utils_1 = require("../functions/utils");
|
|
11
|
-
const ReadonlySet_1 = require("../types/ReadonlySet");
|
|
12
|
-
const constantsFirstLast_1 = require("./constantsFirstLast");
|
|
1
|
+
import { CollectibleType, Dimension, DisplayFlag, ItemPoolType, PickupVariant, PlayerType, TrinketSlot, } from "isaac-typescript-definitions";
|
|
2
|
+
import { getEnumLength } from "../functions/enums";
|
|
3
|
+
import { addFlag } from "../functions/flag";
|
|
4
|
+
import { newReadonlyColor, newReadonlyKColor, newReadonlyVector, } from "../functions/readOnly";
|
|
5
|
+
import { asCollectibleType } from "../functions/types";
|
|
6
|
+
import { eRange } from "../functions/utils";
|
|
7
|
+
import { ReadonlySet } from "../types/ReadonlySet";
|
|
8
|
+
import { NUM_NORMAL_PILL_COLORS } from "./constantsFirstLast";
|
|
13
9
|
/**
|
|
14
10
|
* The combination of the following flags:
|
|
15
11
|
* - `DisplayFlag.VISIBLE` (1 << 0)
|
|
16
12
|
* - `DisplayFlag.SHADOW` (1 << 1)
|
|
17
13
|
* - `DisplayFlag.SHOW_ICON` (1 << 2)
|
|
18
14
|
*/
|
|
19
|
-
|
|
15
|
+
export const ALL_DISPLAY_FLAGS = addFlag(DisplayFlag.VISIBLE, DisplayFlag.SHADOW, DisplayFlag.SHOW_ICON);
|
|
20
16
|
/**
|
|
21
17
|
* The distance of the laser when Azazel does not have any range up items yet. For more info, see
|
|
22
18
|
* the documentation for the `getAzazelBrimstoneDistance` function.
|
|
23
19
|
*/
|
|
24
|
-
|
|
20
|
+
export const AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125;
|
|
25
21
|
/**
|
|
26
22
|
* The path to the PNG file for collectible items during Curse of the Blind, making them appear with
|
|
27
23
|
* a red question mark.
|
|
28
24
|
*/
|
|
29
|
-
|
|
25
|
+
export const BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.png";
|
|
30
26
|
/** Bombs explode when their frame count is equal to this value. */
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
27
|
+
export const BOMB_EXPLODE_FRAME = 45;
|
|
28
|
+
export const CHEST_PICKUP_VARIANTS = [
|
|
29
|
+
PickupVariant.CHEST, // 50
|
|
30
|
+
PickupVariant.BOMB_CHEST, // 51
|
|
31
|
+
PickupVariant.SPIKED_CHEST, // 52
|
|
32
|
+
PickupVariant.ETERNAL_CHEST, // 53
|
|
33
|
+
PickupVariant.MIMIC_CHEST, // 54
|
|
34
|
+
PickupVariant.OLD_CHEST, // 55
|
|
35
|
+
PickupVariant.WOODEN_CHEST, // 56
|
|
36
|
+
PickupVariant.MEGA_CHEST, // 57
|
|
37
|
+
PickupVariant.HAUNTED_CHEST, // 58
|
|
38
|
+
PickupVariant.LOCKED_CHEST, // 60
|
|
39
|
+
PickupVariant.RED_CHEST, // 360
|
|
40
|
+
PickupVariant.MOMS_CHEST, // 390
|
|
45
41
|
];
|
|
46
|
-
|
|
42
|
+
export const CHEST_PICKUP_VARIANTS_SET = new ReadonlySet(CHEST_PICKUP_VARIANTS);
|
|
47
43
|
/** This is the initial value of the `EntityPickup.Wait` field after a collectible is spawned. */
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
export const COLLECTIBLE_INITIAL_WAIT = 20;
|
|
45
|
+
export const DEFAULT_ITEM_POOL_TYPE = ItemPoolType.TREASURE;
|
|
50
46
|
/** This is also the distance that a player spawns from the door that they enter a room from. */
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
export const DISTANCE_OF_GRID_TILE = 40;
|
|
48
|
+
export const DOGMA_ROOM_GRID_INDEX = 109;
|
|
49
|
+
export const DOOR_HITBOX_RADIUS = 11;
|
|
54
50
|
/**
|
|
55
51
|
* When Eggies take fatal damage, they go into NPCState.STATE_SUICIDE and spawn 14 Swarm Spiders
|
|
56
52
|
* while their StateFrame ticks upwards. The 14th spider appears when the StateFrame is at this
|
|
57
53
|
* value.
|
|
58
54
|
*/
|
|
59
|
-
|
|
55
|
+
export const EGGY_STATE_FRAME_OF_FINAL_SPIDER = 45;
|
|
60
56
|
/**
|
|
61
57
|
* A non-existent or completely transparent PNG file for use in clearing sprites. For more
|
|
62
58
|
* information, see the documentation for the `clearSprite` helper function.
|
|
63
59
|
*/
|
|
64
|
-
|
|
60
|
+
export const EMPTY_PNG_PATH = "gfx/none.png";
|
|
65
61
|
/**
|
|
66
62
|
* The random items that appear when the player has TMTRAINER are generated on the fly as they are
|
|
67
63
|
* encountered by the player. The first TMTRAINER item takes the final possible 32 bit number. The
|
|
@@ -69,78 +65,78 @@ exports.EMPTY_PNG_PATH = "gfx/none.png";
|
|
|
69
65
|
*
|
|
70
66
|
* This is equal to 4294967295.
|
|
71
67
|
*/
|
|
72
|
-
|
|
68
|
+
export const FIRST_GLITCHED_COLLECTIBLE_TYPE = asCollectibleType((1 << 32) - 1);
|
|
73
69
|
/**
|
|
74
70
|
* An array containing every flying character. This includes non-main characters such as The Soul.
|
|
75
71
|
*/
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
72
|
+
export const FLYING_CHARACTERS = [
|
|
73
|
+
PlayerType.AZAZEL, // 7
|
|
74
|
+
PlayerType.LOST, // 10
|
|
75
|
+
PlayerType.SOUL, // 17
|
|
76
|
+
PlayerType.LOST_B, // 31
|
|
77
|
+
PlayerType.JACOB_2_B, // 39
|
|
78
|
+
PlayerType.SOUL_B, // 40
|
|
83
79
|
];
|
|
84
80
|
/** Game frames are what is returned by the `Game.GetFrameCount` method. */
|
|
85
|
-
|
|
81
|
+
export const GAME_FRAMES_PER_SECOND = 30;
|
|
86
82
|
/** Game frames are what is returned by the `Game.GetFrameCount` method. */
|
|
87
|
-
|
|
83
|
+
export const GAME_FRAMES_PER_MINUTE = GAME_FRAMES_PER_SECOND * 60;
|
|
88
84
|
/**
|
|
89
85
|
* An array containing every character that is selectable from the main menu (and has achievements
|
|
90
86
|
* related to completing the various bosses and so on).
|
|
91
87
|
*/
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
88
|
+
export const MAIN_CHARACTERS = [
|
|
89
|
+
PlayerType.ISAAC, // 0
|
|
90
|
+
PlayerType.MAGDALENE, // 1
|
|
91
|
+
PlayerType.CAIN, // 2
|
|
92
|
+
PlayerType.JUDAS, // 3
|
|
93
|
+
PlayerType.BLUE_BABY, // 4
|
|
94
|
+
PlayerType.EVE, // 5
|
|
95
|
+
PlayerType.SAMSON, // 6
|
|
96
|
+
PlayerType.AZAZEL, // 7
|
|
97
|
+
PlayerType.LAZARUS, // 8
|
|
98
|
+
PlayerType.EDEN, // 9
|
|
99
|
+
PlayerType.LOST, // 10
|
|
100
|
+
PlayerType.LILITH, // 13
|
|
101
|
+
PlayerType.KEEPER, // 14
|
|
102
|
+
PlayerType.APOLLYON, // 15
|
|
103
|
+
PlayerType.FORGOTTEN, // 16
|
|
104
|
+
PlayerType.BETHANY, // 18
|
|
105
|
+
PlayerType.JACOB, // 19
|
|
106
|
+
PlayerType.ISAAC_B, // 21
|
|
107
|
+
PlayerType.MAGDALENE_B, // 22
|
|
108
|
+
PlayerType.CAIN_B, // 23
|
|
109
|
+
PlayerType.JUDAS_B, // 24
|
|
110
|
+
PlayerType.BLUE_BABY_B, // 25
|
|
111
|
+
PlayerType.EVE_B, // 26
|
|
112
|
+
PlayerType.SAMSON_B, // 27
|
|
113
|
+
PlayerType.AZAZEL_B, // 28
|
|
114
|
+
PlayerType.LAZARUS_B, // 29
|
|
115
|
+
PlayerType.EDEN_B, // 30
|
|
116
|
+
PlayerType.LOST_B, // 31
|
|
117
|
+
PlayerType.LILITH_B, // 32
|
|
118
|
+
PlayerType.KEEPER_B, // 33
|
|
119
|
+
PlayerType.APOLLYON_B, // 34
|
|
120
|
+
PlayerType.FORGOTTEN_B, // 35
|
|
121
|
+
PlayerType.BETHANY_B, // 36
|
|
122
|
+
PlayerType.JACOB_B, // 37
|
|
127
123
|
];
|
|
128
124
|
/** Render frames are what is returned by the `Isaac.GetFrameCount` method. */
|
|
129
|
-
|
|
125
|
+
export const RENDER_FRAMES_PER_SECOND = 60;
|
|
130
126
|
/** Render frames are what is returned by the `Isaac.GetFrameCount` method. */
|
|
131
|
-
|
|
132
|
-
|
|
127
|
+
export const RENDER_FRAMES_PER_MINUTE = RENDER_FRAMES_PER_SECOND * 60;
|
|
128
|
+
export const GRID_INDEX_CENTER_OF_1X1_ROOM = 67;
|
|
133
129
|
/**
|
|
134
130
|
* The floor is represented by a 13x13 grid. Room indexes start at 0. The first column is
|
|
135
131
|
* represented by grid indexes 0, 13, 26, and so on.
|
|
136
132
|
*/
|
|
137
|
-
|
|
133
|
+
export const LEVEL_GRID_COLUMN_HEIGHT = 13;
|
|
138
134
|
/**
|
|
139
135
|
* The floor is represented by a 13x13 grid. Room indexes start at 0. The first row is represented
|
|
140
136
|
* by grid indexes from 0 to 12. The second row is represented by grid indexes from 13 to 25, and so
|
|
141
137
|
* on.
|
|
142
138
|
*/
|
|
143
|
-
|
|
139
|
+
export const LEVEL_GRID_ROW_WIDTH = 13;
|
|
144
140
|
/**
|
|
145
141
|
* All of the collectibles that grant vision on the map.
|
|
146
142
|
*
|
|
@@ -152,128 +148,128 @@ exports.LEVEL_GRID_ROW_WIDTH = 13;
|
|
|
152
148
|
* - Cracked Orb is included, even though it requires the player to be damaged in order for it to be
|
|
153
149
|
* activated.
|
|
154
150
|
*/
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
151
|
+
export const MAPPING_COLLECTIBLES = [
|
|
152
|
+
CollectibleType.COMPASS, // 21
|
|
153
|
+
CollectibleType.TREASURE_MAP, // 54
|
|
154
|
+
CollectibleType.SPELUNKER_HAT, // 91
|
|
155
|
+
CollectibleType.CRYSTAL_BALL, // 158
|
|
156
|
+
CollectibleType.BLUE_MAP, // 246
|
|
157
|
+
CollectibleType.BOOK_OF_SECRETS, // 287
|
|
158
|
+
CollectibleType.MIND, // 333
|
|
159
|
+
CollectibleType.SOL, // 588
|
|
160
|
+
CollectibleType.LUNA, // 589
|
|
161
|
+
CollectibleType.CRACKED_ORB, // 675
|
|
166
162
|
];
|
|
167
163
|
/**
|
|
168
164
|
* The floor is represented by a 13x13 grid. Room indexes start at 0. The first row is represented
|
|
169
165
|
* by grid indexes from 0 to 12. The second row is represented by grid indexes from 13 to 25, and so
|
|
170
166
|
* on. The maximum room index possible is 168. (It is not 169 because we start at 0 instead of 1.)
|
|
171
167
|
*/
|
|
172
|
-
|
|
168
|
+
export const MAX_LEVEL_GRID_INDEX = 168;
|
|
173
169
|
/**
|
|
174
170
|
* The game has a limit on the number of currently spawned familiars and will refuse to spawn any
|
|
175
171
|
* more if it reaches the limit. Blue flies and blue spiders have a lower priority and will be
|
|
176
172
|
* deleted to make room for other familiars.
|
|
177
173
|
*/
|
|
178
|
-
|
|
174
|
+
export const MAX_NUM_FAMILIARS = 64;
|
|
179
175
|
/** The game can only handle up to four different players. */
|
|
180
|
-
|
|
176
|
+
export const MAX_NUM_INPUTS = 4;
|
|
181
177
|
/** With Birthright, it is possible for Magdalene to have 18 heart containers. */
|
|
182
|
-
|
|
178
|
+
export const MAX_PLAYER_HEART_CONTAINERS = 18;
|
|
183
179
|
/**
|
|
184
180
|
* As the player continues to move in a direction, they will accelerate. When going from one wall to
|
|
185
181
|
* another in a 2x2 room at 2.0 speed (the maximum that the speed stat can rise to), the amount of
|
|
186
182
|
* units moved per update frame will climb to around 9.797 as they hit the opposite wall. The
|
|
187
183
|
* constant specifies a value of 9.8 to be safe.
|
|
188
184
|
*/
|
|
189
|
-
|
|
190
|
-
|
|
185
|
+
export const MAX_PLAYER_SPEED_IN_UNITS = 9.8;
|
|
186
|
+
export const MAX_PLAYER_TRINKET_SLOTS = getEnumLength(TrinketSlot);
|
|
191
187
|
/** If you set `EntityPlayer.ShotSpeed` lower than this value, it will have no effect. */
|
|
192
|
-
|
|
188
|
+
export const MIN_PLAYER_SHOT_SPEED_STAT = 0.6;
|
|
193
189
|
/** If you set `EntityPlayer.Speed` lower than this value, it will have no effect. */
|
|
194
|
-
|
|
190
|
+
export const MIN_PLAYER_SPEED_STAT = 0.1;
|
|
195
191
|
/**
|
|
196
192
|
* The maximum speed stat that a player can have. Any additional speed beyond this will not take
|
|
197
193
|
* effect.
|
|
198
194
|
*/
|
|
199
|
-
|
|
195
|
+
export const MAX_SPEED_STAT = 2;
|
|
200
196
|
/** This is in the center of the room. */
|
|
201
|
-
|
|
197
|
+
export const NEW_FLOOR_STARTING_POSITION_NORMAL_MODE = newReadonlyVector(320, 280);
|
|
202
198
|
/** This is near the top door. */
|
|
203
|
-
|
|
199
|
+
export const NEW_FLOOR_STARTING_POSITION_GREED_MODE = newReadonlyVector(320, 280);
|
|
204
200
|
/**
|
|
205
201
|
* This is next to the bottom door. Presumably, the player does not start in the center of the room
|
|
206
202
|
* (like they do when getting to a new stage) so that the controls graphic is more visible.
|
|
207
203
|
*/
|
|
208
|
-
|
|
204
|
+
export const NEW_RUN_PLAYER_STARTING_POSITION = newReadonlyVector(320, 380);
|
|
209
205
|
/** Corresponds to the maximum value for `EntityPlayer.SamsonBerserkCharge`. */
|
|
210
|
-
|
|
206
|
+
export const MAX_TAINTED_SAMSON_BERSERK_CHARGE = 100_000;
|
|
211
207
|
/**
|
|
212
208
|
* The number of dimensions, not including `Dimension.CURRENT`. (This is derived from the
|
|
213
209
|
* `Dimension` enum.)
|
|
214
210
|
*/
|
|
215
|
-
|
|
211
|
+
export const NUM_DIMENSIONS = getEnumLength(Dimension) - 1;
|
|
216
212
|
/**
|
|
217
213
|
* An array containing every valid `Dimension`, not including `Dimension.CURRENT`. (This is derived
|
|
218
214
|
* from the `NUM_DIMENSIONS` constant.)
|
|
219
215
|
*
|
|
220
216
|
* We cannot use the values of the `Dimension` enum because it includes -1.
|
|
221
217
|
*/
|
|
222
|
-
|
|
218
|
+
export const DIMENSIONS = eRange(NUM_DIMENSIONS);
|
|
223
219
|
/**
|
|
224
220
|
* The pill pool for each run is comprised of one effect for each unique pill color (minus gold and
|
|
225
221
|
* horse pills.)
|
|
226
222
|
*/
|
|
227
223
|
// TypeDoc will not work properly with the preferred export form.
|
|
228
224
|
// eslint-disable-next-line unicorn/prefer-export-from
|
|
229
|
-
|
|
230
|
-
|
|
225
|
+
export const NUM_PILL_COLORS_IN_POOL = NUM_NORMAL_PILL_COLORS;
|
|
226
|
+
export const ONE_BY_ONE_ROOM_GRID_SIZE = 135;
|
|
231
227
|
/**
|
|
232
228
|
* An array representing every valid collectible type quality. Specifically, this is: `[0, 1, 2, 3,
|
|
233
229
|
* 4]`
|
|
234
230
|
*/
|
|
235
231
|
// eslint-disable-next-line complete/require-capital-const-assertions
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
232
|
+
export const QUALITIES = [0, 1, 2, 3, 4];
|
|
233
|
+
export const MAX_QUALITY = 4;
|
|
234
|
+
export const SECOND_IN_MILLISECONDS = 1000;
|
|
235
|
+
export const MINUTE_IN_MILLISECONDS = 60 * SECOND_IN_MILLISECONDS;
|
|
240
236
|
/** This is equivalent to the bottom-right screen position when the game is in full screen mode. */
|
|
241
|
-
|
|
237
|
+
export const RESOLUTION_FULL_SCREEN = Vector(480, 270);
|
|
242
238
|
/**
|
|
243
239
|
* This is equivalent to the bottom-right screen position when the game is in windowed mode in a
|
|
244
240
|
* 1600x900 resolution.
|
|
245
241
|
*/
|
|
246
|
-
|
|
242
|
+
export const RESOLUTION_1600_900 = Vector(533, 300);
|
|
247
243
|
/**
|
|
248
244
|
* The starting room of the floor is always at the same grid index, which is in the middle of the
|
|
249
245
|
* 13x13 grid.
|
|
250
246
|
*/
|
|
251
|
-
|
|
247
|
+
export const STARTING_ROOM_GRID_INDEX = 84;
|
|
252
248
|
/** After taking damage, `EntityPlayer.SamsonBerserkCharge` is incremented by this amount. */
|
|
253
|
-
|
|
249
|
+
export const TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = 10_000;
|
|
254
250
|
/** For `GridEntityType.TELEPORTER` (23). */
|
|
255
|
-
|
|
251
|
+
export const TELEPORTER_ACTIVATION_DISTANCE = DISTANCE_OF_GRID_TILE / 2;
|
|
256
252
|
/** In milliseconds, as reported by the `Isaac.GetTime` method. */
|
|
257
|
-
|
|
253
|
+
export const TIME_GAME_OPENED = Isaac.GetTime();
|
|
258
254
|
/**
|
|
259
255
|
* This is the number of draw coordinates that each heart spans on the UI in the upper left hand
|
|
260
256
|
* corner.
|
|
261
257
|
*/
|
|
262
|
-
|
|
258
|
+
export const UI_HEART_WIDTH = 12;
|
|
263
259
|
/**
|
|
264
260
|
* Equal to `Vector(1, 1)`.
|
|
265
261
|
*
|
|
266
262
|
* This is a safe version of the `Vector.One` constant. (Other mods can mutate `Vector.One`, so it
|
|
267
263
|
* is not safe to use.)
|
|
268
264
|
*/
|
|
269
|
-
|
|
265
|
+
export const VectorOne = newReadonlyVector(1, 1);
|
|
270
266
|
/**
|
|
271
267
|
* Equal to `Vector(0, 0)`.
|
|
272
268
|
*
|
|
273
269
|
* This is a safe version of the `Vector.Zero` constant. (Other mods can mutate `Vector.Zero`, so it
|
|
274
270
|
* is not safe to use.)
|
|
275
271
|
*/
|
|
276
|
-
|
|
272
|
+
export const VectorZero = newReadonlyVector(0, 0);
|
|
277
273
|
/**
|
|
278
274
|
* Equal to `Color(1, 1, 1)`.
|
|
279
275
|
*
|
|
@@ -282,10 +278,10 @@ exports.VectorZero = (0, readOnly_1.newReadonlyVector)(0, 0);
|
|
|
282
278
|
*
|
|
283
279
|
* If you need to mutate this, make a copy first with the `copyColor` helper function.
|
|
284
280
|
*/
|
|
285
|
-
|
|
281
|
+
export const ColorDefault = newReadonlyColor(1, 1, 1);
|
|
286
282
|
/**
|
|
287
283
|
* Equal to `KColor(1, 1, 1, 1)`.
|
|
288
284
|
*
|
|
289
285
|
* If you need to mutate this, make a copy first with the `copyKColor` helper function.
|
|
290
286
|
*/
|
|
291
|
-
|
|
287
|
+
export const KColorDefault = newReadonlyKColor(1, 1, 1, 1);
|
|
@@ -1,98 +1,95 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* Constants relating to the first and last value for various vanilla objects.
|
|
4
3
|
*
|
|
5
4
|
* @module
|
|
6
5
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
|
|
10
|
-
const enums_1 = require("../functions/enums");
|
|
6
|
+
import { CardType, Challenge, CollectibleType, PillColor, PillEffect, PlayerType, TrinketType, } from "isaac-typescript-definitions";
|
|
7
|
+
import { getEnumLength, getHighestEnumValue } from "../functions/enums";
|
|
11
8
|
// ------------
|
|
12
9
|
// Collectibles
|
|
13
10
|
// ------------
|
|
14
11
|
/** Equal to `CollectibleType.SAD_ONION` (1). */
|
|
15
|
-
|
|
12
|
+
export const FIRST_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION;
|
|
16
13
|
/**
|
|
17
14
|
* Calculated from the `CollectibleType` enum.
|
|
18
15
|
*
|
|
19
16
|
* Note that this cannot be calculated from the length of the enum, because collectible types are
|
|
20
17
|
* not contiguous.
|
|
21
18
|
*/
|
|
22
|
-
|
|
19
|
+
export const LAST_VANILLA_COLLECTIBLE_TYPE = getHighestEnumValue(CollectibleType);
|
|
23
20
|
/** Calculated from the `CollectibleType` enum. (`CollectibleType.NULL` is not included.) */
|
|
24
|
-
|
|
21
|
+
export const NUM_VANILLA_COLLECTIBLE_TYPES = getEnumLength(CollectibleType) - 1;
|
|
25
22
|
// --------
|
|
26
23
|
// Trinkets
|
|
27
24
|
// --------
|
|
28
25
|
/** Equal to `TrinketType.SWALLOWED_PENNY` (1). */
|
|
29
|
-
|
|
26
|
+
export const FIRST_TRINKET_TYPE = TrinketType.SWALLOWED_PENNY;
|
|
30
27
|
/**
|
|
31
28
|
* Calculated from the `TrinketType` enum.
|
|
32
29
|
*
|
|
33
30
|
* Note that this cannot be calculated from the length of the enum, because trinket types are not
|
|
34
31
|
* contiguous.
|
|
35
32
|
*/
|
|
36
|
-
|
|
33
|
+
export const LAST_VANILLA_TRINKET_TYPE = getHighestEnumValue(TrinketType);
|
|
37
34
|
/** Calculated from the `TrinketType` enum. (`TrinketType.NULL` is not included.) */
|
|
38
|
-
|
|
35
|
+
export const NUM_VANILLA_TRINKET_TYPES = getEnumLength(TrinketType) - 1;
|
|
39
36
|
// -----
|
|
40
37
|
// Cards
|
|
41
38
|
// -----
|
|
42
39
|
/** Equal to `Card.FOOL` (1). */
|
|
43
|
-
|
|
40
|
+
export const FIRST_CARD_TYPE = CardType.FOOL;
|
|
44
41
|
/** Calculated from the `CardType` enum. */
|
|
45
|
-
|
|
42
|
+
export const LAST_VANILLA_CARD_TYPE = getHighestEnumValue(CardType);
|
|
46
43
|
/** Calculated from the `Card` enum. `Card.NULL` is not included. */
|
|
47
|
-
|
|
44
|
+
export const NUM_VANILLA_CARD_TYPES = getEnumLength(CardType) - 1;
|
|
48
45
|
// ------------
|
|
49
46
|
// Pill Effects
|
|
50
47
|
// ------------
|
|
51
48
|
/** Equal to `PillEffect.BAD_GAS` (0). */
|
|
52
|
-
|
|
49
|
+
export const FIRST_PILL_EFFECT = PillEffect.BAD_GAS;
|
|
53
50
|
/** Calculated from the `PillEffect` enum. */
|
|
54
|
-
|
|
51
|
+
export const LAST_VANILLA_PILL_EFFECT = getHighestEnumValue(PillEffect);
|
|
55
52
|
/**
|
|
56
53
|
* Calculated from the `PillEffect` enum. (There is no `PillEffect.NULL` in the custom enum, so we
|
|
57
54
|
* do not have to subtract one here.)
|
|
58
55
|
*/
|
|
59
|
-
|
|
56
|
+
export const NUM_VANILLA_PILL_EFFECTS = getEnumLength(PillEffect);
|
|
60
57
|
// -----------
|
|
61
58
|
// Pill Colors
|
|
62
59
|
// -----------
|
|
63
60
|
/** Equal to `PillColor.BLUE_BLUE` (1). */
|
|
64
|
-
|
|
61
|
+
export const FIRST_PILL_COLOR = PillColor.BLUE_BLUE;
|
|
65
62
|
/**
|
|
66
63
|
* Equal to `PillColor.WHITE_YELLOW` (13).
|
|
67
64
|
*
|
|
68
65
|
* Note that `PillColor.GOLD` is technically higher, but that is not considered for the purposes of
|
|
69
66
|
* this constant.
|
|
70
67
|
*/
|
|
71
|
-
|
|
68
|
+
export const LAST_NORMAL_PILL_COLOR = PillColor.WHITE_YELLOW;
|
|
72
69
|
/** Equal to `PillColor.HORSE_BLUE_BLUE` (2049). */
|
|
73
|
-
|
|
70
|
+
export const FIRST_HORSE_PILL_COLOR = PillColor.HORSE_BLUE_BLUE;
|
|
74
71
|
/**
|
|
75
72
|
* Equal to `PillColor.HORSE_WHITE_YELLOW` (2061).
|
|
76
73
|
*
|
|
77
74
|
* Note that `PillColor.HORSE_GOLD` is technically higher, but that is not considered for the
|
|
78
75
|
* purposes of this constant.
|
|
79
76
|
*/
|
|
80
|
-
|
|
77
|
+
export const LAST_HORSE_PILL_COLOR = PillColor.HORSE_WHITE_YELLOW;
|
|
81
78
|
/**
|
|
82
79
|
* Calculated from the difference between the first pill color and the last pill color. This does
|
|
83
80
|
* not include Gold Pills. In Repentance, this should be equal to 13.
|
|
84
81
|
*/
|
|
85
|
-
|
|
82
|
+
export const NUM_NORMAL_PILL_COLORS = LAST_NORMAL_PILL_COLOR - FIRST_PILL_COLOR + 1;
|
|
86
83
|
// -------
|
|
87
84
|
// Players
|
|
88
85
|
// -------
|
|
89
86
|
/** Equal to `PlayerType.ISAAC` (0). */
|
|
90
|
-
|
|
87
|
+
export const FIRST_CHARACTER = PlayerType.ISAAC;
|
|
91
88
|
// It is not possible to determine "LAST_CHARACTER", since there is no associated config.
|
|
92
89
|
/** Calculated from the `PlayerType` enum. */
|
|
93
|
-
|
|
90
|
+
export const LAST_VANILLA_CHARACTER = getHighestEnumValue(PlayerType);
|
|
94
91
|
// ----------
|
|
95
92
|
// Challenges
|
|
96
93
|
// ----------
|
|
97
94
|
/** Calculated from the `Challenge` enum. `Challenge.NULL` is not included. */
|
|
98
|
-
|
|
95
|
+
export const NUM_VANILLA_CHALLENGES = getEnumLength(Challenge) - 1;
|