isaacscript-common 84.0.0 → 84.1.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/arrays/cachedEnumValues.js +33 -0
- package/dist/callbackClasses.js +289 -0
- package/dist/callbacks.js +181 -0
- package/dist/classes/DefaultMap.js +171 -0
- package/dist/classes/ModFeature.js +244 -0
- package/dist/classes/ModUpgraded.js +324 -0
- package/dist/classes/callbacks/EntityTakeDmgFilter.js +19 -0
- package/dist/classes/callbacks/EntityTakeDmgPlayer.js +29 -0
- package/dist/classes/callbacks/InputActionFilter.js +24 -0
- package/dist/classes/callbacks/InputActionPlayer.js +37 -0
- package/dist/classes/callbacks/PostAmbushFinished.js +40 -0
- package/dist/classes/callbacks/PostAmbushStarted.js +40 -0
- package/dist/classes/callbacks/PostBombExploded.js +24 -0
- package/dist/classes/callbacks/PostBombInitFilter.js +21 -0
- package/dist/classes/callbacks/PostBombInitLate.js +31 -0
- package/dist/classes/callbacks/PostBombRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostBombUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostBoneSwing.js +53 -0
- package/dist/classes/callbacks/PostCollectibleEmpty.js +50 -0
- package/dist/classes/callbacks/PostCursedTeleport.js +119 -0
- package/dist/classes/callbacks/PostCustomRevive.js +17 -0
- package/dist/classes/callbacks/PostDiceRoomActivated.js +50 -0
- package/dist/classes/callbacks/PostDoorRender.js +24 -0
- package/dist/classes/callbacks/PostDoorUpdate.js +24 -0
- package/dist/classes/callbacks/PostEffectInitFilter.js +21 -0
- package/dist/classes/callbacks/PostEffectInitLate.js +31 -0
- package/dist/classes/callbacks/PostEffectRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostEffectStateChanged.js +34 -0
- package/dist/classes/callbacks/PostEffectUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostEntityKillFilter.js +21 -0
- package/dist/classes/callbacks/PostEsauJr.js +12 -0
- package/dist/classes/callbacks/PostFamiliarInitFilter.js +21 -0
- package/dist/classes/callbacks/PostFamiliarInitLate.js +31 -0
- package/dist/classes/callbacks/PostFamiliarRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostFamiliarStateChanged.js +34 -0
- package/dist/classes/callbacks/PostFamiliarUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostFirstEsauJr.js +12 -0
- package/dist/classes/callbacks/PostFirstFlip.js +12 -0
- package/dist/classes/callbacks/PostFlip.js +12 -0
- package/dist/classes/callbacks/PostGameEndFilter.js +21 -0
- package/dist/classes/callbacks/PostGameStartedReordered.js +14 -0
- package/dist/classes/callbacks/PostGameStartedReorderedLast.js +14 -0
- package/dist/classes/callbacks/PostGreedModeWave.js +35 -0
- package/dist/classes/callbacks/PostGridEntityBroken.js +14 -0
- package/dist/classes/callbacks/PostGridEntityCollision.js +28 -0
- package/dist/classes/callbacks/PostGridEntityCustomBroken.js +14 -0
- package/dist/classes/callbacks/PostGridEntityCustomCollision.js +24 -0
- package/dist/classes/callbacks/PostGridEntityCustomInit.js +14 -0
- package/dist/classes/callbacks/PostGridEntityCustomRemove.js +18 -0
- package/dist/classes/callbacks/PostGridEntityCustomRender.js +14 -0
- package/dist/classes/callbacks/PostGridEntityCustomStateChanged.js +14 -0
- package/dist/classes/callbacks/PostGridEntityCustomUpdate.js +14 -0
- package/dist/classes/callbacks/PostGridEntityInit.js +14 -0
- package/dist/classes/callbacks/PostGridEntityRemove.js +19 -0
- package/dist/classes/callbacks/PostGridEntityRender.js +14 -0
- package/dist/classes/callbacks/PostGridEntityStateChanged.js +14 -0
- package/dist/classes/callbacks/PostGridEntityUpdate.js +14 -0
- package/dist/classes/callbacks/PostHolyMantleRemoved.js +43 -0
- package/dist/classes/callbacks/PostItemDischarge.js +122 -0
- package/dist/classes/callbacks/PostItemPickup.js +14 -0
- package/dist/classes/callbacks/PostKeyboardChanged.js +46 -0
- package/dist/classes/callbacks/PostKnifeInitFilter.js +21 -0
- package/dist/classes/callbacks/PostKnifeInitLate.js +31 -0
- package/dist/classes/callbacks/PostKnifeRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostKnifeUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostLaserInitFilter.js +21 -0
- package/dist/classes/callbacks/PostLaserInitLate.js +31 -0
- package/dist/classes/callbacks/PostLaserRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostLaserUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostNPCDeathFilter.js +21 -0
- package/dist/classes/callbacks/PostNPCInitFilter.js +21 -0
- package/dist/classes/callbacks/PostNPCInitLate.js +31 -0
- package/dist/classes/callbacks/PostNPCRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostNPCStateChanged.js +34 -0
- package/dist/classes/callbacks/PostNPCUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostNewLevelReordered.js +14 -0
- package/dist/classes/callbacks/PostNewRoomEarly.js +74 -0
- package/dist/classes/callbacks/PostNewRoomReordered.js +14 -0
- package/dist/classes/callbacks/PostPEffectUpdateReordered.js +14 -0
- package/dist/classes/callbacks/PostPickupChanged.js +14 -0
- package/dist/classes/callbacks/PostPickupCollect.js +38 -0
- package/dist/classes/callbacks/PostPickupInitFilter.js +21 -0
- package/dist/classes/callbacks/PostPickupInitFirst.js +33 -0
- package/dist/classes/callbacks/PostPickupInitLate.js +31 -0
- package/dist/classes/callbacks/PostPickupRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostPickupSelectionFilter.js +29 -0
- package/dist/classes/callbacks/PostPickupStateChanged.js +34 -0
- package/dist/classes/callbacks/PostPickupUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostPitRender.js +24 -0
- package/dist/classes/callbacks/PostPitUpdate.js +24 -0
- package/dist/classes/callbacks/PostPlayerChangeHealth.js +47 -0
- package/dist/classes/callbacks/PostPlayerChangeStat.js +79 -0
- package/dist/classes/callbacks/PostPlayerChangeType.js +36 -0
- package/dist/classes/callbacks/PostPlayerCollectibleAdded.js +14 -0
- package/dist/classes/callbacks/PostPlayerCollectibleRemoved.js +14 -0
- package/dist/classes/callbacks/PostPlayerFatalDamage.js +83 -0
- package/dist/classes/callbacks/PostPlayerInitFirst.js +41 -0
- package/dist/classes/callbacks/PostPlayerInitLate.js +33 -0
- package/dist/classes/callbacks/PostPlayerRenderReordered.js +14 -0
- package/dist/classes/callbacks/PostPlayerUpdateReordered.js +14 -0
- package/dist/classes/callbacks/PostPoopRender.js +24 -0
- package/dist/classes/callbacks/PostPoopUpdate.js +24 -0
- package/dist/classes/callbacks/PostPressurePlateRender.js +24 -0
- package/dist/classes/callbacks/PostPressurePlateUpdate.js +24 -0
- package/dist/classes/callbacks/PostProjectileInitFilter.js +21 -0
- package/dist/classes/callbacks/PostProjectileInitLate.js +31 -0
- package/dist/classes/callbacks/PostProjectileKill.js +52 -0
- package/dist/classes/callbacks/PostProjectileRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostProjectileUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostPurchase.js +90 -0
- package/dist/classes/callbacks/PostRockRender.js +24 -0
- package/dist/classes/callbacks/PostRockUpdate.js +24 -0
- package/dist/classes/callbacks/PostRoomClearChanged.js +46 -0
- package/dist/classes/callbacks/PostSacrifice.js +36 -0
- package/dist/classes/callbacks/PostSlotAnimationChanged.js +14 -0
- package/dist/classes/callbacks/PostSlotCollision.js +25 -0
- package/dist/classes/callbacks/PostSlotDestroyed.js +14 -0
- package/dist/classes/callbacks/PostSlotInit.js +14 -0
- package/dist/classes/callbacks/PostSlotRender.js +14 -0
- package/dist/classes/callbacks/PostSlotUpdate.js +14 -0
- package/dist/classes/callbacks/PostSpikesRender.js +24 -0
- package/dist/classes/callbacks/PostSpikesUpdate.js +24 -0
- package/dist/classes/callbacks/PostTNTRender.js +24 -0
- package/dist/classes/callbacks/PostTNTUpdate.js +24 -0
- package/dist/classes/callbacks/PostTearInitFilter.js +21 -0
- package/dist/classes/callbacks/PostTearInitLate.js +31 -0
- package/dist/classes/callbacks/PostTearInitVeryLate.js +35 -0
- package/dist/classes/callbacks/PostTearKill.js +52 -0
- package/dist/classes/callbacks/PostTearRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostTearUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostTransformation.js +47 -0
- package/dist/classes/callbacks/PostTrinketBreak.js +70 -0
- package/dist/classes/callbacks/PostUsePillFilter.js +76 -0
- package/dist/classes/callbacks/PreBerserkDeath.js +41 -0
- package/dist/classes/callbacks/PreBombCollisionFilter.js +19 -0
- package/dist/classes/callbacks/PreCustomRevive.js +14 -0
- package/dist/classes/callbacks/PreEntitySpawnFilter.js +24 -0
- package/dist/classes/callbacks/PreFamiliarCollisionFilter.js +19 -0
- package/dist/classes/callbacks/PreGetPedestal.js +46 -0
- package/dist/classes/callbacks/PreItemPickup.js +14 -0
- package/dist/classes/callbacks/PreKnifeCollisionFilter.js +19 -0
- package/dist/classes/callbacks/PreNPCCollisionFilter.js +19 -0
- package/dist/classes/callbacks/PreNPCUpdateFilter.js +19 -0
- package/dist/classes/callbacks/PreNewLevel.js +51 -0
- package/dist/classes/callbacks/PreProjectileCollisionFilter.js +19 -0
- package/dist/classes/callbacks/PreRoomEntitySpawnFilter.js +26 -0
- package/dist/classes/callbacks/PreTearCollisionFilter.js +19 -0
- package/dist/classes/features/callbackLogic/CustomGridEntities.js +359 -0
- package/dist/classes/features/callbackLogic/CustomRevive.js +170 -0
- package/dist/classes/features/callbackLogic/EsauJrDetection.js +70 -0
- package/dist/classes/features/callbackLogic/FlipDetection.js +61 -0
- package/dist/classes/features/callbackLogic/GameReorderedCallbacks.js +220 -0
- package/dist/classes/features/callbackLogic/GridEntityCollisionDetection.js +62 -0
- package/dist/classes/features/callbackLogic/GridEntityRenderDetection.js +35 -0
- package/dist/classes/features/callbackLogic/GridEntityUpdateDetection.js +147 -0
- package/dist/classes/features/callbackLogic/ItemPickupDetection.js +68 -0
- package/dist/classes/features/callbackLogic/PickupChangeDetection.js +43 -0
- package/dist/classes/features/callbackLogic/PlayerCollectibleDetection.js +193 -0
- package/dist/classes/features/callbackLogic/PlayerReorderedCallbacks.js +109 -0
- package/dist/classes/features/callbackLogic/SlotDestroyedDetection.js +95 -0
- package/dist/classes/features/callbackLogic/SlotRenderDetection.js +48 -0
- package/dist/classes/features/callbackLogic/SlotUpdateDetection.js +52 -0
- package/dist/classes/features/other/CharacterHealthConversion.js +112 -0
- package/dist/classes/features/other/CharacterStats.js +68 -0
- package/dist/classes/features/other/CollectibleItemPoolType.js +75 -0
- package/dist/classes/features/other/CustomHotkeys.js +144 -0
- package/dist/classes/features/other/CustomItemPools.js +128 -0
- package/dist/classes/features/other/CustomPickups.js +118 -0
- package/dist/classes/features/other/CustomStages.js +471 -0
- package/dist/classes/features/other/CustomTrapdoors.js +596 -0
- package/dist/classes/features/other/DebugDisplay.js +699 -0
- package/dist/classes/features/other/DeployJSONRoom.js +301 -0
- package/dist/classes/features/other/DisableAllSound.js +90 -0
- package/dist/classes/features/other/DisableInputs.js +249 -0
- package/dist/classes/features/other/EdenStartingStatsHealth.js +197 -0
- package/dist/classes/features/other/ExtraConsoleCommands.js +292 -0
- package/dist/classes/features/other/FadeInRemover.js +67 -0
- package/dist/classes/features/other/FastReset.js +88 -0
- package/dist/classes/features/other/FlyingDetection.js +64 -0
- package/dist/classes/features/other/ForgottenSwitch.js +43 -0
- package/dist/classes/features/other/ItemPoolDetection.js +187 -0
- package/dist/classes/features/other/ModdedElementDetection.js +399 -0
- package/dist/classes/features/other/ModdedElementSets.js +1251 -0
- package/dist/classes/features/other/NoSirenSteal.js +88 -0
- package/dist/classes/features/other/Pause.js +197 -0
- package/dist/classes/features/other/PersistentEntities.js +168 -0
- package/dist/classes/features/other/PickupIndexCreation.js +229 -0
- package/dist/classes/features/other/PlayerCollectibleTracking.js +102 -0
- package/dist/classes/features/other/PonyDetection.js +86 -0
- package/dist/classes/features/other/PressInput.js +71 -0
- package/dist/classes/features/other/PreventChildEntities.js +60 -0
- package/dist/classes/features/other/PreventGridEntityRespawn.js +159 -0
- package/dist/classes/features/other/RerunDetection.js +69 -0
- package/dist/classes/features/other/RoomClearFrame.js +94 -0
- package/dist/classes/features/other/RoomHistory.js +196 -0
- package/dist/classes/features/other/RunInNFrames.js +323 -0
- package/dist/classes/features/other/RunNextRoom.js +53 -0
- package/dist/classes/features/other/RunNextRun.js +60 -0
- package/dist/classes/features/other/SaveDataManager.js +383 -0
- package/dist/classes/features/other/SpawnRockAltRewards.js +469 -0
- package/dist/classes/features/other/StageHistory.js +244 -0
- package/dist/classes/features/other/StartAmbush.js +62 -0
- package/dist/classes/features/other/TaintedLazarusPlayers.js +115 -0
- package/dist/classes/features/other/UnlockAchievementsDetection.js +60 -0
- package/dist/classes/features/other/customStages/backdrop.js +195 -0
- package/dist/classes/features/other/customStages/constants.js +19 -0
- package/dist/classes/features/other/customStages/gridEntities.js +177 -0
- package/dist/classes/features/other/customStages/shadows.js +67 -0
- package/dist/classes/features/other/customStages/streakText.js +222 -0
- package/dist/classes/features/other/customStages/utils.js +65 -0
- package/dist/classes/features/other/customStages/v.js +27 -0
- package/dist/classes/features/other/customStages/versusScreen.js +227 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayBomb.js +23 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayDoor.js +22 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayEffect.js +23 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayFamiliar.js +23 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayKnife.js +23 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayLaser.js +23 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayNPC.js +23 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayPickup.js +23 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayPit.js +22 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayPlayer.js +25 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayPoop.js +22 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayPressurePlate.js +25 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayProjectile.js +23 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayRock.js +22 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplaySlot.js +22 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplaySpikes.js +22 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayTNT.js +22 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayTear.js +23 -0
- package/dist/classes/features/other/debugDisplay/utils.js +13 -0
- package/dist/classes/features/other/extraConsoleCommands/commands.js +1598 -0
- package/dist/classes/features/other/extraConsoleCommands/subroutines.js +135 -0
- package/dist/classes/features/other/extraConsoleCommands/v.js +30 -0
- package/dist/classes/features/other/saveDataManager/constants.js +4 -0
- package/dist/classes/features/other/saveDataManager/glowingHourGlass.js +106 -0
- package/dist/classes/features/other/saveDataManager/loadFromDisk.js +69 -0
- package/dist/classes/features/other/saveDataManager/restoreDefaults.js +69 -0
- package/dist/classes/features/other/saveDataManager/saveToDisk.js +46 -0
- package/dist/classes/private/CustomCallback.js +59 -0
- package/dist/classes/private/Feature.js +39 -0
- package/dist/core/cachedClasses.js +61 -0
- package/dist/core/constants.js +289 -0
- package/dist/core/constantsFirstLast.js +98 -0
- package/dist/core/constantsVanilla.js +131 -0
- package/dist/core/upgradeMod.js +71 -0
- package/dist/customStageMetadata.json +1 -0
- package/dist/data/itempools.json +16625 -0
- package/dist/decorators.js +21 -0
- package/dist/enums/AmbushType.js +9 -0
- package/dist/enums/CornerType.js +11 -0
- package/dist/enums/HealthType.js +20 -0
- package/dist/enums/ISCFeature.js +65 -0
- package/dist/enums/LadderSubTypeCustom.js +20 -0
- package/dist/enums/ModCallbackCustom.js +2477 -0
- package/dist/enums/MysteriousPaperEffect.js +16 -0
- package/dist/enums/PlayerStat.js +37 -0
- package/dist/enums/PocketItemType.js +13 -0
- package/dist/enums/RockAltType.js +23 -0
- package/dist/enums/SaveDataKey.js +14 -0
- package/dist/enums/SerializationType.js +10 -0
- package/dist/enums/SlotDestructionType.js +22 -0
- package/dist/enums/private/GridEntityTypeCustom.js +10 -0
- package/dist/enums/private/SerializationBrand.js +42 -0
- package/dist/enums/private/StageTravelState.js +13 -0
- package/dist/enums/private/TrapdoorAnimation.js +9 -0
- package/dist/enums/private/UIStreakAnimation.js +10 -0
- package/dist/features.js +150 -0
- package/dist/functions/ambush.js +26 -0
- package/dist/functions/array.js +586 -0
- package/dist/functions/arrayLua.js +81 -0
- package/dist/functions/benchmark.js +36 -0
- package/dist/functions/bitSet128.js +64 -0
- package/dist/functions/bitwise.js +82 -0
- package/dist/functions/bombs.js +14 -0
- package/dist/functions/bosses.js +238 -0
- package/dist/functions/cards.js +164 -0
- package/dist/functions/challenges.js +117 -0
- package/dist/functions/characters.js +182 -0
- package/dist/functions/charge.js +251 -0
- package/dist/functions/chargeBar.js +54 -0
- package/dist/functions/collectibleTag.js +24 -0
- package/dist/functions/collectibles.js +581 -0
- package/dist/functions/color.js +88 -0
- package/dist/functions/console.js +18 -0
- package/dist/functions/curses.js +37 -0
- package/dist/functions/debugFunctions.js +108 -0
- package/dist/functions/decorators.js +113 -0
- package/dist/functions/deepCopy.js +406 -0
- package/dist/functions/deepCopyTests.js +361 -0
- package/dist/functions/dimensions.js +30 -0
- package/dist/functions/direction.js +78 -0
- package/dist/functions/doors.js +524 -0
- package/dist/functions/easing.js +327 -0
- package/dist/functions/effects.js +14 -0
- package/dist/functions/emptyRoom.js +79 -0
- package/dist/functions/entities.js +529 -0
- package/dist/functions/entitiesSpecific.js +582 -0
- package/dist/functions/entityTypes.js +9 -0
- package/dist/functions/enums.js +244 -0
- package/dist/functions/external.js +59 -0
- package/dist/functions/familiars.js +136 -0
- package/dist/functions/flag.js +146 -0
- package/dist/functions/frames.js +166 -0
- package/dist/functions/globals.js +291 -0
- package/dist/functions/gridEntities.js +990 -0
- package/dist/functions/gridEntitiesSpecific.js +456 -0
- package/dist/functions/gridIndex.js +35 -0
- package/dist/functions/hash.js +75 -0
- package/dist/functions/hex.js +57 -0
- package/dist/functions/input.js +185 -0
- package/dist/functions/isaacAPIClass.js +157 -0
- package/dist/functions/itemPool.js +118 -0
- package/dist/functions/jsonHelpers.js +73 -0
- package/dist/functions/jsonRoom.js +184 -0
- package/dist/functions/kColor.js +89 -0
- package/dist/functions/language.js +16 -0
- package/dist/functions/level.js +66 -0
- package/dist/functions/levelGrid.js +497 -0
- package/dist/functions/log.js +86 -0
- package/dist/functions/logEntities.js +308 -0
- package/dist/functions/logMisc.js +510 -0
- package/dist/functions/map.js +121 -0
- package/dist/functions/math.js +149 -0
- package/dist/functions/merge.js +159 -0
- package/dist/functions/mergeTests.js +313 -0
- package/dist/functions/minimap.js +204 -0
- package/dist/functions/modFeatures.js +39 -0
- package/dist/functions/newArray.js +30 -0
- package/dist/functions/nextStage.js +169 -0
- package/dist/functions/npcDataStructures.js +146 -0
- package/dist/functions/npcs.js +132 -0
- package/dist/functions/pickupVariants.js +63 -0
- package/dist/functions/pickups.js +168 -0
- package/dist/functions/pickupsSpecific.js +376 -0
- package/dist/functions/pills.js +200 -0
- package/dist/functions/playerCenter.js +53 -0
- package/dist/functions/playerCollectibles.js +300 -0
- package/dist/functions/playerDataStructures.js +145 -0
- package/dist/functions/playerEffects.js +63 -0
- package/dist/functions/playerHealth.js +604 -0
- package/dist/functions/playerIndex.js +186 -0
- package/dist/functions/playerTrinkets.js +149 -0
- package/dist/functions/players.js +471 -0
- package/dist/functions/pocketItems.js +165 -0
- package/dist/functions/positionVelocity.js +158 -0
- package/dist/functions/pressurePlate.js +26 -0
- package/dist/functions/projectiles.js +57 -0
- package/dist/functions/random.js +90 -0
- package/dist/functions/readOnly.js +33 -0
- package/dist/functions/render.js +36 -0
- package/dist/functions/revive.js +151 -0
- package/dist/functions/rng.js +140 -0
- package/dist/functions/rockAlt.js +50 -0
- package/dist/functions/roomData.js +155 -0
- package/dist/functions/roomGrid.js +97 -0
- package/dist/functions/roomShape.js +143 -0
- package/dist/functions/roomShapeWalls.js +187 -0
- package/dist/functions/roomTransition.js +43 -0
- package/dist/functions/rooms.js +782 -0
- package/dist/functions/run.js +121 -0
- package/dist/functions/seeds.js +22 -0
- package/dist/functions/serialization.js +98 -0
- package/dist/functions/set.js +215 -0
- package/dist/functions/slots.js +41 -0
- package/dist/functions/sort.js +158 -0
- package/dist/functions/sound.js +45 -0
- package/dist/functions/spawnCollectible.js +112 -0
- package/dist/functions/sprites.js +130 -0
- package/dist/functions/stage.js +540 -0
- package/dist/functions/stats.js +104 -0
- package/dist/functions/storyBosses.js +63 -0
- package/dist/functions/string.js +194 -0
- package/dist/functions/table.js +162 -0
- package/dist/functions/tears.js +128 -0
- package/dist/functions/transformations.js +89 -0
- package/dist/functions/trinketGive.js +145 -0
- package/dist/functions/trinkets.js +213 -0
- package/dist/functions/tstlClass.js +97 -0
- package/dist/functions/types.js +225 -0
- package/dist/functions/ui.js +148 -0
- package/dist/functions/utils.d.ts +4 -1
- package/dist/functions/utils.d.ts.map +1 -1
- package/dist/functions/utils.js +195 -0
- package/dist/functions/utils.lua +6 -2
- package/dist/functions/vector.js +150 -0
- package/dist/functions/versusScreen.js +58 -0
- package/dist/functions/weighted.js +57 -0
- package/dist/index.js +219 -0
- package/dist/index.rollup.d.ts +4 -1
- package/dist/indexLua.js +220 -0
- package/dist/interfaces/ChargeBarSprites.js +2 -0
- package/dist/interfaces/Corner.js +2 -0
- package/dist/interfaces/CustomStageTSConfig.js +2 -0
- package/dist/interfaces/GridEntityCustomData.js +2 -0
- package/dist/interfaces/JSONRoomsFile.js +2 -0
- package/dist/interfaces/PlayerHealth.js +2 -0
- package/dist/interfaces/PlayerStats.js +4 -0
- package/dist/interfaces/PocketItemDescription.js +2 -0
- package/dist/interfaces/RoomDescription.js +2 -0
- package/dist/interfaces/SaveData.js +98 -0
- package/dist/interfaces/StageHistoryEntry.js +2 -0
- package/dist/interfaces/TSTLClassMetatable.js +2 -0
- package/dist/interfaces/TrinketSituation.js +2 -0
- package/dist/interfaces/private/AddCallbackParametersCustom.js +4 -0
- package/dist/interfaces/private/CustomStage.js +2 -0
- package/dist/interfaces/private/CustomTrapdoorDescription.js +2 -0
- package/dist/interfaces/private/ModUpgradedInterface.js +2 -0
- package/dist/isaacscript-common.lua +7 -3
- package/dist/maps/PHDPillConversionsMap.js +23 -0
- package/dist/maps/cardNameToTypeMap.js +211 -0
- package/dist/maps/characterNameToTypeMap.js +91 -0
- package/dist/maps/collectibleNameToTypeMap.js +19 -0
- package/dist/maps/defaultPlayerStatMap.js +17 -0
- package/dist/maps/entityTypeVariantToBossIDMap.js +11 -0
- package/dist/maps/falsePHDPillConversionsMap.js +37 -0
- package/dist/maps/gridEntityTypeToBrokenStateMap.js +32 -0
- package/dist/maps/gridEntityXMLMap.js +133 -0
- package/dist/maps/itemPoolTypeToItemPoolName.js +38 -0
- package/dist/maps/keyboardToStringMap.js +71 -0
- package/dist/maps/pillNameToEffectMap.js +91 -0
- package/dist/maps/roomNameToTypeMap.js +43 -0
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.js +17 -0
- package/dist/maps/transformationNameToPlayerFormMap.js +35 -0
- package/dist/maps/trinketNameToTypeMap.js +19 -0
- package/dist/objects/LRoomShapeToRectangles.js +43 -0
- package/dist/objects/backdropTypeToRockAltType.js +68 -0
- package/dist/objects/batteryNames.js +13 -0
- package/dist/objects/bombNames.js +17 -0
- package/dist/objects/bossIDToEntityTypeVariant.js +228 -0
- package/dist/objects/bossNamePNGFileNames.js +120 -0
- package/dist/objects/bossNames.js +119 -0
- package/dist/objects/bossPortraitPNGFileNames.js +123 -0
- package/dist/objects/cardDescriptions.js +106 -0
- package/dist/objects/cardNames.js +106 -0
- package/dist/objects/challengeBosses.js +60 -0
- package/dist/objects/challengeCharacters.js +58 -0
- package/dist/objects/challengeCollectibleTypes.js +255 -0
- package/dist/objects/challengeNames.js +54 -0
- package/dist/objects/challengeTrinketType.js +58 -0
- package/dist/objects/characterDamageMultipliers.js +49 -0
- package/dist/objects/characterNames.js +48 -0
- package/dist/objects/characterSpritePNGFileNames.js +50 -0
- package/dist/objects/characterStartingCollectibleTypes.js +105 -0
- package/dist/objects/characterStartingTrinketTypes.js +90 -0
- package/dist/objects/chestNames.js +20 -0
- package/dist/objects/coinNames.js +16 -0
- package/dist/objects/coinSubTypeToValue.js +15 -0
- package/dist/objects/collectibleDescriptions.js +742 -0
- package/dist/objects/collectibleNames.js +745 -0
- package/dist/objects/colors.js +26 -0
- package/dist/objects/directionNames.js +11 -0
- package/dist/objects/directionToDegrees.js +11 -0
- package/dist/objects/directionToMoveAction.js +11 -0
- package/dist/objects/directionToShootAction.js +11 -0
- package/dist/objects/directionToVector.js +13 -0
- package/dist/objects/doorSlotFlagToDoorSlot.js +15 -0
- package/dist/objects/doorSlotToDirection.js +15 -0
- package/dist/objects/doorSlotToDoorSlotFlag.js +15 -0
- package/dist/objects/gridEntityTypeToANM2Name.js +37 -0
- package/dist/objects/heartNames.js +21 -0
- package/dist/objects/isaacAPIClassTypeToBrand.js +12 -0
- package/dist/objects/isaacAPIClassTypeToFunctions.js +46 -0
- package/dist/objects/itemPoolTypeToCollectibleTypesSet.js +57 -0
- package/dist/objects/kColors.js +27 -0
- package/dist/objects/keyNames.js +13 -0
- package/dist/objects/languageNames.js +13 -0
- package/dist/objects/oppositeDoorSlots.js +15 -0
- package/dist/objects/pillEffectClasses.js +57 -0
- package/dist/objects/pillEffectNames.js +57 -0
- package/dist/objects/pillEffectTypeToPillEffects.js +23 -0
- package/dist/objects/pillEffectTypes.js +57 -0
- package/dist/objects/playerNamePNGFileNames.js +57 -0
- package/dist/objects/playerPortraitPNGFileNames.js +54 -0
- package/dist/objects/roomShapeBounds.js +48 -0
- package/dist/objects/roomShapeCorners.js +330 -0
- package/dist/objects/roomShapeLayoutSizes.js +41 -0
- package/dist/objects/roomShapeToBottomRightPosition.js +25 -0
- package/dist/objects/roomShapeToDoorSlotCoordinates.js +111 -0
- package/dist/objects/roomShapeToDoorSlots.js +72 -0
- package/dist/objects/roomShapeToDoorSlotsToGridIndexDelta.js +118 -0
- package/dist/objects/roomShapeToGridWidth.js +20 -0
- package/dist/objects/roomShapeToTopLeftPosition.js +26 -0
- package/dist/objects/roomShapeVolumes.js +32 -0
- package/dist/objects/roomTypeNames.js +35 -0
- package/dist/objects/roomTypeSpecialGotoPrefixes.js +35 -0
- package/dist/objects/sackNames.js +11 -0
- package/dist/objects/slotNames.js +26 -0
- package/dist/objects/stageIDNames.js +43 -0
- package/dist/objects/stageToMusic.js +91 -0
- package/dist/objects/stageToStageID.js +117 -0
- package/dist/objects/stageTypeSuffixes.js +14 -0
- package/dist/objects/transformationNames.js +20 -0
- package/dist/objects/trinketDescriptions.js +199 -0
- package/dist/objects/trinketNames.js +202 -0
- package/dist/objects/versusScreenBackgroundColors.js +46 -0
- package/dist/objects/versusScreenDirtSpotColors.js +46 -0
- package/dist/patchErrorFunctions.js +65 -0
- package/dist/serialization.js +21 -0
- package/dist/sets/LRoomShapesSet.js +11 -0
- package/dist/sets/bigRoomShapesSet.js +14 -0
- package/dist/sets/bossSets.js +465 -0
- package/dist/sets/charactersThatStartWithAnActiveItemSet.js +18 -0
- package/dist/sets/charactersWithBlackHeartFromEternalHeartSet.js +9 -0
- package/dist/sets/charactersWithFreeDevilDealsSet.js +6 -0
- package/dist/sets/charactersWithNoRedHeartsSet.js +19 -0
- package/dist/sets/charactersWithNoSoulHeartsSet.js +16 -0
- package/dist/sets/consoleCommandsSet.js +64 -0
- package/dist/sets/entitiesWithArmorSet.js +59 -0
- package/dist/sets/familiarsThatShootPlayerTearsSet.js +15 -0
- package/dist/sets/itemConfigCardTypesForCards.js +14 -0
- package/dist/sets/lostStyleCharactersSet.js +16 -0
- package/dist/sets/mineShaftRoomSubTypesSet.js +12 -0
- package/dist/sets/narrowRoomShapesSet.js +11 -0
- package/dist/sets/poopGridEntityXMLTypesSet.js +16 -0
- package/dist/sets/redHeartSubTypesSet.js +10 -0
- package/dist/sets/repentanceBossIDsSet.js +30 -0
- package/dist/sets/sinEntityTypesSet.js +14 -0
- package/dist/sets/singleUseActiveCollectibleTypesSet.js +15 -0
- package/dist/shaderCrashFix.js +24 -0
- package/dist/shouldFire.js +226 -0
- package/dist/types/AddSubtract.js +2 -0
- package/dist/types/AllButFirst.js +2 -0
- package/dist/types/AllButLast.js +2 -0
- package/dist/types/AnyClass.js +2 -0
- package/dist/types/AnyEntity.js +2 -0
- package/dist/types/AnyFunction.js +2 -0
- package/dist/types/AnyGridEntity.js +2 -0
- package/dist/types/CompositionTypeSatisfiesEnum.js +11 -0
- package/dist/types/ConversionHeartSubType.js +2 -0
- package/dist/types/Decrement.js +2 -0
- package/dist/types/ERange.js +2 -0
- package/dist/types/EntityID.js +2 -0
- package/dist/types/FunctionTuple.js +2 -0
- package/dist/types/GridEntityID.js +2 -0
- package/dist/types/HasFunction.js +2 -0
- package/dist/types/IRange.js +2 -0
- package/dist/types/Immutable.js +2 -0
- package/dist/types/Increment.js +2 -0
- package/dist/types/LowercaseKeys.js +2 -0
- package/dist/types/NaturalNumbersLessThan.js +2 -0
- package/dist/types/NaturalNumbersLessThanOrEqualTo.js +2 -0
- package/dist/types/PickingUpItem.js +44 -0
- package/dist/types/PickupIndex.js +2 -0
- package/dist/types/PlayerIndex.js +2 -0
- package/dist/types/PossibleStatType.js +2 -0
- package/dist/types/PublicInterface.js +2 -0
- package/dist/types/ReadonlyMap.js +6 -0
- package/dist/types/ReadonlyRecord.js +2 -0
- package/dist/types/ReadonlySet.js +6 -0
- package/dist/types/StartsWithLowercase.js +2 -0
- package/dist/types/StartsWithUppercase.js +2 -0
- package/dist/types/TSTLClass.js +2 -0
- package/dist/types/Tuple.js +2 -0
- package/dist/types/TupleKeys.js +2 -0
- package/dist/types/TupleToIntersection.js +2 -0
- package/dist/types/TupleToUnion.js +2 -0
- package/dist/types/TupleWithLengthBetween.js +22 -0
- package/dist/types/TupleWithMaxLength.js +27 -0
- package/dist/types/UnionToIntersection.js +2 -0
- package/dist/types/UppercaseKeys.js +2 -0
- package/dist/types/WeightedArray.js +2 -0
- package/dist/types/WidenLiteral.js +2 -0
- package/dist/types/Writable.js +2 -0
- package/dist/types/private/CallbackTuple.js +2 -0
- package/dist/types/private/ModUpgradedWithFeatures.js +2 -0
- package/package.json +1 -1
- package/src/functions/utils.ts +6 -2
|
@@ -0,0 +1,1598 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// cspell:ignore addcharges
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getPosition = exports.getCharge = exports.getChallenge = exports.fool = exports.flight = exports.flies = exports.eternalHearts = exports.errorRoom = exports.effects = exports.dungeon = exports.down = exports.dogma = exports.disableCurses = exports.dirtyBedroom = exports.devilRoom = exports.dd = exports.darkness = exports.damage = exports.dadsNote = exports.d6 = exports.d20 = exports.cursed = exports.crawlSpace = exports.collectible = exports.coins = exports.coin = exports.cleanBedroom = exports.charge = exports.character = exports.chaosCardTears = exports.cc = exports.cards = exports.card = exports.brokenHearts = exports.bossRush = exports.bossRoom = exports.bossNextRoom = exports.boss = exports.boneHearts = exports.bombs = exports.bomb = exports.bm = exports.bloodCharges = exports.blind = exports.blackMarket = exports.blackHearts = exports.bedroom = exports.ascent = exports.angelRoom = exports.addCharges = void 0;
|
|
5
|
+
exports.right = exports.reloadRoom = exports.redHearts = exports.position = exports.poopMana = exports.poop = exports.pocket = exports.playSound = exports.planetarium = exports.pills = exports.pill = exports.oneHP = exports.noCurses = exports.music = exports.miniboss = exports.maze = exports.maxHearts = exports.map = exports.mana = exports.luck = exports.lowHP = exports.lost = exports.listGridAll = exports.listGrid = exports.listAll = exports.list = exports.library = exports.left = exports.labyrinth = exports.keys = exports.key = exports.iAmErrorRoom = exports.hush = exports.horse = exports.hitboxes = exports.hearts = exports.gridEntities = exports.gridCosts = exports.grid2 = exports.grid = exports.goldenTrinket = exports.goldenKey = exports.goldenHearts = exports.goldenBomb = exports.goldTrinket = exports.goldKey = exports.goldHearts = exports.goldBomb = exports.gigaBomb = exports.giant = void 0;
|
|
6
|
+
exports.xl = exports.warp = exports.up = exports.unseed = exports.unknown = exports.ultraSecretRoom = exports.trinket = exports.treasureRoom = exports.trapdoor = exports.tests = exports.tears = exports.superSecretRoom = exports.startingRoom = exports.startRoom = exports.spikes = exports.speed = exports.spawnTrinketAt = exports.spawnTrinket = exports.spawnGoldenTrinketAt = exports.spawnGoldenTrinket = exports.spawnGoldTrinket = exports.spawnCollectibleAt = exports.spawnCollectible = exports.spam = exports.sounds = exports.sound = exports.soulHearts = exports.soulCharges = exports.smelt = exports.shop = exports.setPosition = exports.setCharges = exports.seeds = exports.seedStick = exports.secretShop = exports.secretRoom = exports.sacrificeRoom = exports.s = exports.runTests = exports.rottenHearts = exports.room = void 0;
|
|
7
|
+
const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
|
|
8
|
+
const cachedEnumValues_1 = require("../../../../arrays/cachedEnumValues");
|
|
9
|
+
const cachedClasses_1 = require("../../../../core/cachedClasses");
|
|
10
|
+
const constants_1 = require("../../../../core/constants");
|
|
11
|
+
const constantsFirstLast_1 = require("../../../../core/constantsFirstLast");
|
|
12
|
+
const HealthType_1 = require("../../../../enums/HealthType");
|
|
13
|
+
const cards_1 = require("../../../../functions/cards");
|
|
14
|
+
const characters_1 = require("../../../../functions/characters");
|
|
15
|
+
const charge_1 = require("../../../../functions/charge");
|
|
16
|
+
const collectibles_1 = require("../../../../functions/collectibles");
|
|
17
|
+
const console_1 = require("../../../../functions/console");
|
|
18
|
+
const deepCopyTests_1 = require("../../../../functions/deepCopyTests");
|
|
19
|
+
const entitiesSpecific_1 = require("../../../../functions/entitiesSpecific");
|
|
20
|
+
const enums_1 = require("../../../../functions/enums");
|
|
21
|
+
const flag_1 = require("../../../../functions/flag");
|
|
22
|
+
const gridEntities_1 = require("../../../../functions/gridEntities");
|
|
23
|
+
const levelGrid_1 = require("../../../../functions/levelGrid");
|
|
24
|
+
const logMisc_1 = require("../../../../functions/logMisc");
|
|
25
|
+
const mergeTests_1 = require("../../../../functions/mergeTests");
|
|
26
|
+
const pickupsSpecific_1 = require("../../../../functions/pickupsSpecific");
|
|
27
|
+
const pills_1 = require("../../../../functions/pills");
|
|
28
|
+
const playerCollectibles_1 = require("../../../../functions/playerCollectibles");
|
|
29
|
+
const playerIndex_1 = require("../../../../functions/playerIndex");
|
|
30
|
+
const players_1 = require("../../../../functions/players");
|
|
31
|
+
const roomData_1 = require("../../../../functions/roomData");
|
|
32
|
+
const roomGrid_1 = require("../../../../functions/roomGrid");
|
|
33
|
+
const roomTransition_1 = require("../../../../functions/roomTransition");
|
|
34
|
+
const rooms_1 = require("../../../../functions/rooms");
|
|
35
|
+
const run_1 = require("../../../../functions/run");
|
|
36
|
+
const spawnCollectible_1 = require("../../../../functions/spawnCollectible");
|
|
37
|
+
const stage_1 = require("../../../../functions/stage");
|
|
38
|
+
const string_1 = require("../../../../functions/string");
|
|
39
|
+
const trinkets_1 = require("../../../../functions/trinkets");
|
|
40
|
+
const types_1 = require("../../../../functions/types");
|
|
41
|
+
const utils_1 = require("../../../../functions/utils");
|
|
42
|
+
const cardNameToTypeMap_1 = require("../../../../maps/cardNameToTypeMap");
|
|
43
|
+
const characterNameToTypeMap_1 = require("../../../../maps/characterNameToTypeMap");
|
|
44
|
+
const collectibleNameToTypeMap_1 = require("../../../../maps/collectibleNameToTypeMap");
|
|
45
|
+
const pillNameToEffectMap_1 = require("../../../../maps/pillNameToEffectMap");
|
|
46
|
+
const roomNameToTypeMap_1 = require("../../../../maps/roomNameToTypeMap");
|
|
47
|
+
const trinketNameToTypeMap_1 = require("../../../../maps/trinketNameToTypeMap");
|
|
48
|
+
const roomTypeNames_1 = require("../../../../objects/roomTypeNames");
|
|
49
|
+
const subroutines_1 = require("./subroutines");
|
|
50
|
+
const v_1 = require("./v");
|
|
51
|
+
/**
|
|
52
|
+
* Adds a single charge to the player's specified active item. You must provide the active slot
|
|
53
|
+
* number. Provide a second number to give a custom amount of charges. (You can use negative numbers
|
|
54
|
+
* to remove charge.)
|
|
55
|
+
*/
|
|
56
|
+
function addCharges(params) {
|
|
57
|
+
if (params === "") {
|
|
58
|
+
print("You must specify a slot number. (Use 0 for the primary slot, 1 for the Schoolbag slot, 2 for the pocket item slot, and 3 for the Dice Bag slot.)");
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const args = params.split(" ");
|
|
62
|
+
if (args.length !== 1 && args.length !== 2) {
|
|
63
|
+
print(`Invalid amount of arguments: ${args.length}`);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const [activeSlotString, numChargeString] = args;
|
|
67
|
+
if (activeSlotString === undefined) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const activeSlot = (0, types_1.parseIntSafe)(activeSlotString);
|
|
71
|
+
if (activeSlot === undefined || !(0, enums_1.isEnumValue)(activeSlot, isaac_typescript_definitions_1.ActiveSlot)) {
|
|
72
|
+
print(`Invalid slot number: ${activeSlot}`);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
let numCharges = 1;
|
|
76
|
+
if (numChargeString !== undefined) {
|
|
77
|
+
const numChargesAttempt = (0, types_1.parseIntSafe)(numChargeString);
|
|
78
|
+
if (numChargesAttempt === undefined) {
|
|
79
|
+
print(`Invalid charge amount: ${numChargeString}`);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
numCharges = numChargesAttempt;
|
|
83
|
+
}
|
|
84
|
+
const player = Isaac.GetPlayer();
|
|
85
|
+
(0, charge_1.addCharge)(player, activeSlot, numCharges);
|
|
86
|
+
}
|
|
87
|
+
exports.addCharges = addCharges;
|
|
88
|
+
/**
|
|
89
|
+
* Warps to the Angel Room for the floor. If the Devil Room has already been visited or initialized,
|
|
90
|
+
* this will uninitialize it and make an Angel Room instead.
|
|
91
|
+
*/
|
|
92
|
+
function angelRoom() {
|
|
93
|
+
(0, subroutines_1.devilAngel)(false);
|
|
94
|
+
}
|
|
95
|
+
exports.angelRoom = angelRoom;
|
|
96
|
+
/** Activates the flags for the Ascent (i.e. Backwards Path). */
|
|
97
|
+
function ascent() {
|
|
98
|
+
cachedClasses_1.game.SetStateFlag(isaac_typescript_definitions_1.GameStateFlag.BACKWARDS_PATH_INIT, true);
|
|
99
|
+
cachedClasses_1.game.SetStateFlag(isaac_typescript_definitions_1.GameStateFlag.BACKWARDS_PATH, true);
|
|
100
|
+
print("Set Ascent flags.");
|
|
101
|
+
}
|
|
102
|
+
exports.ascent = ascent;
|
|
103
|
+
/** Warps to the first Clean Bedroom or Dirty Bedroom on the floor. */
|
|
104
|
+
function bedroom() {
|
|
105
|
+
const cleanBedroomGridIndexes = (0, levelGrid_1.getRoomGridIndexesForType)(isaac_typescript_definitions_1.RoomType.CLEAN_BEDROOM);
|
|
106
|
+
if (cleanBedroomGridIndexes.length > 0) {
|
|
107
|
+
(0, subroutines_1.warpToRoomType)(isaac_typescript_definitions_1.RoomType.CLEAN_BEDROOM);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const dirtyBedroomGridIndexes = (0, levelGrid_1.getRoomGridIndexesForType)(isaac_typescript_definitions_1.RoomType.DIRTY_BEDROOM);
|
|
111
|
+
if (dirtyBedroomGridIndexes.length > 0) {
|
|
112
|
+
(0, subroutines_1.warpToRoomType)(isaac_typescript_definitions_1.RoomType.DIRTY_BEDROOM);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
print("There are no Clean Bedrooms or Dirty Bedrooms on this floor.");
|
|
116
|
+
}
|
|
117
|
+
exports.bedroom = bedroom;
|
|
118
|
+
/**
|
|
119
|
+
* Gives a half black heart. Provide a number to give a custom amount of hearts. (You can use
|
|
120
|
+
* negative numbers to remove hearts.)
|
|
121
|
+
*/
|
|
122
|
+
function blackHearts(params) {
|
|
123
|
+
(0, subroutines_1.addHeart)(params, HealthType_1.HealthType.BLACK);
|
|
124
|
+
}
|
|
125
|
+
exports.blackHearts = blackHearts;
|
|
126
|
+
/** Warps to the Black Market for the floor. */
|
|
127
|
+
function blackMarket() {
|
|
128
|
+
(0, rooms_1.changeRoom)(isaac_typescript_definitions_1.GridRoom.BLACK_MARKET);
|
|
129
|
+
}
|
|
130
|
+
exports.blackMarket = blackMarket;
|
|
131
|
+
/** Toggles permanent Curse of the Blind. */
|
|
132
|
+
function blind() {
|
|
133
|
+
v_1.v.persistent.blind = !v_1.v.persistent.blind;
|
|
134
|
+
(0, console_1.printEnabled)(v_1.v.persistent.blind, "permanent Curse of the Blind");
|
|
135
|
+
}
|
|
136
|
+
exports.blind = blind;
|
|
137
|
+
/**
|
|
138
|
+
* Gives a blood charge. This only affects Bethany. Provide a number to give a custom amount of
|
|
139
|
+
* charges. (You can use negative numbers to remove charges.)
|
|
140
|
+
*/
|
|
141
|
+
function bloodCharges(params) {
|
|
142
|
+
let charges = 1;
|
|
143
|
+
if (params !== "") {
|
|
144
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
145
|
+
if (num === undefined) {
|
|
146
|
+
print(`Invalid charge amount: ${num}`);
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
charges = num;
|
|
150
|
+
}
|
|
151
|
+
const player = Isaac.GetPlayer();
|
|
152
|
+
player.AddBloodCharge(charges);
|
|
153
|
+
}
|
|
154
|
+
exports.bloodCharges = bloodCharges;
|
|
155
|
+
/** Alias for the "blackMarket" command. */
|
|
156
|
+
function bm() {
|
|
157
|
+
blackMarket();
|
|
158
|
+
}
|
|
159
|
+
exports.bm = bm;
|
|
160
|
+
/**
|
|
161
|
+
* Gives a bomb. Provide a number to give a custom amount of bombs. (You can use negative numbers to
|
|
162
|
+
* remove bombs.)
|
|
163
|
+
*/
|
|
164
|
+
function bomb(params) {
|
|
165
|
+
let numBombs = 1;
|
|
166
|
+
if (params !== "") {
|
|
167
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
168
|
+
if (num === undefined) {
|
|
169
|
+
print(`Invalid bomb amount: ${num}`);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
numBombs = num;
|
|
173
|
+
}
|
|
174
|
+
const player = Isaac.GetPlayer();
|
|
175
|
+
player.AddBombs(numBombs);
|
|
176
|
+
}
|
|
177
|
+
exports.bomb = bomb;
|
|
178
|
+
/**
|
|
179
|
+
* Gives 99 bombs. Provide a number to give a custom amount of bombs. (You can use negative numbers
|
|
180
|
+
* to remove bombs.)
|
|
181
|
+
*/
|
|
182
|
+
function bombs(params) {
|
|
183
|
+
let numBombs = 99;
|
|
184
|
+
if (params !== "") {
|
|
185
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
186
|
+
if (num === undefined) {
|
|
187
|
+
print(`Invalid bomb amount: ${num}`);
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
numBombs = num;
|
|
191
|
+
}
|
|
192
|
+
const player = Isaac.GetPlayer();
|
|
193
|
+
player.AddBombs(numBombs);
|
|
194
|
+
}
|
|
195
|
+
exports.bombs = bombs;
|
|
196
|
+
/**
|
|
197
|
+
* Gives a bone heart. Provide a number to give a custom amount of hearts. (You can use negative
|
|
198
|
+
* numbers to remove hearts.)
|
|
199
|
+
*/
|
|
200
|
+
function boneHearts(params) {
|
|
201
|
+
(0, subroutines_1.addHeart)(params, HealthType_1.HealthType.BONE);
|
|
202
|
+
}
|
|
203
|
+
exports.boneHearts = boneHearts;
|
|
204
|
+
/** Alias for the "bossRoom" command. */
|
|
205
|
+
function boss() {
|
|
206
|
+
bossRoom();
|
|
207
|
+
}
|
|
208
|
+
exports.boss = boss;
|
|
209
|
+
/** Warps to the room next to the first Boss Room on the floor. */
|
|
210
|
+
function bossNextRoom() {
|
|
211
|
+
(0, subroutines_1.warpNextToRoomType)(isaac_typescript_definitions_1.RoomType.BOSS);
|
|
212
|
+
}
|
|
213
|
+
exports.bossNextRoom = bossNextRoom;
|
|
214
|
+
/** Warps to the first Boss Room on the floor (or the Delirium Boss Room if on The Void). */
|
|
215
|
+
function bossRoom() {
|
|
216
|
+
// Most of the logic here is copied from the "warpToRoomType" function.
|
|
217
|
+
const roomType = isaac_typescript_definitions_1.RoomType.BOSS;
|
|
218
|
+
const roomGridIndexes = (0, levelGrid_1.getRoomGridIndexesForType)(roomType);
|
|
219
|
+
let roomGridIndex = roomGridIndexes[0];
|
|
220
|
+
if ((0, stage_1.onStage)(isaac_typescript_definitions_1.LevelStage.VOID)) {
|
|
221
|
+
roomGridIndex = roomGridIndexes.find((thisRoomGridIndex) => (0, roomData_1.getRoomData)(thisRoomGridIndex)?.Subtype === isaac_typescript_definitions_1.BossID.DELIRIUM);
|
|
222
|
+
}
|
|
223
|
+
const roomTypeName = roomTypeNames_1.ROOM_TYPE_NAMES[isaac_typescript_definitions_1.RoomType.BOSS];
|
|
224
|
+
if (roomGridIndex === undefined) {
|
|
225
|
+
print(`There are no ${roomTypeName}s on this floor.`);
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
(0, rooms_1.changeRoom)(roomGridIndex);
|
|
229
|
+
print(`Warped to room type: ${roomTypeName} (${roomType})`);
|
|
230
|
+
}
|
|
231
|
+
exports.bossRoom = bossRoom;
|
|
232
|
+
/** Warps to the Boss Rush for the floor. */
|
|
233
|
+
function bossRush() {
|
|
234
|
+
(0, rooms_1.changeRoom)(isaac_typescript_definitions_1.GridRoom.BOSS_RUSH);
|
|
235
|
+
}
|
|
236
|
+
exports.bossRush = bossRush;
|
|
237
|
+
/**
|
|
238
|
+
* Gives a broken heart. Provide a number to give a custom amount of hearts. (You can use negative
|
|
239
|
+
* numbers to remove hearts.)
|
|
240
|
+
*/
|
|
241
|
+
function brokenHearts(params) {
|
|
242
|
+
(0, subroutines_1.addHeart)(params, HealthType_1.HealthType.BROKEN);
|
|
243
|
+
}
|
|
244
|
+
exports.brokenHearts = brokenHearts;
|
|
245
|
+
/**
|
|
246
|
+
* Gives the specified card. Accepts either the card type or the partial name of the card.
|
|
247
|
+
*
|
|
248
|
+
* For example:
|
|
249
|
+
* - card 5 - Gives The Emperor.
|
|
250
|
+
* - card spa - Gives 2 of Spades.
|
|
251
|
+
*/
|
|
252
|
+
function card(params) {
|
|
253
|
+
if (params === "") {
|
|
254
|
+
print("You must specify a card name or number.");
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
let cardType;
|
|
258
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
259
|
+
if (num === undefined) {
|
|
260
|
+
const match = (0, string_1.getMapPartialMatch)(params, cardNameToTypeMap_1.CARD_NAME_TO_TYPE_MAP);
|
|
261
|
+
if (match === undefined) {
|
|
262
|
+
print(`Unknown card: ${params}`);
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
cardType = match[1];
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
if (!(0, cards_1.isValidCardType)(num)) {
|
|
269
|
+
print(`Invalid card type: ${num}`);
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
cardType = num;
|
|
273
|
+
}
|
|
274
|
+
const cardName = (0, cards_1.getCardName)(cardType);
|
|
275
|
+
Isaac.ExecuteCommand(`g k${cardType}`);
|
|
276
|
+
print(`Gave card: ${cardName} (${cardType})`);
|
|
277
|
+
}
|
|
278
|
+
exports.card = card;
|
|
279
|
+
/** Spawns every card on the ground, starting at the top-left-most tile. */
|
|
280
|
+
function cards() {
|
|
281
|
+
let cardType = constantsFirstLast_1.FIRST_CARD_TYPE;
|
|
282
|
+
for (let y = 0; y <= 6; y++) {
|
|
283
|
+
for (let x = 0; x <= 12; x++) {
|
|
284
|
+
if (cardType > constantsFirstLast_1.LAST_VANILLA_CARD_TYPE) {
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
const worldPosition = (0, roomGrid_1.gridCoordinatesToWorldPosition)(x, y);
|
|
288
|
+
(0, pickupsSpecific_1.spawnCard)(cardType, worldPosition);
|
|
289
|
+
cardType++; // eslint-disable-line isaacscript/strict-enums
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
exports.cards = cards;
|
|
294
|
+
/** Alias for the "chaosCardTears" command. */
|
|
295
|
+
function cc() {
|
|
296
|
+
chaosCardTears();
|
|
297
|
+
}
|
|
298
|
+
exports.cc = cc;
|
|
299
|
+
/**
|
|
300
|
+
* Toggles Chaos Card tears for the player. Useful for killing enemies very fast without using
|
|
301
|
+
* "debug 10".
|
|
302
|
+
*/
|
|
303
|
+
function chaosCardTears() {
|
|
304
|
+
v_1.v.persistent.chaosCardTears = !v_1.v.persistent.chaosCardTears;
|
|
305
|
+
(0, console_1.printEnabled)(v_1.v.persistent.chaosCardTears, "Chaos Card tears");
|
|
306
|
+
}
|
|
307
|
+
exports.chaosCardTears = chaosCardTears;
|
|
308
|
+
/**
|
|
309
|
+
* Restart as the specified character. Accepts either the character sub-type or the partial name of
|
|
310
|
+
* the character.
|
|
311
|
+
*
|
|
312
|
+
* For example:
|
|
313
|
+
* - character 2 - Restarts as Cain.
|
|
314
|
+
* - character ta - Restarts as Tainted Azazel.
|
|
315
|
+
*/
|
|
316
|
+
function character(params) {
|
|
317
|
+
if (params === "") {
|
|
318
|
+
print("You must specify a character name or number.");
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
let playerType;
|
|
322
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
323
|
+
if (num === undefined) {
|
|
324
|
+
const match = (0, string_1.getMapPartialMatch)(params, characterNameToTypeMap_1.CHARACTER_NAME_TO_TYPE_MAP);
|
|
325
|
+
if (match === undefined) {
|
|
326
|
+
print(`Unknown character: ${params}`);
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
playerType = match[1];
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
if (!(0, enums_1.isEnumValue)(num, isaac_typescript_definitions_1.PlayerType) || num === isaac_typescript_definitions_1.PlayerType.POSSESSOR) {
|
|
333
|
+
print(`Invalid character number: ${num}`);
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
playerType = num;
|
|
337
|
+
}
|
|
338
|
+
const characterName = (0, characters_1.getCharacterName)(playerType);
|
|
339
|
+
(0, run_1.restart)(playerType);
|
|
340
|
+
print(`Restarting as character: ${characterName} (${playerType})`);
|
|
341
|
+
}
|
|
342
|
+
exports.character = character;
|
|
343
|
+
/** Alias for the "addCharges" command. */
|
|
344
|
+
function charge(params) {
|
|
345
|
+
addCharges(params);
|
|
346
|
+
}
|
|
347
|
+
exports.charge = charge;
|
|
348
|
+
/** Warps to the first Clean Bedroom on the floor. */
|
|
349
|
+
function cleanBedroom() {
|
|
350
|
+
(0, subroutines_1.warpToRoomType)(isaac_typescript_definitions_1.RoomType.CLEAN_BEDROOM);
|
|
351
|
+
}
|
|
352
|
+
exports.cleanBedroom = cleanBedroom;
|
|
353
|
+
/**
|
|
354
|
+
* Gives a coin. Provide a number to give a custom amount of coins. (You can use negative numbers to
|
|
355
|
+
* remove coins.)
|
|
356
|
+
*/
|
|
357
|
+
function coin(params) {
|
|
358
|
+
let numCoins = 1;
|
|
359
|
+
if (params !== "") {
|
|
360
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
361
|
+
if (num === undefined) {
|
|
362
|
+
print(`Invalid coin amount: ${num}`);
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
numCoins = num;
|
|
366
|
+
}
|
|
367
|
+
const player = Isaac.GetPlayer();
|
|
368
|
+
player.AddCoins(numCoins);
|
|
369
|
+
}
|
|
370
|
+
exports.coin = coin;
|
|
371
|
+
/**
|
|
372
|
+
* Gives 999 coins. Provide a number to give a custom amount of coins. (You can use negative numbers
|
|
373
|
+
* to remove coins.)
|
|
374
|
+
*/
|
|
375
|
+
function coins(params) {
|
|
376
|
+
let numCoins = 999;
|
|
377
|
+
if (params !== "") {
|
|
378
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
379
|
+
if (num === undefined) {
|
|
380
|
+
print(`Invalid coin amount: ${num}`);
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
numCoins = num;
|
|
384
|
+
}
|
|
385
|
+
const player = Isaac.GetPlayer();
|
|
386
|
+
player.AddCoins(numCoins);
|
|
387
|
+
}
|
|
388
|
+
exports.coins = coins;
|
|
389
|
+
/** Alias for the "spawnCollectible" command. */
|
|
390
|
+
function collectible(params) {
|
|
391
|
+
spawnCollectible(params);
|
|
392
|
+
}
|
|
393
|
+
exports.collectible = collectible;
|
|
394
|
+
/** Creates a crawl space next to the player. */
|
|
395
|
+
function crawlSpace() {
|
|
396
|
+
(0, subroutines_1.spawnTrapdoorOrCrawlSpace)(false);
|
|
397
|
+
}
|
|
398
|
+
exports.crawlSpace = crawlSpace;
|
|
399
|
+
/** Toggles permanent Curse of the Cursed. */
|
|
400
|
+
function cursed() {
|
|
401
|
+
v_1.v.persistent.cursed = !v_1.v.persistent.cursed;
|
|
402
|
+
(0, console_1.printEnabled)(v_1.v.persistent.cursed, "permanent Curse of the Cursed");
|
|
403
|
+
}
|
|
404
|
+
exports.cursed = cursed;
|
|
405
|
+
/** Uses the D20. */
|
|
406
|
+
function d20() {
|
|
407
|
+
const player = Isaac.GetPlayer();
|
|
408
|
+
(0, playerCollectibles_1.useActiveItemTemp)(player, isaac_typescript_definitions_1.CollectibleType.D20);
|
|
409
|
+
}
|
|
410
|
+
exports.d20 = d20;
|
|
411
|
+
/** Uses the D6. */
|
|
412
|
+
function d6() {
|
|
413
|
+
const player = Isaac.GetPlayer();
|
|
414
|
+
(0, playerCollectibles_1.useActiveItemTemp)(player, isaac_typescript_definitions_1.CollectibleType.D6);
|
|
415
|
+
}
|
|
416
|
+
exports.d6 = d6;
|
|
417
|
+
/** Warps to the Mausoleum 2 Boss Room that has Dad's Note in it. */
|
|
418
|
+
function dadsNote() {
|
|
419
|
+
cachedClasses_1.game.SetStateFlag(isaac_typescript_definitions_1.GameStateFlag.BACKWARDS_PATH_INIT, true);
|
|
420
|
+
(0, stage_1.setStage)(isaac_typescript_definitions_1.LevelStage.DEPTHS_2, isaac_typescript_definitions_1.StageType.REPENTANCE);
|
|
421
|
+
bossRoom();
|
|
422
|
+
}
|
|
423
|
+
exports.dadsNote = dadsNote;
|
|
424
|
+
/**
|
|
425
|
+
* Toggles a set damage stat for the player. You can provide an optional argument to this command in
|
|
426
|
+
* order to set the damage to a specific amount. Default is 500.
|
|
427
|
+
*/
|
|
428
|
+
function damage(params) {
|
|
429
|
+
if (params !== "") {
|
|
430
|
+
const num = tonumber(params); // Can be a float.
|
|
431
|
+
if (num === undefined) {
|
|
432
|
+
print(`Invalid damage amount: ${params}`);
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
v_1.v.persistent.damageAmount = num;
|
|
436
|
+
}
|
|
437
|
+
v_1.v.persistent.damage = !v_1.v.persistent.damage;
|
|
438
|
+
const player = Isaac.GetPlayer();
|
|
439
|
+
player.AddCacheFlags(isaac_typescript_definitions_1.CacheFlag.DAMAGE);
|
|
440
|
+
player.EvaluateItems();
|
|
441
|
+
(0, console_1.printEnabled)(v_1.v.persistent.damage, "set damage");
|
|
442
|
+
}
|
|
443
|
+
exports.damage = damage;
|
|
444
|
+
/** Toggles permanent Curse of Darkness. */
|
|
445
|
+
function darkness() {
|
|
446
|
+
v_1.v.persistent.darkness = !v_1.v.persistent.darkness;
|
|
447
|
+
(0, console_1.printEnabled)(v_1.v.persistent.darkness, "permanent Curse of Darkness");
|
|
448
|
+
}
|
|
449
|
+
exports.darkness = darkness;
|
|
450
|
+
/** Alias for the "devil" command. */
|
|
451
|
+
function dd() {
|
|
452
|
+
devilRoom();
|
|
453
|
+
}
|
|
454
|
+
exports.dd = dd;
|
|
455
|
+
/**
|
|
456
|
+
* Warps to the Devil Room for the floor. If the Angel Room has already been visited or initialized,
|
|
457
|
+
* this will uninitialize it and make an Devil Room instead.
|
|
458
|
+
*/
|
|
459
|
+
function devilRoom() {
|
|
460
|
+
(0, subroutines_1.devilAngel)(true);
|
|
461
|
+
}
|
|
462
|
+
exports.devilRoom = devilRoom;
|
|
463
|
+
/** Warps to the first Dirty Bedroom on the floor. */
|
|
464
|
+
function dirtyBedroom() {
|
|
465
|
+
(0, subroutines_1.warpToRoomType)(isaac_typescript_definitions_1.RoomType.DIRTY_BEDROOM);
|
|
466
|
+
}
|
|
467
|
+
exports.dirtyBedroom = dirtyBedroom;
|
|
468
|
+
/** Toggles whether curses can appear. */
|
|
469
|
+
function disableCurses() {
|
|
470
|
+
v_1.v.persistent.disableCurses = !v_1.v.persistent.disableCurses;
|
|
471
|
+
(0, console_1.printEnabled)(!v_1.v.persistent.disableCurses, "curses");
|
|
472
|
+
}
|
|
473
|
+
exports.disableCurses = disableCurses;
|
|
474
|
+
/** Warps to the Dogma Boss Room. */
|
|
475
|
+
function dogma() {
|
|
476
|
+
(0, stage_1.setStage)(isaac_typescript_definitions_1.LevelStage.HOME, isaac_typescript_definitions_1.StageType.WRATH_OF_THE_LAMB);
|
|
477
|
+
(0, rooms_1.changeRoom)(constants_1.DOGMA_ROOM_GRID_INDEX);
|
|
478
|
+
}
|
|
479
|
+
exports.dogma = dogma;
|
|
480
|
+
/** Moves the player 0.5 units down. Provide a number to move a custom amount of units. */
|
|
481
|
+
function down(params) {
|
|
482
|
+
(0, subroutines_1.movePlayer)(params, isaac_typescript_definitions_1.Direction.DOWN);
|
|
483
|
+
}
|
|
484
|
+
exports.down = down;
|
|
485
|
+
/** Warps to the Dungeon (i.e. the crawl space room) for the floor. */
|
|
486
|
+
function dungeon() {
|
|
487
|
+
(0, rooms_1.changeRoom)(isaac_typescript_definitions_1.GridRoom.DUNGEON);
|
|
488
|
+
}
|
|
489
|
+
exports.dungeon = dungeon;
|
|
490
|
+
/** Logs the player's current temporary effects to the "log.txt" file. */
|
|
491
|
+
function effects() {
|
|
492
|
+
const player = Isaac.GetPlayer();
|
|
493
|
+
(0, logMisc_1.logPlayerEffects)(player);
|
|
494
|
+
print('Logged the player\'s effects to the "log.txt" file.');
|
|
495
|
+
}
|
|
496
|
+
exports.effects = effects;
|
|
497
|
+
/** Alias for the "iAmError" command. */
|
|
498
|
+
function errorRoom() {
|
|
499
|
+
iAmErrorRoom();
|
|
500
|
+
}
|
|
501
|
+
exports.errorRoom = errorRoom;
|
|
502
|
+
/**
|
|
503
|
+
* Gives an eternal heart. Provide a number to give a custom amount of hearts. (You can use negative
|
|
504
|
+
* numbers to remove hearts.)
|
|
505
|
+
*/
|
|
506
|
+
function eternalHearts(params) {
|
|
507
|
+
(0, subroutines_1.addHeart)(params, HealthType_1.HealthType.ETERNAL);
|
|
508
|
+
}
|
|
509
|
+
exports.eternalHearts = eternalHearts;
|
|
510
|
+
/** Grants the maximum amount of blue flies to the player. */
|
|
511
|
+
function flies() {
|
|
512
|
+
const player = Isaac.GetPlayer();
|
|
513
|
+
player.AddBlueFlies(constants_1.MAX_NUM_FAMILIARS, player.Position, undefined);
|
|
514
|
+
}
|
|
515
|
+
exports.flies = flies;
|
|
516
|
+
/** Toggles flight for the player. */
|
|
517
|
+
function flight(params) {
|
|
518
|
+
const player = Isaac.GetPlayer();
|
|
519
|
+
v_1.v.persistent.flight = !v_1.v.persistent.flight;
|
|
520
|
+
// Optionally, allow the toggle to be overridden by a parameter.
|
|
521
|
+
if (params === "true") {
|
|
522
|
+
v_1.v.persistent.flight = true;
|
|
523
|
+
}
|
|
524
|
+
else if (params === "false") {
|
|
525
|
+
v_1.v.persistent.flight = false;
|
|
526
|
+
}
|
|
527
|
+
player.AddCacheFlags(isaac_typescript_definitions_1.CacheFlag.FLYING);
|
|
528
|
+
player.EvaluateItems();
|
|
529
|
+
const collectibleUsedToShowFlight = isaac_typescript_definitions_1.CollectibleType.FATE;
|
|
530
|
+
if (v_1.v.persistent.flight) {
|
|
531
|
+
(0, playerCollectibles_1.addCollectibleCostume)(player, collectibleUsedToShowFlight);
|
|
532
|
+
}
|
|
533
|
+
else {
|
|
534
|
+
(0, playerCollectibles_1.removeCollectibleCostume)(player, collectibleUsedToShowFlight);
|
|
535
|
+
}
|
|
536
|
+
(0, console_1.printEnabled)(v_1.v.persistent.flight, "flight");
|
|
537
|
+
}
|
|
538
|
+
exports.flight = flight;
|
|
539
|
+
/** Alias for the "startingRoom" command. */
|
|
540
|
+
function fool() {
|
|
541
|
+
startingRoom();
|
|
542
|
+
}
|
|
543
|
+
exports.fool = fool;
|
|
544
|
+
/** Displays the current challenge, if any. */
|
|
545
|
+
function getChallenge() {
|
|
546
|
+
const challenge = Isaac.GetChallenge();
|
|
547
|
+
const challengeName = isaac_typescript_definitions_1.Challenge[challenge];
|
|
548
|
+
const challengeDescription =
|
|
549
|
+
// Handle modded challenges.
|
|
550
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
551
|
+
challengeName === undefined
|
|
552
|
+
? `${challenge} (custom)`
|
|
553
|
+
: `Challenge.${challengeName} (${challenge})`;
|
|
554
|
+
print(`The current challenge is: ${challengeDescription}`);
|
|
555
|
+
}
|
|
556
|
+
exports.getChallenge = getChallenge;
|
|
557
|
+
/** Prints the charge for the specified slot. By default, will use `ActiveSlot.PRIMARY`. */
|
|
558
|
+
function getCharge(params) {
|
|
559
|
+
let activeSlot = isaac_typescript_definitions_1.ActiveSlot.PRIMARY;
|
|
560
|
+
if (params !== "") {
|
|
561
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
562
|
+
if (num === undefined || !(0, enums_1.isEnumValue)(num, isaac_typescript_definitions_1.ActiveSlot)) {
|
|
563
|
+
print(`Invalid slot number: ${params}`);
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
activeSlot = num;
|
|
567
|
+
}
|
|
568
|
+
const player = Isaac.GetPlayer();
|
|
569
|
+
const totalCharge = (0, charge_1.getTotalCharge)(player, activeSlot);
|
|
570
|
+
print(`Total charge for ActiveSlot.${isaac_typescript_definitions_1.ActiveSlot[activeSlot]} (${activeSlot}) is: ${totalCharge}`);
|
|
571
|
+
}
|
|
572
|
+
exports.getCharge = getCharge;
|
|
573
|
+
/** Prints the current position of all players. */
|
|
574
|
+
function getPosition() {
|
|
575
|
+
for (const player of (0, playerIndex_1.getPlayers)()) {
|
|
576
|
+
const playerName = (0, players_1.getPlayerName)(player);
|
|
577
|
+
print(`Player position for ${playerName}: (${player.Position.X}, ${player.Position.Y})`);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
exports.getPosition = getPosition;
|
|
581
|
+
/** Toggles permanent Curse of the Giant. */
|
|
582
|
+
function giant() {
|
|
583
|
+
v_1.v.persistent.giant = !v_1.v.persistent.giant;
|
|
584
|
+
(0, console_1.printEnabled)(v_1.v.persistent.giant, "permanent Curse of the Giant");
|
|
585
|
+
}
|
|
586
|
+
exports.giant = giant;
|
|
587
|
+
/**
|
|
588
|
+
* Gives a Giga Bomb. Provide a number to give a custom amount of Giga Bombs. (You can use negative
|
|
589
|
+
* numbers to remove bombs.)
|
|
590
|
+
*/
|
|
591
|
+
function gigaBomb(params) {
|
|
592
|
+
let numBombs = 1;
|
|
593
|
+
if (params !== "") {
|
|
594
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
595
|
+
if (num === undefined) {
|
|
596
|
+
print(`Invalid Giga Bomb amount: ${num}`);
|
|
597
|
+
return;
|
|
598
|
+
}
|
|
599
|
+
numBombs = num;
|
|
600
|
+
}
|
|
601
|
+
const player = Isaac.GetPlayer();
|
|
602
|
+
player.AddGigaBombs(numBombs);
|
|
603
|
+
}
|
|
604
|
+
exports.gigaBomb = gigaBomb;
|
|
605
|
+
/** Alias for the "goldenBomb" command. */
|
|
606
|
+
function goldBomb() {
|
|
607
|
+
goldenBomb();
|
|
608
|
+
}
|
|
609
|
+
exports.goldBomb = goldBomb;
|
|
610
|
+
/** Alias for the "goldenHearts" command. */
|
|
611
|
+
function goldHearts(params) {
|
|
612
|
+
goldenHearts(params);
|
|
613
|
+
}
|
|
614
|
+
exports.goldHearts = goldHearts;
|
|
615
|
+
/** Alias for the "goldenKey" command. */
|
|
616
|
+
function goldKey() {
|
|
617
|
+
goldenKey();
|
|
618
|
+
}
|
|
619
|
+
exports.goldKey = goldKey;
|
|
620
|
+
/** Alias for the "spawnGoldenTrinket" command. */
|
|
621
|
+
function goldTrinket(params) {
|
|
622
|
+
spawnGoldenTrinket(params);
|
|
623
|
+
}
|
|
624
|
+
exports.goldTrinket = goldTrinket;
|
|
625
|
+
/** Gives the player a golden bomb. */
|
|
626
|
+
function goldenBomb() {
|
|
627
|
+
const player = Isaac.GetPlayer();
|
|
628
|
+
player.AddGoldenBomb();
|
|
629
|
+
}
|
|
630
|
+
exports.goldenBomb = goldenBomb;
|
|
631
|
+
/**
|
|
632
|
+
* Gives a golden heart. Provide a number to give a custom amount of hearts. (You can use negative
|
|
633
|
+
* numbers to remove hearts.)
|
|
634
|
+
*/
|
|
635
|
+
function goldenHearts(params) {
|
|
636
|
+
(0, subroutines_1.addHeart)(params, HealthType_1.HealthType.GOLDEN);
|
|
637
|
+
}
|
|
638
|
+
exports.goldenHearts = goldenHearts;
|
|
639
|
+
/** Gives the player a golden key. */
|
|
640
|
+
function goldenKey() {
|
|
641
|
+
const player = Isaac.GetPlayer();
|
|
642
|
+
player.AddGoldenKey();
|
|
643
|
+
}
|
|
644
|
+
exports.goldenKey = goldenKey;
|
|
645
|
+
/** Alias for the "spawnGoldenTrinket" command. */
|
|
646
|
+
function goldenTrinket(params) {
|
|
647
|
+
spawnGoldenTrinket(params);
|
|
648
|
+
}
|
|
649
|
+
exports.goldenTrinket = goldenTrinket;
|
|
650
|
+
/**
|
|
651
|
+
* Alias for the "debug 11" command. Useful for seeing the coordinates and grid index of each tile
|
|
652
|
+
* in the room.
|
|
653
|
+
*/
|
|
654
|
+
function grid() {
|
|
655
|
+
Isaac.ExecuteCommand("debug 11");
|
|
656
|
+
}
|
|
657
|
+
exports.grid = grid;
|
|
658
|
+
/** Alias for the "gridCosts" command. */
|
|
659
|
+
function grid2() {
|
|
660
|
+
gridCosts();
|
|
661
|
+
}
|
|
662
|
+
exports.grid2 = grid2;
|
|
663
|
+
/** Alias for the "debug 2" command. Useful for seeing the grid costs of each tile in the room. */
|
|
664
|
+
function gridCosts() {
|
|
665
|
+
Isaac.ExecuteCommand("debug 2");
|
|
666
|
+
}
|
|
667
|
+
exports.gridCosts = gridCosts;
|
|
668
|
+
/** Spawns every grid entity, starting at the top-left-most tile. */
|
|
669
|
+
function gridEntities() {
|
|
670
|
+
let gridEntityTypeIndex = -1;
|
|
671
|
+
for (let y = 0; y <= 6; y++) {
|
|
672
|
+
for (let x = 0; x <= 12; x++) {
|
|
673
|
+
gridEntityTypeIndex++;
|
|
674
|
+
const gridEntityType = cachedEnumValues_1.GRID_ENTITY_TYPE_VALUES[gridEntityTypeIndex];
|
|
675
|
+
if (gridEntityType === undefined) {
|
|
676
|
+
return;
|
|
677
|
+
}
|
|
678
|
+
const worldPosition = (0, roomGrid_1.gridCoordinatesToWorldPosition)(x, y);
|
|
679
|
+
(0, gridEntities_1.spawnGridEntity)(gridEntityType, worldPosition);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
exports.gridEntities = gridEntities;
|
|
684
|
+
/**
|
|
685
|
+
* Gives a half red heart. Provide a number to give a custom amount of hearts. (You can use negative
|
|
686
|
+
* numbers to remove hearts.)
|
|
687
|
+
*/
|
|
688
|
+
function hearts(params) {
|
|
689
|
+
(0, subroutines_1.addHeart)(params, HealthType_1.HealthType.RED);
|
|
690
|
+
}
|
|
691
|
+
exports.hearts = hearts;
|
|
692
|
+
/** Alias for the "debug 6" command. */
|
|
693
|
+
function hitboxes() {
|
|
694
|
+
Isaac.ExecuteCommand("debug 6");
|
|
695
|
+
}
|
|
696
|
+
exports.hitboxes = hitboxes;
|
|
697
|
+
/** The same thing as the `pill` command, but gives a horse pill instead of a normal pill. */
|
|
698
|
+
function horse(params) {
|
|
699
|
+
pill(params, true);
|
|
700
|
+
}
|
|
701
|
+
exports.horse = horse;
|
|
702
|
+
/** Warps to the Blue Womb Boss Room. */
|
|
703
|
+
function hush() {
|
|
704
|
+
(0, stage_1.setStage)(isaac_typescript_definitions_1.LevelStage.BLUE_WOMB, isaac_typescript_definitions_1.StageType.ORIGINAL);
|
|
705
|
+
bossRoom();
|
|
706
|
+
}
|
|
707
|
+
exports.hush = hush;
|
|
708
|
+
/** Warps to the I AM ERROR room for the floor. */
|
|
709
|
+
function iAmErrorRoom() {
|
|
710
|
+
(0, rooms_1.changeRoom)(isaac_typescript_definitions_1.GridRoom.ERROR);
|
|
711
|
+
}
|
|
712
|
+
exports.iAmErrorRoom = iAmErrorRoom;
|
|
713
|
+
/**
|
|
714
|
+
* Gives a key. Provide a number to give a custom amount of key. (You can use negative numbers to
|
|
715
|
+
* remove keys.)
|
|
716
|
+
*/
|
|
717
|
+
function key(params) {
|
|
718
|
+
let numKeys = 1;
|
|
719
|
+
if (params !== "") {
|
|
720
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
721
|
+
if (num === undefined) {
|
|
722
|
+
print(`Invalid key amount: ${num}`);
|
|
723
|
+
return;
|
|
724
|
+
}
|
|
725
|
+
numKeys = num;
|
|
726
|
+
}
|
|
727
|
+
const player = Isaac.GetPlayer();
|
|
728
|
+
player.AddKeys(numKeys);
|
|
729
|
+
}
|
|
730
|
+
exports.key = key;
|
|
731
|
+
/**
|
|
732
|
+
* Gives 99 keys. Provide a number to give a custom amount of coins. (You can use negative numbers
|
|
733
|
+
* to remove keys.)
|
|
734
|
+
*/
|
|
735
|
+
function keys(params) {
|
|
736
|
+
let numKeys = 99;
|
|
737
|
+
if (params !== "") {
|
|
738
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
739
|
+
if (num === undefined) {
|
|
740
|
+
print(`Invalid key amount: ${num}`);
|
|
741
|
+
return;
|
|
742
|
+
}
|
|
743
|
+
numKeys = num;
|
|
744
|
+
}
|
|
745
|
+
const player = Isaac.GetPlayer();
|
|
746
|
+
player.AddKeys(numKeys);
|
|
747
|
+
}
|
|
748
|
+
exports.keys = keys;
|
|
749
|
+
/** Toggles permanent Curse of the Labyrinth. */
|
|
750
|
+
function labyrinth() {
|
|
751
|
+
v_1.v.persistent.labyrinth = !v_1.v.persistent.labyrinth;
|
|
752
|
+
(0, console_1.printEnabled)(v_1.v.persistent.labyrinth, "permanent Curse of the Labyrinth");
|
|
753
|
+
}
|
|
754
|
+
exports.labyrinth = labyrinth;
|
|
755
|
+
/** Moves the player 0.5 units left. Provide a number to move a custom amount of units. */
|
|
756
|
+
function left(params) {
|
|
757
|
+
(0, subroutines_1.movePlayer)(params, isaac_typescript_definitions_1.Direction.LEFT);
|
|
758
|
+
}
|
|
759
|
+
exports.left = left;
|
|
760
|
+
/** Warps to the first Library on the floor. */
|
|
761
|
+
function library() {
|
|
762
|
+
(0, subroutines_1.warpToRoomType)(isaac_typescript_definitions_1.RoomType.LIBRARY);
|
|
763
|
+
}
|
|
764
|
+
exports.library = library;
|
|
765
|
+
/**
|
|
766
|
+
* Logs the entities in the room to the "log.txt" file. Provide a number to only log that specific
|
|
767
|
+
* `EntityType`.
|
|
768
|
+
*
|
|
769
|
+
* By default, this command will exclude background effects. If that is not desired, use the
|
|
770
|
+
* "listAll" command instead.
|
|
771
|
+
*/
|
|
772
|
+
function list(params) {
|
|
773
|
+
(0, subroutines_1.listEntities)(params, false);
|
|
774
|
+
}
|
|
775
|
+
exports.list = list;
|
|
776
|
+
/**
|
|
777
|
+
* Logs the entities in the room to the "log.txt" file. Provide a number to only log that specific
|
|
778
|
+
* `EntityType`.
|
|
779
|
+
*/
|
|
780
|
+
function listAll(params) {
|
|
781
|
+
(0, subroutines_1.listEntities)(params, true);
|
|
782
|
+
}
|
|
783
|
+
exports.listAll = listAll;
|
|
784
|
+
/**
|
|
785
|
+
* Logs the grid entities in the room to the "log.txt" file. Provide a number to only log that
|
|
786
|
+
* specific `GridEntityType`.
|
|
787
|
+
*
|
|
788
|
+
* By default, this command will exclude walls. If that is not desired, use the "listGridAll"
|
|
789
|
+
* command instead.
|
|
790
|
+
*/
|
|
791
|
+
function listGrid(params) {
|
|
792
|
+
(0, subroutines_1.listGridEntities)(params, false);
|
|
793
|
+
}
|
|
794
|
+
exports.listGrid = listGrid;
|
|
795
|
+
/**
|
|
796
|
+
* Logs the grid entities in the room to the "log.txt" file. Provide a number to only log that
|
|
797
|
+
* specific `GridEntityType`.
|
|
798
|
+
*/
|
|
799
|
+
function listGridAll(params) {
|
|
800
|
+
(0, subroutines_1.listGridEntities)(params, true);
|
|
801
|
+
}
|
|
802
|
+
exports.listGridAll = listGridAll;
|
|
803
|
+
/** Toggles permanent Curse of the Lost. */
|
|
804
|
+
function lost() {
|
|
805
|
+
v_1.v.persistent.lost = !v_1.v.persistent.lost;
|
|
806
|
+
(0, console_1.printEnabled)(v_1.v.persistent.lost, "permanent Curse of the Lost");
|
|
807
|
+
}
|
|
808
|
+
exports.lost = lost;
|
|
809
|
+
/** Alias for the "1hp" command. */
|
|
810
|
+
function lowHP() {
|
|
811
|
+
oneHP();
|
|
812
|
+
}
|
|
813
|
+
exports.lowHP = lowHP;
|
|
814
|
+
/** Alias for "debug 9". */
|
|
815
|
+
function luck() {
|
|
816
|
+
Isaac.ExecuteCommand("debug 9");
|
|
817
|
+
}
|
|
818
|
+
exports.luck = luck;
|
|
819
|
+
/** Alias for the "poopMana" command. */
|
|
820
|
+
function mana(params) {
|
|
821
|
+
poopMana(params);
|
|
822
|
+
}
|
|
823
|
+
exports.mana = mana;
|
|
824
|
+
/** Completely reveals the entire map, including the Ultra Secret Room. */
|
|
825
|
+
function map() {
|
|
826
|
+
const level = cachedClasses_1.game.GetLevel();
|
|
827
|
+
const displayFlags = (0, flag_1.addFlag)(isaac_typescript_definitions_1.DisplayFlag.VISIBLE, // 1 << 0
|
|
828
|
+
isaac_typescript_definitions_1.DisplayFlag.SHADOW, // 1 << 1
|
|
829
|
+
isaac_typescript_definitions_1.DisplayFlag.SHOW_ICON);
|
|
830
|
+
for (const roomGridIndex of (0, utils_1.iRange)(constants_1.MAX_LEVEL_GRID_INDEX)) {
|
|
831
|
+
const roomDesc = level.GetRoomByIdx(roomGridIndex);
|
|
832
|
+
roomDesc.DisplayFlags = displayFlags;
|
|
833
|
+
}
|
|
834
|
+
// We must call the "Level.UpdateVisibility" method for the changes to be visible.
|
|
835
|
+
level.UpdateVisibility();
|
|
836
|
+
}
|
|
837
|
+
exports.map = map;
|
|
838
|
+
/**
|
|
839
|
+
* Gives a heart container. Provide a number to give a custom amount of heart containers. (You can
|
|
840
|
+
* use negative numbers to remove heart containers.)
|
|
841
|
+
*/
|
|
842
|
+
function maxHearts(params) {
|
|
843
|
+
(0, subroutines_1.addHeart)(params, HealthType_1.HealthType.MAX_HEARTS);
|
|
844
|
+
}
|
|
845
|
+
exports.maxHearts = maxHearts;
|
|
846
|
+
/** Toggles permanent Curse of the Maze. */
|
|
847
|
+
function maze() {
|
|
848
|
+
v_1.v.persistent.maze = !v_1.v.persistent.maze;
|
|
849
|
+
(0, console_1.printEnabled)(v_1.v.persistent.maze, "permanent Curse of the Maze");
|
|
850
|
+
}
|
|
851
|
+
exports.maze = maze;
|
|
852
|
+
/** Warps to the first Miniboss Room on the floor. */
|
|
853
|
+
function miniboss() {
|
|
854
|
+
(0, subroutines_1.warpToRoomType)(isaac_typescript_definitions_1.RoomType.MINI_BOSS);
|
|
855
|
+
}
|
|
856
|
+
exports.miniboss = miniboss;
|
|
857
|
+
/** Logs the currently playing music track to the "log.txt" file. */
|
|
858
|
+
function music() {
|
|
859
|
+
(0, logMisc_1.logMusic)();
|
|
860
|
+
print('Logged the currently playing music track to the "log.txt" file.');
|
|
861
|
+
}
|
|
862
|
+
exports.music = music;
|
|
863
|
+
/** Alias for the "disableCurses" command. */
|
|
864
|
+
function noCurses() {
|
|
865
|
+
disableCurses();
|
|
866
|
+
}
|
|
867
|
+
exports.noCurses = noCurses;
|
|
868
|
+
/** Sets every NPC in the room to 1 HP. */
|
|
869
|
+
function oneHP() {
|
|
870
|
+
for (const npc of (0, entitiesSpecific_1.getNPCs)()) {
|
|
871
|
+
npc.HitPoints = 1;
|
|
872
|
+
}
|
|
873
|
+
print("Set every NPC to 1 HP.");
|
|
874
|
+
}
|
|
875
|
+
exports.oneHP = oneHP;
|
|
876
|
+
/**
|
|
877
|
+
* Gives a pill with the specified pill effect. Accepts either the effect ID or the partial name of
|
|
878
|
+
* the effect.
|
|
879
|
+
*
|
|
880
|
+
* For example:
|
|
881
|
+
*
|
|
882
|
+
* - `pill 5` - Gives a "Full Health" pill.
|
|
883
|
+
* - `pill suns` - Gives a "Feels like I'm walking on sunshine" pill.
|
|
884
|
+
*/
|
|
885
|
+
function pill(params, isHorse = false) {
|
|
886
|
+
if (params === "") {
|
|
887
|
+
print("You must specify a pill name or number.");
|
|
888
|
+
return;
|
|
889
|
+
}
|
|
890
|
+
let pillEffect;
|
|
891
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
892
|
+
if (num === undefined) {
|
|
893
|
+
const match = (0, string_1.getMapPartialMatch)(params, pillNameToEffectMap_1.PILL_NAME_TO_EFFECT_MAP);
|
|
894
|
+
if (match === undefined) {
|
|
895
|
+
print(`Unknown pill effect: ${params}`);
|
|
896
|
+
return;
|
|
897
|
+
}
|
|
898
|
+
pillEffect = match[1];
|
|
899
|
+
}
|
|
900
|
+
else {
|
|
901
|
+
if (!(0, pills_1.isValidPillEffect)(num)) {
|
|
902
|
+
print(`Invalid pill effect ID: ${num}`);
|
|
903
|
+
return;
|
|
904
|
+
}
|
|
905
|
+
pillEffect = num;
|
|
906
|
+
}
|
|
907
|
+
const pillEffectName = (0, pills_1.getPillEffectName)(pillEffect);
|
|
908
|
+
Isaac.ExecuteCommand(`g p${pillEffect}`);
|
|
909
|
+
if (isHorse) {
|
|
910
|
+
const player = Isaac.GetPlayer();
|
|
911
|
+
const pillColor = player.GetPill(isaac_typescript_definitions_1.PocketItemSlot.SLOT_1);
|
|
912
|
+
const horsePillColor = (0, pills_1.getHorsePillColor)(pillColor);
|
|
913
|
+
player.SetPill(isaac_typescript_definitions_1.PocketItemSlot.SLOT_1, horsePillColor);
|
|
914
|
+
}
|
|
915
|
+
if (isHorse) {
|
|
916
|
+
print(`Gave horse pill: ${pillEffectName} (${pillEffect})`);
|
|
917
|
+
}
|
|
918
|
+
else {
|
|
919
|
+
print(`Gave pill: ${pillEffectName} (${pillEffect})`);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
exports.pill = pill;
|
|
923
|
+
/** Spawns every pill on the ground, starting at the top-left-most tile. */
|
|
924
|
+
function pills() {
|
|
925
|
+
let y;
|
|
926
|
+
let pillColor;
|
|
927
|
+
y = 1;
|
|
928
|
+
pillColor = constantsFirstLast_1.FIRST_PILL_COLOR;
|
|
929
|
+
for (let x = 0; x <= 12; x++) {
|
|
930
|
+
if (pillColor >= isaac_typescript_definitions_1.PillColor.GOLD) {
|
|
931
|
+
break;
|
|
932
|
+
}
|
|
933
|
+
const worldPosition = (0, roomGrid_1.gridCoordinatesToWorldPosition)(x, y);
|
|
934
|
+
(0, pickupsSpecific_1.spawnPill)(pillColor, worldPosition);
|
|
935
|
+
pillColor++; // eslint-disable-line isaacscript/strict-enums
|
|
936
|
+
}
|
|
937
|
+
y = 2;
|
|
938
|
+
pillColor = constantsFirstLast_1.FIRST_HORSE_PILL_COLOR;
|
|
939
|
+
for (let x = 0; x <= 12; x++) {
|
|
940
|
+
if (pillColor >= isaac_typescript_definitions_1.PillColor.HORSE_GOLD) {
|
|
941
|
+
break;
|
|
942
|
+
}
|
|
943
|
+
const worldPosition = (0, roomGrid_1.gridCoordinatesToWorldPosition)(x, y);
|
|
944
|
+
(0, pickupsSpecific_1.spawnPill)(pillColor, worldPosition);
|
|
945
|
+
pillColor++; // eslint-disable-line isaacscript/strict-enums
|
|
946
|
+
}
|
|
947
|
+
y = 3;
|
|
948
|
+
const worldPosition1 = (0, roomGrid_1.gridCoordinatesToWorldPosition)(0, y);
|
|
949
|
+
(0, pickupsSpecific_1.spawnPill)(isaac_typescript_definitions_1.PillColor.GOLD, worldPosition1);
|
|
950
|
+
const worldPosition2 = (0, roomGrid_1.gridCoordinatesToWorldPosition)(1, y);
|
|
951
|
+
(0, pickupsSpecific_1.spawnPill)(isaac_typescript_definitions_1.PillColor.HORSE_GOLD, worldPosition2);
|
|
952
|
+
}
|
|
953
|
+
exports.pills = pills;
|
|
954
|
+
/** Warps to the first Planetarium on the floor. */
|
|
955
|
+
function planetarium() {
|
|
956
|
+
(0, subroutines_1.warpToRoomType)(isaac_typescript_definitions_1.RoomType.PLANETARIUM);
|
|
957
|
+
}
|
|
958
|
+
exports.planetarium = planetarium;
|
|
959
|
+
/** Alias for the "sound" command. */
|
|
960
|
+
function playSound(params) {
|
|
961
|
+
sound(params);
|
|
962
|
+
}
|
|
963
|
+
exports.playSound = playSound;
|
|
964
|
+
/** Sets the player's pocket item to the specified collectible type. */
|
|
965
|
+
function pocket(params) {
|
|
966
|
+
if (params === "") {
|
|
967
|
+
print("You must supply a collectible type to put as the pocket item.");
|
|
968
|
+
return;
|
|
969
|
+
}
|
|
970
|
+
const collectibleType = (0, types_1.parseIntSafe)(params);
|
|
971
|
+
if (collectibleType === undefined ||
|
|
972
|
+
!(0, collectibles_1.isValidCollectibleType)(collectibleType)) {
|
|
973
|
+
print(`Invalid collectible type: ${collectibleType}`);
|
|
974
|
+
return;
|
|
975
|
+
}
|
|
976
|
+
const player = Isaac.GetPlayer();
|
|
977
|
+
player.SetPocketActiveItem(collectibleType, isaac_typescript_definitions_1.ActiveSlot.POCKET);
|
|
978
|
+
}
|
|
979
|
+
exports.pocket = pocket;
|
|
980
|
+
/** Creates a poop grid entity next to the player. */
|
|
981
|
+
function poop() {
|
|
982
|
+
const roomClass = cachedClasses_1.game.GetRoom();
|
|
983
|
+
const player = Isaac.GetPlayer();
|
|
984
|
+
const tilePosition = roomClass.FindFreeTilePosition(player.Position, 0);
|
|
985
|
+
(0, gridEntities_1.spawnGridEntity)(isaac_typescript_definitions_1.GridEntityType.POOP, tilePosition);
|
|
986
|
+
}
|
|
987
|
+
exports.poop = poop;
|
|
988
|
+
/**
|
|
989
|
+
* Gives a poop mana charge. This only affects Tainted Blue Baby. Provide a number to give a custom
|
|
990
|
+
* amount of charges. (You can use negative numbers to remove charges.)
|
|
991
|
+
*/
|
|
992
|
+
function poopMana(params) {
|
|
993
|
+
let charges = 1;
|
|
994
|
+
if (params !== "") {
|
|
995
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
996
|
+
if (num === undefined) {
|
|
997
|
+
print(`Invalid mana amount: ${num}`);
|
|
998
|
+
return;
|
|
999
|
+
}
|
|
1000
|
+
charges = num;
|
|
1001
|
+
}
|
|
1002
|
+
const player = Isaac.GetPlayer();
|
|
1003
|
+
player.AddPoopMana(charges);
|
|
1004
|
+
}
|
|
1005
|
+
exports.poopMana = poopMana;
|
|
1006
|
+
/** Alias for the "getPosition" command. */
|
|
1007
|
+
function position() {
|
|
1008
|
+
getPosition();
|
|
1009
|
+
}
|
|
1010
|
+
exports.position = position;
|
|
1011
|
+
/** Alias for the "hearts" command. */
|
|
1012
|
+
function redHearts(params) {
|
|
1013
|
+
hearts(params);
|
|
1014
|
+
}
|
|
1015
|
+
exports.redHearts = redHearts;
|
|
1016
|
+
/** Starts a room transition to the same room that you are already in. */
|
|
1017
|
+
function reloadRoom() {
|
|
1018
|
+
(0, roomTransition_1.reloadRoom)();
|
|
1019
|
+
}
|
|
1020
|
+
exports.reloadRoom = reloadRoom;
|
|
1021
|
+
/** Moves the player 0.5 units right. Provide a number to move a custom amount of units. */
|
|
1022
|
+
function right(params) {
|
|
1023
|
+
(0, subroutines_1.movePlayer)(params, isaac_typescript_definitions_1.Direction.RIGHT);
|
|
1024
|
+
}
|
|
1025
|
+
exports.right = right;
|
|
1026
|
+
/** Logs information about the room to the "log.txt" file. */
|
|
1027
|
+
function room() {
|
|
1028
|
+
(0, logMisc_1.logRoom)();
|
|
1029
|
+
print('Logged room information to the "log.txt" file.');
|
|
1030
|
+
}
|
|
1031
|
+
exports.room = room;
|
|
1032
|
+
/**
|
|
1033
|
+
* Gives a rotten heart. Provide a number to give a custom amount of hearts. (You can use negative
|
|
1034
|
+
* numbers to remove hearts.)
|
|
1035
|
+
*/
|
|
1036
|
+
function rottenHearts(params) {
|
|
1037
|
+
(0, subroutines_1.addHeart)(params, HealthType_1.HealthType.ROTTEN);
|
|
1038
|
+
}
|
|
1039
|
+
exports.rottenHearts = rottenHearts;
|
|
1040
|
+
/**
|
|
1041
|
+
* Run the suite of tests that prove that the "deepCopy" helper function and the "merge" function
|
|
1042
|
+
* work properly. For more information, see the `runDeepCopyTests` and the `runMergeTests`
|
|
1043
|
+
* functions.
|
|
1044
|
+
*
|
|
1045
|
+
* In general, running the tests is only useful if you are troubleshooting the save data manager.
|
|
1046
|
+
*/
|
|
1047
|
+
function runTests() {
|
|
1048
|
+
(0, deepCopyTests_1.runDeepCopyTests)();
|
|
1049
|
+
(0, mergeTests_1.runMergeTests)();
|
|
1050
|
+
}
|
|
1051
|
+
exports.runTests = runTests;
|
|
1052
|
+
/**
|
|
1053
|
+
* Alias for the "stage" command.
|
|
1054
|
+
*
|
|
1055
|
+
* For example:
|
|
1056
|
+
* - s 3 - Warps to Caves 1.
|
|
1057
|
+
* - s 1c - Warps to Downpour 1.
|
|
1058
|
+
*/
|
|
1059
|
+
function s(params) {
|
|
1060
|
+
if (params === "") {
|
|
1061
|
+
print("You must specify a stage number.");
|
|
1062
|
+
return;
|
|
1063
|
+
}
|
|
1064
|
+
const finalCharacter = params.slice(-1);
|
|
1065
|
+
let stageString;
|
|
1066
|
+
let stageTypeLetter;
|
|
1067
|
+
if (finalCharacter === "a" ||
|
|
1068
|
+
finalCharacter === "b" ||
|
|
1069
|
+
finalCharacter === "c" ||
|
|
1070
|
+
finalCharacter === "d") {
|
|
1071
|
+
// e.g. "s 11a" for going to The Chest
|
|
1072
|
+
stageString = params.slice(0, -1);
|
|
1073
|
+
stageTypeLetter = finalCharacter;
|
|
1074
|
+
}
|
|
1075
|
+
else {
|
|
1076
|
+
// e.g. "s 11" for going to the Dark Room
|
|
1077
|
+
stageString = params;
|
|
1078
|
+
stageTypeLetter = "";
|
|
1079
|
+
}
|
|
1080
|
+
const stage = (0, types_1.parseIntSafe)(stageString);
|
|
1081
|
+
if (stage === undefined || !(0, enums_1.isEnumValue)(stage, isaac_typescript_definitions_1.StageType)) {
|
|
1082
|
+
print(`Invalid stage number: ${stage}`);
|
|
1083
|
+
return;
|
|
1084
|
+
}
|
|
1085
|
+
Isaac.ExecuteCommand(`stage ${stage}${stageTypeLetter}`);
|
|
1086
|
+
}
|
|
1087
|
+
exports.s = s;
|
|
1088
|
+
/** Warps to the first Sacrifice Room on the floor. */
|
|
1089
|
+
function sacrificeRoom() {
|
|
1090
|
+
(0, subroutines_1.warpToRoomType)(isaac_typescript_definitions_1.RoomType.SACRIFICE);
|
|
1091
|
+
}
|
|
1092
|
+
exports.sacrificeRoom = sacrificeRoom;
|
|
1093
|
+
/** Warps to the first Secret Room on the floor. */
|
|
1094
|
+
function secretRoom() {
|
|
1095
|
+
(0, subroutines_1.warpToRoomType)(isaac_typescript_definitions_1.RoomType.SECRET);
|
|
1096
|
+
}
|
|
1097
|
+
exports.secretRoom = secretRoom;
|
|
1098
|
+
/** Warps to the Secret Shop that you would normally get to with a Member Card. */
|
|
1099
|
+
function secretShop() {
|
|
1100
|
+
(0, rooms_1.changeRoom)(isaac_typescript_definitions_1.GridRoom.SECRET_SHOP);
|
|
1101
|
+
}
|
|
1102
|
+
exports.secretShop = secretShop;
|
|
1103
|
+
/** Changes to a seeded run, using the seed of the current run. */
|
|
1104
|
+
function seedStick() {
|
|
1105
|
+
const seedsClass = cachedClasses_1.game.GetSeeds();
|
|
1106
|
+
const startSeedString = seedsClass.GetStartSeedString();
|
|
1107
|
+
Isaac.ExecuteCommand(`seed ${startSeedString}`);
|
|
1108
|
+
print(`Sticking to seed: ${startSeedString}`);
|
|
1109
|
+
}
|
|
1110
|
+
exports.seedStick = seedStick;
|
|
1111
|
+
/** Logs all of the current run's seed effects to the "log.txt" file. */
|
|
1112
|
+
function seeds() {
|
|
1113
|
+
(0, logMisc_1.logSeedEffects)();
|
|
1114
|
+
print('Logged the seed effects to the "log.txt" file.');
|
|
1115
|
+
}
|
|
1116
|
+
exports.seeds = seeds;
|
|
1117
|
+
/**
|
|
1118
|
+
* Sets a charge to the player's specified active item. You must provide the active slot number and
|
|
1119
|
+
* the number of charges to set.
|
|
1120
|
+
*/
|
|
1121
|
+
function setCharges(params) {
|
|
1122
|
+
if (params === "") {
|
|
1123
|
+
print("You must specify a slot number and a charge amount. (Use 0 for the primary slot, 1 for the Schoolbag slot, 2 for the pocket item slot, and 3 for the Dice Bag slot.)");
|
|
1124
|
+
return;
|
|
1125
|
+
}
|
|
1126
|
+
const args = params.split(" ");
|
|
1127
|
+
if (args.length === 1) {
|
|
1128
|
+
print("You must specify the amount of charge to set.");
|
|
1129
|
+
return;
|
|
1130
|
+
}
|
|
1131
|
+
if (args.length !== 2) {
|
|
1132
|
+
print(`Invalid amount of arguments: ${args.length}`);
|
|
1133
|
+
return;
|
|
1134
|
+
}
|
|
1135
|
+
const [activeSlotString, chargeString] = args;
|
|
1136
|
+
if (activeSlotString === undefined || chargeString === undefined) {
|
|
1137
|
+
return;
|
|
1138
|
+
}
|
|
1139
|
+
const activeSlot = (0, types_1.parseIntSafe)(activeSlotString);
|
|
1140
|
+
if (activeSlot === undefined || !(0, enums_1.isEnumValue)(activeSlot, isaac_typescript_definitions_1.ActiveSlot)) {
|
|
1141
|
+
print(`Invalid slot number: ${activeSlotString}`);
|
|
1142
|
+
return;
|
|
1143
|
+
}
|
|
1144
|
+
const chargeNum = (0, types_1.parseIntSafe)(chargeString);
|
|
1145
|
+
if (chargeNum === undefined) {
|
|
1146
|
+
print(`Invalid charge amount: ${chargeString}`);
|
|
1147
|
+
return;
|
|
1148
|
+
}
|
|
1149
|
+
if (chargeNum < 0) {
|
|
1150
|
+
print(`Invalid charge amount: ${chargeNum}`);
|
|
1151
|
+
return;
|
|
1152
|
+
}
|
|
1153
|
+
const player = Isaac.GetPlayer();
|
|
1154
|
+
player.SetActiveCharge(chargeNum, activeSlot);
|
|
1155
|
+
}
|
|
1156
|
+
exports.setCharges = setCharges;
|
|
1157
|
+
/**
|
|
1158
|
+
* Moves the first player to the specified position.
|
|
1159
|
+
*
|
|
1160
|
+
* For example:
|
|
1161
|
+
* - setPosition 100 50
|
|
1162
|
+
*/
|
|
1163
|
+
function setPosition(params) {
|
|
1164
|
+
if (params === "") {
|
|
1165
|
+
print('You must specify a position. (e.g. "setPosition 100 50")');
|
|
1166
|
+
return;
|
|
1167
|
+
}
|
|
1168
|
+
const args = params.split(" ");
|
|
1169
|
+
if (args.length !== 2) {
|
|
1170
|
+
print('You must specify a position. (e.g. "setPosition 100 50")');
|
|
1171
|
+
return;
|
|
1172
|
+
}
|
|
1173
|
+
const [xString, yString] = args;
|
|
1174
|
+
if (xString === undefined || yString === undefined) {
|
|
1175
|
+
return;
|
|
1176
|
+
}
|
|
1177
|
+
const x = (0, types_1.parseIntSafe)(xString);
|
|
1178
|
+
if (x === undefined) {
|
|
1179
|
+
print(`Invalid x value: ${xString}`);
|
|
1180
|
+
return;
|
|
1181
|
+
}
|
|
1182
|
+
const y = (0, types_1.parseIntSafe)(yString);
|
|
1183
|
+
if (y === undefined) {
|
|
1184
|
+
print(`Invalid y value: ${yString}`);
|
|
1185
|
+
return;
|
|
1186
|
+
}
|
|
1187
|
+
const player = Isaac.GetPlayer();
|
|
1188
|
+
const newPosition = Vector(x, y);
|
|
1189
|
+
player.Position = newPosition;
|
|
1190
|
+
}
|
|
1191
|
+
exports.setPosition = setPosition;
|
|
1192
|
+
/** Warps to the first shop on the floor. */
|
|
1193
|
+
function shop() {
|
|
1194
|
+
(0, subroutines_1.warpToRoomType)(isaac_typescript_definitions_1.RoomType.SHOP);
|
|
1195
|
+
}
|
|
1196
|
+
exports.shop = shop;
|
|
1197
|
+
/** Uses the Smelter to smelt the current player's trinket. */
|
|
1198
|
+
function smelt() {
|
|
1199
|
+
const player = Isaac.GetPlayer();
|
|
1200
|
+
(0, playerCollectibles_1.useActiveItemTemp)(player, isaac_typescript_definitions_1.CollectibleType.SMELTER);
|
|
1201
|
+
}
|
|
1202
|
+
exports.smelt = smelt;
|
|
1203
|
+
/**
|
|
1204
|
+
* Gives a soul charge. This only affects Tainted Bethany. Provide a number to give a custom amount
|
|
1205
|
+
* of charges. (You can use negative numbers to remove charges.)
|
|
1206
|
+
*/
|
|
1207
|
+
function soulCharges(params) {
|
|
1208
|
+
let charges = 1;
|
|
1209
|
+
if (params !== "") {
|
|
1210
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
1211
|
+
if (num === undefined) {
|
|
1212
|
+
print(`Invalid charges amount: ${num}`);
|
|
1213
|
+
return;
|
|
1214
|
+
}
|
|
1215
|
+
charges = num;
|
|
1216
|
+
}
|
|
1217
|
+
const player = Isaac.GetPlayer();
|
|
1218
|
+
player.AddSoulCharge(charges);
|
|
1219
|
+
}
|
|
1220
|
+
exports.soulCharges = soulCharges;
|
|
1221
|
+
/**
|
|
1222
|
+
* Gives a half soul heart. Provide a number to give a custom amount of hearts. (You can use
|
|
1223
|
+
* negative numbers to remove hearts.)
|
|
1224
|
+
*/
|
|
1225
|
+
function soulHearts(params) {
|
|
1226
|
+
(0, subroutines_1.addHeart)(params, HealthType_1.HealthType.SOUL);
|
|
1227
|
+
}
|
|
1228
|
+
exports.soulHearts = soulHearts;
|
|
1229
|
+
/**
|
|
1230
|
+
* Play the supplied sound effect.
|
|
1231
|
+
*
|
|
1232
|
+
* For example:
|
|
1233
|
+
* - sound 1 - Plays the 1-Up sound effect.
|
|
1234
|
+
*/
|
|
1235
|
+
function sound(params) {
|
|
1236
|
+
const soundEffect = (0, types_1.parseIntSafe)(params);
|
|
1237
|
+
if (soundEffect === undefined || !(0, enums_1.isEnumValue)(soundEffect, isaac_typescript_definitions_1.SoundEffect)) {
|
|
1238
|
+
print(`Invalid sound effect ID: ${soundEffect}.`);
|
|
1239
|
+
return;
|
|
1240
|
+
}
|
|
1241
|
+
cachedClasses_1.sfxManager.Play(soundEffect);
|
|
1242
|
+
}
|
|
1243
|
+
exports.sound = sound;
|
|
1244
|
+
/** Logs all of the currently playing sound effects to the "log.txt" file. */
|
|
1245
|
+
function sounds() {
|
|
1246
|
+
(0, logMisc_1.logSounds)();
|
|
1247
|
+
print('Logged the currently playing sound effects to the "log.txt" file.');
|
|
1248
|
+
}
|
|
1249
|
+
exports.sounds = sounds;
|
|
1250
|
+
/**
|
|
1251
|
+
* Toggles spamming Blood Rights on every frame. Useful for killing enemies very fast without using
|
|
1252
|
+
* "debug 10".
|
|
1253
|
+
*/
|
|
1254
|
+
function spam() {
|
|
1255
|
+
v_1.v.persistent.spamBloodRights = !v_1.v.persistent.spamBloodRights;
|
|
1256
|
+
(0, console_1.printEnabled)(v_1.v.persistent.spamBloodRights, "spamming Blood Rights");
|
|
1257
|
+
}
|
|
1258
|
+
exports.spam = spam;
|
|
1259
|
+
/**
|
|
1260
|
+
* Spawns a collectible in the center of the room. You must specify the collectible name or the
|
|
1261
|
+
* number corresponding to the collectible type.
|
|
1262
|
+
*
|
|
1263
|
+
* For example, all of the following commands would spawn Spoon Bender:
|
|
1264
|
+
*
|
|
1265
|
+
* ```text
|
|
1266
|
+
* spawnCollectible spoon bender
|
|
1267
|
+
* spawnCollectible spoon
|
|
1268
|
+
* spawnCollectible spo
|
|
1269
|
+
* spawnCollectible 3
|
|
1270
|
+
* ```
|
|
1271
|
+
*/
|
|
1272
|
+
function spawnCollectible(params) {
|
|
1273
|
+
if (params === "") {
|
|
1274
|
+
print("You must specify the collectible name or the number corresponding to the collectible type.");
|
|
1275
|
+
return;
|
|
1276
|
+
}
|
|
1277
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
1278
|
+
let collectibleType;
|
|
1279
|
+
if (num === undefined) {
|
|
1280
|
+
const match = (0, string_1.getMapPartialMatch)(params, collectibleNameToTypeMap_1.COLLECTIBLE_NAME_TO_TYPE_MAP);
|
|
1281
|
+
if (match === undefined) {
|
|
1282
|
+
print(`Unknown collectible: ${params}`);
|
|
1283
|
+
return;
|
|
1284
|
+
}
|
|
1285
|
+
collectibleType = match[1];
|
|
1286
|
+
}
|
|
1287
|
+
else {
|
|
1288
|
+
if (!(0, collectibles_1.isValidCollectibleType)(num)) {
|
|
1289
|
+
print(`Invalid collectible type: ${num}`);
|
|
1290
|
+
}
|
|
1291
|
+
collectibleType = num;
|
|
1292
|
+
}
|
|
1293
|
+
const roomClass = cachedClasses_1.game.GetRoom();
|
|
1294
|
+
const centerPos = roomClass.GetCenterPos();
|
|
1295
|
+
(0, spawnCollectible_1.spawnCollectible)(collectibleType, centerPos, undefined);
|
|
1296
|
+
}
|
|
1297
|
+
exports.spawnCollectible = spawnCollectible;
|
|
1298
|
+
/**
|
|
1299
|
+
* Spawns a collectible at a specific grid tile location. You must specify the number corresponding
|
|
1300
|
+
* to the collectible type and the number corresponding to the grid tile location.
|
|
1301
|
+
*
|
|
1302
|
+
* For example, this would spawn Spoon Bender in the top-left corner of a 1x1 room:
|
|
1303
|
+
*
|
|
1304
|
+
* ```text
|
|
1305
|
+
* spawnCollectibleAt 3 16
|
|
1306
|
+
* ```
|
|
1307
|
+
*
|
|
1308
|
+
* (You can use the "grid" command to toggle displaying the numerical grid indexes corresponding to
|
|
1309
|
+
* a grid tile.)
|
|
1310
|
+
*/
|
|
1311
|
+
function spawnCollectibleAt(params) {
|
|
1312
|
+
if (params === "") {
|
|
1313
|
+
print("You must specify the number corresponding to the collectible type and the number corresponding to the grid tile location.");
|
|
1314
|
+
return;
|
|
1315
|
+
}
|
|
1316
|
+
const args = params.split(" ");
|
|
1317
|
+
if (args.length !== 2) {
|
|
1318
|
+
print("You must specify the number corresponding to the collectible type and the number corresponding to the grid tile location.");
|
|
1319
|
+
return;
|
|
1320
|
+
}
|
|
1321
|
+
const [collectibleTypeString, gridIndexString] = args;
|
|
1322
|
+
if (collectibleTypeString === undefined || gridIndexString === undefined) {
|
|
1323
|
+
return;
|
|
1324
|
+
}
|
|
1325
|
+
const collectibleType = (0, types_1.parseIntSafe)(collectibleTypeString);
|
|
1326
|
+
if (collectibleType === undefined ||
|
|
1327
|
+
!(0, collectibles_1.isValidCollectibleType)(collectibleType)) {
|
|
1328
|
+
print(`Invalid collectible type: ${args[0]}`);
|
|
1329
|
+
return;
|
|
1330
|
+
}
|
|
1331
|
+
const gridIndex = (0, types_1.parseIntSafe)(gridIndexString);
|
|
1332
|
+
if (gridIndex === undefined || gridIndex < 0) {
|
|
1333
|
+
print(`Failed to parse the grid index of: ${args[1]}`);
|
|
1334
|
+
return;
|
|
1335
|
+
}
|
|
1336
|
+
(0, spawnCollectible_1.spawnCollectible)(collectibleType, gridIndex, undefined);
|
|
1337
|
+
}
|
|
1338
|
+
exports.spawnCollectibleAt = spawnCollectibleAt;
|
|
1339
|
+
/** Alias for the `spawnGoldenTrinket` command. */
|
|
1340
|
+
function spawnGoldTrinket(params) {
|
|
1341
|
+
spawnGoldenTrinket(params);
|
|
1342
|
+
}
|
|
1343
|
+
exports.spawnGoldTrinket = spawnGoldTrinket;
|
|
1344
|
+
/**
|
|
1345
|
+
* The same thing as the `spawnTrinket` command but spawns a golden version of the specified
|
|
1346
|
+
* trinket.
|
|
1347
|
+
*/
|
|
1348
|
+
function spawnGoldenTrinket(params) {
|
|
1349
|
+
spawnTrinket(params, true);
|
|
1350
|
+
}
|
|
1351
|
+
exports.spawnGoldenTrinket = spawnGoldenTrinket;
|
|
1352
|
+
/**
|
|
1353
|
+
* The same thing as the `spawnTrinketAt` command but spawns a golden version of the specified
|
|
1354
|
+
* trinket.
|
|
1355
|
+
*/
|
|
1356
|
+
function spawnGoldenTrinketAt(params) {
|
|
1357
|
+
spawnTrinketAt(params, true);
|
|
1358
|
+
}
|
|
1359
|
+
exports.spawnGoldenTrinketAt = spawnGoldenTrinketAt;
|
|
1360
|
+
/**
|
|
1361
|
+
* Spawns a trinket in the center of the room. You must specify the trinket name or the number
|
|
1362
|
+
* corresponding to the trinket type.
|
|
1363
|
+
*
|
|
1364
|
+
* For example, all of the following commands would spawn the Wiggle Worm trinket:
|
|
1365
|
+
*
|
|
1366
|
+
* ```text
|
|
1367
|
+
* spawnTrinket wiggle worm
|
|
1368
|
+
* spawnTrinket wiggle
|
|
1369
|
+
* spawnTrinket wig
|
|
1370
|
+
* spawnTrinket 10
|
|
1371
|
+
* ```
|
|
1372
|
+
*
|
|
1373
|
+
* Also see the `spawnGoldenTrinket` command.
|
|
1374
|
+
*/
|
|
1375
|
+
function spawnTrinket(params, golden = false) {
|
|
1376
|
+
if (params === "") {
|
|
1377
|
+
print("You must specify the name or number corresponding to the trinket type.");
|
|
1378
|
+
return;
|
|
1379
|
+
}
|
|
1380
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
1381
|
+
let trinketType;
|
|
1382
|
+
if (num === undefined) {
|
|
1383
|
+
const match = (0, string_1.getMapPartialMatch)(params, trinketNameToTypeMap_1.TRINKET_NAME_TO_TYPE_MAP);
|
|
1384
|
+
if (match === undefined) {
|
|
1385
|
+
print(`Unknown trinket: ${params}`);
|
|
1386
|
+
return;
|
|
1387
|
+
}
|
|
1388
|
+
trinketType = match[1];
|
|
1389
|
+
}
|
|
1390
|
+
else {
|
|
1391
|
+
if (!(0, trinkets_1.isValidTrinketType)(num)) {
|
|
1392
|
+
print(`Invalid trinket type: ${num}`);
|
|
1393
|
+
return;
|
|
1394
|
+
}
|
|
1395
|
+
trinketType = num;
|
|
1396
|
+
}
|
|
1397
|
+
const roomClass = cachedClasses_1.game.GetRoom();
|
|
1398
|
+
const centerPos = roomClass.GetCenterPos();
|
|
1399
|
+
const goldenTrinketType = (0, trinkets_1.getGoldenTrinketType)(trinketType);
|
|
1400
|
+
const trinketTypeToSpawn = golden ? goldenTrinketType : trinketType;
|
|
1401
|
+
(0, pickupsSpecific_1.spawnTrinket)(trinketTypeToSpawn, centerPos);
|
|
1402
|
+
}
|
|
1403
|
+
exports.spawnTrinket = spawnTrinket;
|
|
1404
|
+
/**
|
|
1405
|
+
* Spawns a trinket at a specific grid tile location. You must specify the number corresponding to
|
|
1406
|
+
* the trinket type and the number corresponding to the grid tile location.
|
|
1407
|
+
*
|
|
1408
|
+
* For example, this would spawn Wiggle Worm in the top-left corner of a 1x1 room:
|
|
1409
|
+
*
|
|
1410
|
+
* ```text
|
|
1411
|
+
* spawnTrinketAt 10 16
|
|
1412
|
+
* ```
|
|
1413
|
+
*
|
|
1414
|
+
* (You can use the "grid" command to toggle displaying the numerical grid indexes corresponding to
|
|
1415
|
+
* a grid tile.)
|
|
1416
|
+
*/
|
|
1417
|
+
function spawnTrinketAt(params, golden = false) {
|
|
1418
|
+
if (params === "") {
|
|
1419
|
+
print("You must specify the number corresponding to the trinket type and the number corresponding to the grid tile location.");
|
|
1420
|
+
return;
|
|
1421
|
+
}
|
|
1422
|
+
const args = params.split(" ");
|
|
1423
|
+
if (args.length !== 2) {
|
|
1424
|
+
print("You must specify the number corresponding to the trinket type and the number corresponding to the grid tile location.");
|
|
1425
|
+
return;
|
|
1426
|
+
}
|
|
1427
|
+
const [trinketTypeString, gridIndexString] = args;
|
|
1428
|
+
if (trinketTypeString === undefined || gridIndexString === undefined) {
|
|
1429
|
+
return;
|
|
1430
|
+
}
|
|
1431
|
+
const trinketType = (0, types_1.parseIntSafe)(trinketTypeString);
|
|
1432
|
+
if (trinketType === undefined || !(0, trinkets_1.isValidTrinketType)(trinketType)) {
|
|
1433
|
+
print(`Invalid trinket type: ${trinketTypeString}`);
|
|
1434
|
+
return;
|
|
1435
|
+
}
|
|
1436
|
+
const gridIndex = (0, types_1.parseIntSafe)(gridIndexString);
|
|
1437
|
+
if (gridIndex === undefined || gridIndex < 0) {
|
|
1438
|
+
print(`Failed to parse the grid index of: ${args[1]}`);
|
|
1439
|
+
return;
|
|
1440
|
+
}
|
|
1441
|
+
const goldenTrinketType = (0, trinkets_1.getGoldenTrinketType)(trinketType);
|
|
1442
|
+
const trinketTypeToSpawn = golden ? goldenTrinketType : trinketType;
|
|
1443
|
+
(0, pickupsSpecific_1.spawnTrinket)(trinketTypeToSpawn, gridIndex);
|
|
1444
|
+
}
|
|
1445
|
+
exports.spawnTrinketAt = spawnTrinketAt;
|
|
1446
|
+
/**
|
|
1447
|
+
* Toggles a set movement speed and flight for the player. You can provide an optional argument to
|
|
1448
|
+
* this command in order to set the speed to a specific amount. Default is 2.0 (which is the maximum
|
|
1449
|
+
* that the stat can be set to).
|
|
1450
|
+
*/
|
|
1451
|
+
function speed(params) {
|
|
1452
|
+
const player = Isaac.GetPlayer();
|
|
1453
|
+
if (params !== "") {
|
|
1454
|
+
const num = tonumber(params); // Can be a float.
|
|
1455
|
+
if (num === undefined) {
|
|
1456
|
+
print(`Invalid speed amount: ${params}`);
|
|
1457
|
+
return;
|
|
1458
|
+
}
|
|
1459
|
+
v_1.v.persistent.damageAmount = num;
|
|
1460
|
+
}
|
|
1461
|
+
v_1.v.persistent.speed = !v_1.v.persistent.speed;
|
|
1462
|
+
player.AddCacheFlags(isaac_typescript_definitions_1.CacheFlag.SPEED);
|
|
1463
|
+
player.EvaluateItems();
|
|
1464
|
+
const value = tostring(v_1.v.persistent.speed);
|
|
1465
|
+
flight(value);
|
|
1466
|
+
(0, console_1.printEnabled)(v_1.v.persistent.speed, "set speed");
|
|
1467
|
+
}
|
|
1468
|
+
exports.speed = speed;
|
|
1469
|
+
/** Creates a spikes grid entity next to the player. */
|
|
1470
|
+
function spikes() {
|
|
1471
|
+
const roomClass = cachedClasses_1.game.GetRoom();
|
|
1472
|
+
const player = Isaac.GetPlayer();
|
|
1473
|
+
const tilePosition = roomClass.FindFreeTilePosition(player.Position, 0);
|
|
1474
|
+
(0, gridEntities_1.spawnGridEntity)(isaac_typescript_definitions_1.GridEntityType.SPIKES, tilePosition);
|
|
1475
|
+
}
|
|
1476
|
+
exports.spikes = spikes;
|
|
1477
|
+
/** Alias for the "startingRoom" command. */
|
|
1478
|
+
function startRoom() {
|
|
1479
|
+
startingRoom();
|
|
1480
|
+
}
|
|
1481
|
+
exports.startRoom = startRoom;
|
|
1482
|
+
/** Warps to the starting room of the floor. */
|
|
1483
|
+
function startingRoom() {
|
|
1484
|
+
const level = cachedClasses_1.game.GetLevel();
|
|
1485
|
+
const startingRoomIndex = level.GetStartingRoomIndex();
|
|
1486
|
+
(0, rooms_1.changeRoom)(startingRoomIndex);
|
|
1487
|
+
}
|
|
1488
|
+
exports.startingRoom = startingRoom;
|
|
1489
|
+
/** Warps to the first Super Secret Room on the floor. */
|
|
1490
|
+
function superSecretRoom() {
|
|
1491
|
+
(0, subroutines_1.warpToRoomType)(isaac_typescript_definitions_1.RoomType.SUPER_SECRET);
|
|
1492
|
+
}
|
|
1493
|
+
exports.superSecretRoom = superSecretRoom;
|
|
1494
|
+
/**
|
|
1495
|
+
* Toggles a set tear delay (e.g. fire rate) for the player. You can provide an optional argument to
|
|
1496
|
+
* this command in order to set the tear delay to a specific amount. Default is 1 (which is
|
|
1497
|
+
* equivalent to the Soy Milk tear rate).
|
|
1498
|
+
*/
|
|
1499
|
+
function tears(params) {
|
|
1500
|
+
if (params !== "") {
|
|
1501
|
+
const num = tonumber(params); // Can be a float.
|
|
1502
|
+
if (num === undefined) {
|
|
1503
|
+
print(`Invalid tear delay amount: ${params}`);
|
|
1504
|
+
return;
|
|
1505
|
+
}
|
|
1506
|
+
v_1.v.persistent.tearsAmount = num;
|
|
1507
|
+
}
|
|
1508
|
+
v_1.v.persistent.tears = !v_1.v.persistent.tears;
|
|
1509
|
+
const player = Isaac.GetPlayer();
|
|
1510
|
+
player.AddCacheFlags(isaac_typescript_definitions_1.CacheFlag.FIRE_DELAY);
|
|
1511
|
+
player.EvaluateItems();
|
|
1512
|
+
(0, console_1.printEnabled)(v_1.v.persistent.damage, "set tear delay");
|
|
1513
|
+
}
|
|
1514
|
+
exports.tears = tears;
|
|
1515
|
+
/** Alias for the "runTests" command. */
|
|
1516
|
+
function tests() {
|
|
1517
|
+
runTests();
|
|
1518
|
+
}
|
|
1519
|
+
exports.tests = tests;
|
|
1520
|
+
/** Creates a trapdoor next to the player. */
|
|
1521
|
+
function trapdoor() {
|
|
1522
|
+
(0, subroutines_1.spawnTrapdoorOrCrawlSpace)(true);
|
|
1523
|
+
}
|
|
1524
|
+
exports.trapdoor = trapdoor;
|
|
1525
|
+
/** Warps to the first Treasure Room on the floor. */
|
|
1526
|
+
function treasureRoom() {
|
|
1527
|
+
(0, subroutines_1.warpToRoomType)(isaac_typescript_definitions_1.RoomType.TREASURE);
|
|
1528
|
+
}
|
|
1529
|
+
exports.treasureRoom = treasureRoom;
|
|
1530
|
+
/** Alias for the "spawnTrinket" command. */
|
|
1531
|
+
function trinket(params) {
|
|
1532
|
+
spawnTrinket(params);
|
|
1533
|
+
}
|
|
1534
|
+
exports.trinket = trinket;
|
|
1535
|
+
/** Warps to the first Ultra Secret Room on the floor. */
|
|
1536
|
+
function ultraSecretRoom() {
|
|
1537
|
+
(0, subroutines_1.warpToRoomType)(isaac_typescript_definitions_1.RoomType.ULTRA_SECRET);
|
|
1538
|
+
}
|
|
1539
|
+
exports.ultraSecretRoom = ultraSecretRoom;
|
|
1540
|
+
/** Toggles permanent Curse of the Unknown. */
|
|
1541
|
+
function unknown() {
|
|
1542
|
+
v_1.v.persistent.unknown = !v_1.v.persistent.unknown;
|
|
1543
|
+
(0, console_1.printEnabled)(v_1.v.persistent.unknown, "permanent Curse of the Unknown");
|
|
1544
|
+
}
|
|
1545
|
+
exports.unknown = unknown;
|
|
1546
|
+
/** If currently on a set seed, changes to an unseeded state and restarts the game. */
|
|
1547
|
+
function unseed() {
|
|
1548
|
+
if (!(0, run_1.onSetSeed)()) {
|
|
1549
|
+
print("You are not on a set seed, so you cannot unseed the run.");
|
|
1550
|
+
return;
|
|
1551
|
+
}
|
|
1552
|
+
(0, run_1.setUnseeded)();
|
|
1553
|
+
(0, run_1.restart)();
|
|
1554
|
+
}
|
|
1555
|
+
exports.unseed = unseed;
|
|
1556
|
+
/** Moves the player 0.5 units up. Provide a number to move a custom amount of units. */
|
|
1557
|
+
function up(params) {
|
|
1558
|
+
(0, subroutines_1.movePlayer)(params, isaac_typescript_definitions_1.Direction.UP);
|
|
1559
|
+
}
|
|
1560
|
+
exports.up = up;
|
|
1561
|
+
/**
|
|
1562
|
+
* Warps to the specified room type. Accepts either the room type number or the partial name of the
|
|
1563
|
+
* room type.
|
|
1564
|
+
*
|
|
1565
|
+
* For example:
|
|
1566
|
+
* - warp 5 - Warps to the first Boss Room on the floor, if any.
|
|
1567
|
+
* - warp tr - Warps to the first Treasure Room on the floor, if any.
|
|
1568
|
+
*/
|
|
1569
|
+
function warp(params) {
|
|
1570
|
+
if (params === "") {
|
|
1571
|
+
print("You must specify a room type name or number.");
|
|
1572
|
+
return;
|
|
1573
|
+
}
|
|
1574
|
+
let roomType;
|
|
1575
|
+
const num = (0, types_1.parseIntSafe)(params);
|
|
1576
|
+
if (num === undefined) {
|
|
1577
|
+
const match = (0, string_1.getMapPartialMatch)(params, roomNameToTypeMap_1.ROOM_NAME_TO_TYPE_MAP);
|
|
1578
|
+
if (match === undefined) {
|
|
1579
|
+
print(`Unknown room type: ${params}`);
|
|
1580
|
+
return;
|
|
1581
|
+
}
|
|
1582
|
+
roomType = match[1];
|
|
1583
|
+
}
|
|
1584
|
+
else {
|
|
1585
|
+
if (!(0, enums_1.isEnumValue)(num, isaac_typescript_definitions_1.RoomType)) {
|
|
1586
|
+
print(`Invalid room type: ${num}`);
|
|
1587
|
+
return;
|
|
1588
|
+
}
|
|
1589
|
+
roomType = num;
|
|
1590
|
+
}
|
|
1591
|
+
(0, subroutines_1.warpToRoomType)(roomType);
|
|
1592
|
+
}
|
|
1593
|
+
exports.warp = warp;
|
|
1594
|
+
/** Alias for the "labyrinth" command. */
|
|
1595
|
+
function xl() {
|
|
1596
|
+
labyrinth();
|
|
1597
|
+
}
|
|
1598
|
+
exports.xl = xl;
|