idlerpg.sh 0.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/README.md +171 -0
- package/dist/affix/AffixRegistry.d.ts +68 -0
- package/dist/affix/AffixRegistry.d.ts.map +1 -0
- package/dist/affix/AffixRegistry.js +245 -0
- package/dist/affix/AffixRegistry.js.map +1 -0
- package/dist/affix/PluginLoader.d.ts +66 -0
- package/dist/affix/PluginLoader.d.ts.map +1 -0
- package/dist/affix/PluginLoader.js +321 -0
- package/dist/affix/PluginLoader.js.map +1 -0
- package/dist/affix/builtin.d.ts +6 -0
- package/dist/affix/builtin.d.ts.map +1 -0
- package/dist/affix/builtin.js +311 -0
- package/dist/affix/builtin.js.map +1 -0
- package/dist/affix/index.d.ts +8 -0
- package/dist/affix/index.d.ts.map +1 -0
- package/dist/affix/index.js +11 -0
- package/dist/affix/index.js.map +1 -0
- package/dist/affix/types.d.ts +152 -0
- package/dist/affix/types.d.ts.map +1 -0
- package/dist/affix/types.js +8 -0
- package/dist/affix/types.js.map +1 -0
- package/dist/ai/PlayKitClient.d.ts +208 -0
- package/dist/ai/PlayKitClient.d.ts.map +1 -0
- package/dist/ai/PlayKitClient.js +721 -0
- package/dist/ai/PlayKitClient.js.map +1 -0
- package/dist/ai/index.d.ts +5 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +8 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/app/App.d.ts +85 -0
- package/dist/app/App.d.ts.map +1 -0
- package/dist/app/App.js +296 -0
- package/dist/app/App.js.map +1 -0
- package/dist/app/EventBus.d.ts +222 -0
- package/dist/app/EventBus.d.ts.map +1 -0
- package/dist/app/EventBus.js +88 -0
- package/dist/app/EventBus.js.map +1 -0
- package/dist/app/Keybind.d.ts +83 -0
- package/dist/app/Keybind.d.ts.map +1 -0
- package/dist/app/Keybind.js +184 -0
- package/dist/app/Keybind.js.map +1 -0
- package/dist/app/Router.d.ts +123 -0
- package/dist/app/Router.d.ts.map +1 -0
- package/dist/app/Router.js +142 -0
- package/dist/app/Router.js.map +1 -0
- package/dist/app/ScreenManager.d.ts +97 -0
- package/dist/app/ScreenManager.d.ts.map +1 -0
- package/dist/app/ScreenManager.js +216 -0
- package/dist/app/ScreenManager.js.map +1 -0
- package/dist/app/index.d.ts +14 -0
- package/dist/app/index.d.ts.map +1 -0
- package/dist/app/index.js +19 -0
- package/dist/app/index.js.map +1 -0
- package/dist/app/screens/BaseScreen.d.ts +101 -0
- package/dist/app/screens/BaseScreen.d.ts.map +1 -0
- package/dist/app/screens/BaseScreen.js +132 -0
- package/dist/app/screens/BaseScreen.js.map +1 -0
- package/dist/app/screens/CharacterCreationScreen.d.ts +42 -0
- package/dist/app/screens/CharacterCreationScreen.d.ts.map +1 -0
- package/dist/app/screens/CharacterCreationScreen.js +467 -0
- package/dist/app/screens/CharacterCreationScreen.js.map +1 -0
- package/dist/app/screens/CombatScreen.d.ts +30 -0
- package/dist/app/screens/CombatScreen.d.ts.map +1 -0
- package/dist/app/screens/CombatScreen.js +309 -0
- package/dist/app/screens/CombatScreen.js.map +1 -0
- package/dist/app/screens/DialogScreen.d.ts +29 -0
- package/dist/app/screens/DialogScreen.d.ts.map +1 -0
- package/dist/app/screens/DialogScreen.js +295 -0
- package/dist/app/screens/DialogScreen.js.map +1 -0
- package/dist/app/screens/ExploreScreen.d.ts +50 -0
- package/dist/app/screens/ExploreScreen.d.ts.map +1 -0
- package/dist/app/screens/ExploreScreen.js +308 -0
- package/dist/app/screens/ExploreScreen.js.map +1 -0
- package/dist/app/screens/HelpScreen.d.ts +12 -0
- package/dist/app/screens/HelpScreen.d.ts.map +1 -0
- package/dist/app/screens/HelpScreen.js +155 -0
- package/dist/app/screens/HelpScreen.js.map +1 -0
- package/dist/app/screens/InventoryScreen.d.ts +27 -0
- package/dist/app/screens/InventoryScreen.d.ts.map +1 -0
- package/dist/app/screens/InventoryScreen.js +326 -0
- package/dist/app/screens/InventoryScreen.js.map +1 -0
- package/dist/app/screens/PrologueScreen.d.ts +24 -0
- package/dist/app/screens/PrologueScreen.d.ts.map +1 -0
- package/dist/app/screens/PrologueScreen.js +176 -0
- package/dist/app/screens/PrologueScreen.js.map +1 -0
- package/dist/app/screens/TitleScreen.d.ts +42 -0
- package/dist/app/screens/TitleScreen.d.ts.map +1 -0
- package/dist/app/screens/TitleScreen.js +380 -0
- package/dist/app/screens/TitleScreen.js.map +1 -0
- package/dist/app/screens/TravelScreen.d.ts +22 -0
- package/dist/app/screens/TravelScreen.d.ts.map +1 -0
- package/dist/app/screens/TravelScreen.js +122 -0
- package/dist/app/screens/TravelScreen.js.map +1 -0
- package/dist/app/screens/index.d.ts +14 -0
- package/dist/app/screens/index.d.ts.map +1 -0
- package/dist/app/screens/index.js +17 -0
- package/dist/app/screens/index.js.map +1 -0
- package/dist/commands/CommandRegistry.d.ts +91 -0
- package/dist/commands/CommandRegistry.d.ts.map +1 -0
- package/dist/commands/CommandRegistry.js +159 -0
- package/dist/commands/CommandRegistry.js.map +1 -0
- package/dist/commands/index.d.ts +7 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +10 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/core/Actor.d.ts +103 -0
- package/dist/core/Actor.d.ts.map +1 -0
- package/dist/core/Actor.js +409 -0
- package/dist/core/Actor.js.map +1 -0
- package/dist/core/Combat.d.ts +37 -0
- package/dist/core/Combat.d.ts.map +1 -0
- package/dist/core/Combat.js +294 -0
- package/dist/core/Combat.js.map +1 -0
- package/dist/core/DungeonRunner.d.ts +169 -0
- package/dist/core/DungeonRunner.d.ts.map +1 -0
- package/dist/core/DungeonRunner.js +627 -0
- package/dist/core/DungeonRunner.js.map +1 -0
- package/dist/core/Game.d.ts +133 -0
- package/dist/core/Game.d.ts.map +1 -0
- package/dist/core/Game.js +644 -0
- package/dist/core/Game.js.map +1 -0
- package/dist/core/IdleCombat.d.ts +61 -0
- package/dist/core/IdleCombat.d.ts.map +1 -0
- package/dist/core/IdleCombat.js +461 -0
- package/dist/core/IdleCombat.js.map +1 -0
- package/dist/core/IdleGameManager.d.ts +198 -0
- package/dist/core/IdleGameManager.d.ts.map +1 -0
- package/dist/core/IdleGameManager.js +688 -0
- package/dist/core/IdleGameManager.js.map +1 -0
- package/dist/core/IdleSaveManager.d.ts +109 -0
- package/dist/core/IdleSaveManager.d.ts.map +1 -0
- package/dist/core/IdleSaveManager.js +296 -0
- package/dist/core/IdleSaveManager.js.map +1 -0
- package/dist/core/NewGameFlowManager.d.ts +64 -0
- package/dist/core/NewGameFlowManager.d.ts.map +1 -0
- package/dist/core/NewGameFlowManager.js +153 -0
- package/dist/core/NewGameFlowManager.js.map +1 -0
- package/dist/core/Player.d.ts +65 -0
- package/dist/core/Player.d.ts.map +1 -0
- package/dist/core/Player.js +261 -0
- package/dist/core/Player.js.map +1 -0
- package/dist/core/RoomHandlers.d.ts +75 -0
- package/dist/core/RoomHandlers.d.ts.map +1 -0
- package/dist/core/RoomHandlers.js +383 -0
- package/dist/core/RoomHandlers.js.map +1 -0
- package/dist/core/SaveManager.d.ts +84 -0
- package/dist/core/SaveManager.d.ts.map +1 -0
- package/dist/core/SaveManager.js +281 -0
- package/dist/core/SaveManager.js.map +1 -0
- package/dist/core/SaveMigration.d.ts +69 -0
- package/dist/core/SaveMigration.d.ts.map +1 -0
- package/dist/core/SaveMigration.js +408 -0
- package/dist/core/SaveMigration.js.map +1 -0
- package/dist/core/StateAdapter.d.ts +79 -0
- package/dist/core/StateAdapter.d.ts.map +1 -0
- package/dist/core/StateAdapter.js +397 -0
- package/dist/core/StateAdapter.js.map +1 -0
- package/dist/core/Team.d.ts +145 -0
- package/dist/core/Team.d.ts.map +1 -0
- package/dist/core/Team.js +371 -0
- package/dist/core/Team.js.map +1 -0
- package/dist/core/TeamCombat.d.ts +88 -0
- package/dist/core/TeamCombat.d.ts.map +1 -0
- package/dist/core/TeamCombat.js +405 -0
- package/dist/core/TeamCombat.js.map +1 -0
- package/dist/core/TeamDungeonRunner.d.ts +186 -0
- package/dist/core/TeamDungeonRunner.d.ts.map +1 -0
- package/dist/core/TeamDungeonRunner.js +758 -0
- package/dist/core/TeamDungeonRunner.js.map +1 -0
- package/dist/core/TimeManager.d.ts +114 -0
- package/dist/core/TimeManager.d.ts.map +1 -0
- package/dist/core/TimeManager.js +318 -0
- package/dist/core/TimeManager.js.map +1 -0
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +12 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/timeConstants.d.ts +135 -0
- package/dist/core/timeConstants.d.ts.map +1 -0
- package/dist/core/timeConstants.js +157 -0
- package/dist/core/timeConstants.js.map +1 -0
- package/dist/core/types.d.ts +780 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +16 -0
- package/dist/core/types.js.map +1 -0
- package/dist/data/continents/index.d.ts +163 -0
- package/dist/data/continents/index.d.ts.map +1 -0
- package/dist/data/continents/index.js +31 -0
- package/dist/data/continents/index.js.map +1 -0
- package/dist/data/continents/verdantia.d.ts +294 -0
- package/dist/data/continents/verdantia.d.ts.map +1 -0
- package/dist/data/continents/verdantia.js +327 -0
- package/dist/data/continents/verdantia.js.map +1 -0
- package/dist/handlers/DialogHandler.d.ts +95 -0
- package/dist/handlers/DialogHandler.d.ts.map +1 -0
- package/dist/handlers/DialogHandler.js +450 -0
- package/dist/handlers/DialogHandler.js.map +1 -0
- package/dist/handlers/SaveLoadHandler.d.ts +60 -0
- package/dist/handlers/SaveLoadHandler.d.ts.map +1 -0
- package/dist/handlers/SaveLoadHandler.js +187 -0
- package/dist/handlers/SaveLoadHandler.js.map +1 -0
- package/dist/handlers/TitleScreenHandler.d.ts +43 -0
- package/dist/handlers/TitleScreenHandler.d.ts.map +1 -0
- package/dist/handlers/TitleScreenHandler.js +508 -0
- package/dist/handlers/TitleScreenHandler.js.map +1 -0
- package/dist/handlers/WorkshopHandler.d.ts +75 -0
- package/dist/handlers/WorkshopHandler.d.ts.map +1 -0
- package/dist/handlers/WorkshopHandler.js +401 -0
- package/dist/handlers/WorkshopHandler.js.map +1 -0
- package/dist/handlers/index.d.ts +12 -0
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +14 -0
- package/dist/handlers/index.js.map +1 -0
- package/dist/handlers/types.d.ts +34 -0
- package/dist/handlers/types.d.ts.map +1 -0
- package/dist/handlers/types.js +8 -0
- package/dist/handlers/types.js.map +1 -0
- package/dist/i18n/en.d.ts +3 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +130 -0
- package/dist/i18n/en.js.map +1 -0
- package/dist/i18n/index.d.ts +40 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +105 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/types.d.ts +133 -0
- package/dist/i18n/types.d.ts.map +1 -0
- package/dist/i18n/types.js +8 -0
- package/dist/i18n/types.js.map +1 -0
- package/dist/i18n/zh.d.ts +3 -0
- package/dist/i18n/zh.d.ts.map +1 -0
- package/dist/i18n/zh.js +130 -0
- package/dist/i18n/zh.js.map +1 -0
- package/dist/instrument.d.ts +8 -0
- package/dist/instrument.d.ts.map +1 -0
- package/dist/instrument.js +33 -0
- package/dist/instrument.js.map +1 -0
- package/dist/main-new.d.ts +12 -0
- package/dist/main-new.d.ts.map +1 -0
- package/dist/main-new.js +32 -0
- package/dist/main-new.js.map +1 -0
- package/dist/main.d.ts +7 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +2816 -0
- package/dist/main.js.map +1 -0
- package/dist/map/ContinentManager.d.ts +88 -0
- package/dist/map/ContinentManager.d.ts.map +1 -0
- package/dist/map/ContinentManager.js +241 -0
- package/dist/map/ContinentManager.js.map +1 -0
- package/dist/map/DungeonGenerator.d.ts +32 -0
- package/dist/map/DungeonGenerator.d.ts.map +1 -0
- package/dist/map/DungeonGenerator.js +615 -0
- package/dist/map/DungeonGenerator.js.map +1 -0
- package/dist/map/MapGenerator.d.ts +27 -0
- package/dist/map/MapGenerator.d.ts.map +1 -0
- package/dist/map/MapGenerator.js +485 -0
- package/dist/map/MapGenerator.js.map +1 -0
- package/dist/map/index.d.ts +5 -0
- package/dist/map/index.d.ts.map +1 -0
- package/dist/map/index.js +8 -0
- package/dist/map/index.js.map +1 -0
- package/dist/npc/NPCGenerator.d.ts +68 -0
- package/dist/npc/NPCGenerator.d.ts.map +1 -0
- package/dist/npc/NPCGenerator.js +468 -0
- package/dist/npc/NPCGenerator.js.map +1 -0
- package/dist/npc/NPCManager.d.ts +86 -0
- package/dist/npc/NPCManager.d.ts.map +1 -0
- package/dist/npc/NPCManager.js +217 -0
- package/dist/npc/NPCManager.js.map +1 -0
- package/dist/npc/fixedNPCs.d.ts +7 -0
- package/dist/npc/fixedNPCs.d.ts.map +1 -0
- package/dist/npc/fixedNPCs.js +196 -0
- package/dist/npc/fixedNPCs.js.map +1 -0
- package/dist/npc/index.d.ts +9 -0
- package/dist/npc/index.d.ts.map +1 -0
- package/dist/npc/index.js +12 -0
- package/dist/npc/index.js.map +1 -0
- package/dist/npc/traits.d.ts +33 -0
- package/dist/npc/traits.d.ts.map +1 -0
- package/dist/npc/traits.js +795 -0
- package/dist/npc/traits.js.map +1 -0
- package/dist/npc/types.d.ts +193 -0
- package/dist/npc/types.d.ts.map +1 -0
- package/dist/npc/types.js +9 -0
- package/dist/npc/types.js.map +1 -0
- package/dist/quest/QuestManager.d.ts +79 -0
- package/dist/quest/QuestManager.d.ts.map +1 -0
- package/dist/quest/QuestManager.js +273 -0
- package/dist/quest/QuestManager.js.map +1 -0
- package/dist/quest/index.d.ts +6 -0
- package/dist/quest/index.d.ts.map +1 -0
- package/dist/quest/index.js +9 -0
- package/dist/quest/index.js.map +1 -0
- package/dist/quest/types.d.ts +81 -0
- package/dist/quest/types.d.ts.map +1 -0
- package/dist/quest/types.js +8 -0
- package/dist/quest/types.js.map +1 -0
- package/dist/strategy/StrategyExecutor.d.ts +159 -0
- package/dist/strategy/StrategyExecutor.d.ts.map +1 -0
- package/dist/strategy/StrategyExecutor.js +479 -0
- package/dist/strategy/StrategyExecutor.js.map +1 -0
- package/dist/strategy/StrategyParser.d.ts +48 -0
- package/dist/strategy/StrategyParser.d.ts.map +1 -0
- package/dist/strategy/StrategyParser.js +321 -0
- package/dist/strategy/StrategyParser.js.map +1 -0
- package/dist/strategy/defaultStrategy.d.ts +40 -0
- package/dist/strategy/defaultStrategy.d.ts.map +1 -0
- package/dist/strategy/defaultStrategy.js +254 -0
- package/dist/strategy/defaultStrategy.js.map +1 -0
- package/dist/strategy/index.d.ts +8 -0
- package/dist/strategy/index.d.ts.map +1 -0
- package/dist/strategy/index.js +14 -0
- package/dist/strategy/index.js.map +1 -0
- package/dist/tui/ExploreMenu.d.ts +106 -0
- package/dist/tui/ExploreMenu.d.ts.map +1 -0
- package/dist/tui/ExploreMenu.js +282 -0
- package/dist/tui/ExploreMenu.js.map +1 -0
- package/dist/tui/GameUI.d.ts +313 -0
- package/dist/tui/GameUI.d.ts.map +1 -0
- package/dist/tui/GameUI.js +2116 -0
- package/dist/tui/GameUI.js.map +1 -0
- package/dist/tui/GameUIAdapter.d.ts +207 -0
- package/dist/tui/GameUIAdapter.d.ts.map +1 -0
- package/dist/tui/GameUIAdapter.js +1342 -0
- package/dist/tui/GameUIAdapter.js.map +1 -0
- package/dist/tui/Input.d.ts +139 -0
- package/dist/tui/Input.d.ts.map +1 -0
- package/dist/tui/Input.js +278 -0
- package/dist/tui/Input.js.map +1 -0
- package/dist/tui/Menu.d.ts +110 -0
- package/dist/tui/Menu.d.ts.map +1 -0
- package/dist/tui/Menu.js +365 -0
- package/dist/tui/Menu.js.map +1 -0
- package/dist/tui/Screen.d.ts +228 -0
- package/dist/tui/Screen.d.ts.map +1 -0
- package/dist/tui/Screen.js +502 -0
- package/dist/tui/Screen.js.map +1 -0
- package/dist/tui/components/Box.d.ts +36 -0
- package/dist/tui/components/Box.d.ts.map +1 -0
- package/dist/tui/components/Box.js +43 -0
- package/dist/tui/components/Box.js.map +1 -0
- package/dist/tui/components/List.d.ts +69 -0
- package/dist/tui/components/List.d.ts.map +1 -0
- package/dist/tui/components/List.js +136 -0
- package/dist/tui/components/List.js.map +1 -0
- package/dist/tui/components/ProgressBar.d.ts +42 -0
- package/dist/tui/components/ProgressBar.d.ts.map +1 -0
- package/dist/tui/components/ProgressBar.js +75 -0
- package/dist/tui/components/ProgressBar.js.map +1 -0
- package/dist/tui/components/index.d.ts +8 -0
- package/dist/tui/components/index.d.ts.map +1 -0
- package/dist/tui/components/index.js +11 -0
- package/dist/tui/components/index.js.map +1 -0
- package/dist/tui/core/BaseSection.d.ts +98 -0
- package/dist/tui/core/BaseSection.d.ts.map +1 -0
- package/dist/tui/core/BaseSection.js +174 -0
- package/dist/tui/core/BaseSection.js.map +1 -0
- package/dist/tui/core/Component.d.ts +61 -0
- package/dist/tui/core/Component.d.ts.map +1 -0
- package/dist/tui/core/Component.js +32 -0
- package/dist/tui/core/Component.js.map +1 -0
- package/dist/tui/core/Section.d.ts +101 -0
- package/dist/tui/core/Section.d.ts.map +1 -0
- package/dist/tui/core/Section.js +24 -0
- package/dist/tui/core/Section.js.map +1 -0
- package/dist/tui/core/SectionManager.d.ts +108 -0
- package/dist/tui/core/SectionManager.d.ts.map +1 -0
- package/dist/tui/core/SectionManager.js +258 -0
- package/dist/tui/core/SectionManager.js.map +1 -0
- package/dist/tui/core/index.d.ts +9 -0
- package/dist/tui/core/index.d.ts.map +1 -0
- package/dist/tui/core/index.js +12 -0
- package/dist/tui/core/index.js.map +1 -0
- package/dist/tui/index.d.ts +15 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +23 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/screens/BaseScreen.d.ts +62 -0
- package/dist/tui/screens/BaseScreen.d.ts.map +1 -0
- package/dist/tui/screens/BaseScreen.js +55 -0
- package/dist/tui/screens/BaseScreen.js.map +1 -0
- package/dist/tui/screens/CombatScreen.d.ts +43 -0
- package/dist/tui/screens/CombatScreen.d.ts.map +1 -0
- package/dist/tui/screens/CombatScreen.js +125 -0
- package/dist/tui/screens/CombatScreen.js.map +1 -0
- package/dist/tui/screens/DialogScreen.d.ts +53 -0
- package/dist/tui/screens/DialogScreen.d.ts.map +1 -0
- package/dist/tui/screens/DialogScreen.js +90 -0
- package/dist/tui/screens/DialogScreen.js.map +1 -0
- package/dist/tui/screens/DungeonScreen.d.ts +80 -0
- package/dist/tui/screens/DungeonScreen.d.ts.map +1 -0
- package/dist/tui/screens/DungeonScreen.js +317 -0
- package/dist/tui/screens/DungeonScreen.js.map +1 -0
- package/dist/tui/screens/ExploreScreen.d.ts +69 -0
- package/dist/tui/screens/ExploreScreen.d.ts.map +1 -0
- package/dist/tui/screens/ExploreScreen.js +224 -0
- package/dist/tui/screens/ExploreScreen.js.map +1 -0
- package/dist/tui/screens/SectionScreen.d.ts +84 -0
- package/dist/tui/screens/SectionScreen.d.ts.map +1 -0
- package/dist/tui/screens/SectionScreen.js +156 -0
- package/dist/tui/screens/SectionScreen.js.map +1 -0
- package/dist/tui/screens/TitleScreen.d.ts +40 -0
- package/dist/tui/screens/TitleScreen.d.ts.map +1 -0
- package/dist/tui/screens/TitleScreen.js +253 -0
- package/dist/tui/screens/TitleScreen.js.map +1 -0
- package/dist/tui/screens/TownScreen.d.ts +98 -0
- package/dist/tui/screens/TownScreen.d.ts.map +1 -0
- package/dist/tui/screens/TownScreen.js +370 -0
- package/dist/tui/screens/TownScreen.js.map +1 -0
- package/dist/tui/screens/TravelScreen.d.ts +67 -0
- package/dist/tui/screens/TravelScreen.d.ts.map +1 -0
- package/dist/tui/screens/TravelScreen.js +286 -0
- package/dist/tui/screens/TravelScreen.js.map +1 -0
- package/dist/tui/screens/index.d.ts +8 -0
- package/dist/tui/screens/index.d.ts.map +1 -0
- package/dist/tui/screens/index.js +17 -0
- package/dist/tui/screens/index.js.map +1 -0
- package/dist/tui/sections/ActionsSection.d.ts +71 -0
- package/dist/tui/sections/ActionsSection.d.ts.map +1 -0
- package/dist/tui/sections/ActionsSection.js +184 -0
- package/dist/tui/sections/ActionsSection.js.map +1 -0
- package/dist/tui/sections/DungeonSection.d.ts +65 -0
- package/dist/tui/sections/DungeonSection.d.ts.map +1 -0
- package/dist/tui/sections/DungeonSection.js +144 -0
- package/dist/tui/sections/DungeonSection.js.map +1 -0
- package/dist/tui/sections/EventsSection.d.ts +50 -0
- package/dist/tui/sections/EventsSection.d.ts.map +1 -0
- package/dist/tui/sections/EventsSection.js +134 -0
- package/dist/tui/sections/EventsSection.js.map +1 -0
- package/dist/tui/sections/MapSection.d.ts +66 -0
- package/dist/tui/sections/MapSection.d.ts.map +1 -0
- package/dist/tui/sections/MapSection.js +669 -0
- package/dist/tui/sections/MapSection.js.map +1 -0
- package/dist/tui/sections/StatusSection.d.ts +47 -0
- package/dist/tui/sections/StatusSection.d.ts.map +1 -0
- package/dist/tui/sections/StatusSection.js +133 -0
- package/dist/tui/sections/StatusSection.js.map +1 -0
- package/dist/tui/sections/TeamSection.d.ts +71 -0
- package/dist/tui/sections/TeamSection.d.ts.map +1 -0
- package/dist/tui/sections/TeamSection.js +224 -0
- package/dist/tui/sections/TeamSection.js.map +1 -0
- package/dist/tui/sections/TravelingSection.d.ts +51 -0
- package/dist/tui/sections/TravelingSection.d.ts.map +1 -0
- package/dist/tui/sections/TravelingSection.js +106 -0
- package/dist/tui/sections/TravelingSection.js.map +1 -0
- package/dist/tui/sections/index.d.ts +9 -0
- package/dist/tui/sections/index.d.ts.map +1 -0
- package/dist/tui/sections/index.js +12 -0
- package/dist/tui/sections/index.js.map +1 -0
- package/dist/ui/Terminal.d.ts +68 -0
- package/dist/ui/Terminal.d.ts.map +1 -0
- package/dist/ui/Terminal.js +297 -0
- package/dist/ui/Terminal.js.map +1 -0
- package/dist/ui/index.d.ts +5 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +8 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/utils/configMigration.d.ts +14 -0
- package/dist/utils/configMigration.d.ts.map +1 -0
- package/dist/utils/configMigration.js +92 -0
- package/dist/utils/configMigration.js.map +1 -0
- package/dist/utils/errorHandler.d.ts +86 -0
- package/dist/utils/errorHandler.d.ts.map +1 -0
- package/dist/utils/errorHandler.js +224 -0
- package/dist/utils/errorHandler.js.map +1 -0
- package/dist/utils/logger.d.ts +14 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +43 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/weapon/WeaponFactory.d.ts +32 -0
- package/dist/weapon/WeaponFactory.d.ts.map +1 -0
- package/dist/weapon/WeaponFactory.js +216 -0
- package/dist/weapon/WeaponFactory.js.map +1 -0
- package/dist/weapon/index.d.ts +5 -0
- package/dist/weapon/index.d.ts.map +1 -0
- package/dist/weapon/index.js +8 -0
- package/dist/weapon/index.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapSection.js","sources":["tui/sections/MapSection.ts"],"sourceRoot":"/","sourcesContent":["/**\r\n * Map Section - Visual map with two rendering modes:\r\n * 1. Dungeon: Tile-based grid (classic roguelike style)\r\n * 2. Town: Node-link diagram with box-drawing characters\r\n */\r\n\r\nimport { BaseSection, type BaseSectionConfig } from '../core/BaseSection.js';\r\nimport type { RenderContext } from '../core/Component.js';\r\nimport type { KeyEvent } from '../Input.js';\r\nimport { ANSI } from '../Screen.js';\r\nimport type { GameState, Room, RoomType } from '../../core/types.js';\r\n\r\n// Box-drawing characters for town map\r\nconst BOX = {\r\n H: '─', // horizontal\r\n V: '│', // vertical\r\n TL: '┌', // top-left\r\n TR: '┐', // top-right\r\n BL: '└', // bottom-left\r\n BR: '┘', // bottom-right\r\n T: '┬', // T down\r\n B: '┴', // T up\r\n L: '├', // T right\r\n R: '┤', // T left\r\n X: '┼', // cross\r\n};\r\n\r\n// Dungeon tile characters\r\nconst TILES = {\r\n WALL: '#',\r\n FLOOR: '.',\r\n PLAYER: '@',\r\n DOOR: '+',\r\n CORRIDOR: '·',\r\n UNKNOWN: ' ',\r\n ENEMY: '!',\r\n TREASURE: '$',\r\n STAIRS: '>',\r\n BOSS: 'B',\r\n};\r\n\r\n/**\r\n * Map rendering mode\r\n */\r\ntype MapMode = 'dungeon' | 'town';\r\n\r\n/**\r\n * Map Section - Shows current location and connected rooms\r\n */\r\nexport class MapSection extends BaseSection {\r\n private state_data: GameState | null = null;\r\n private onTravel?: (roomIndex: number) => void;\r\n\r\n // Travel state for showing player movement on map\r\n private travelState: {\r\n fromRoomId: string;\r\n toRoomId: string;\r\n progress: number;\r\n } | null = null;\r\n\r\n // Zoom and pan state - using data-centric approach like mapscii\r\n private zoom: number = 1.0;\r\n // Center in data coordinates (room position space)\r\n // Use null to indicate uninitialized state\r\n private centerX: number | null = null;\r\n private centerY: number | null = null;\r\n private readonly MIN_ZOOM = 0.5;\r\n private readonly MAX_ZOOM = 2.5;\r\n private readonly ZOOM_STEP = 0.25;\r\n // Pan step is in data coordinates, scaled by zoom\r\n private readonly BASE_PAN_STEP = 0.5;\r\n\r\n constructor() {\r\n const config: BaseSectionConfig = {\r\n id: 'map',\r\n title: 'Map',\r\n canEnter: true,\r\n hints: {\r\n focused: '+/-: zoom WASD: pan R: reset Enter: select destination',\r\n entered: '↑↓: select room Enter: travel R: reset view Esc: back',\r\n },\r\n };\r\n super(config);\r\n }\r\n\r\n setOnTravel(callback: (roomIndex: number) => void): void {\r\n this.onTravel = callback;\r\n }\r\n\r\n update(state: GameState): void {\r\n this.state_data = state;\r\n }\r\n\r\n /**\r\n * Set travel state for showing player movement on map\r\n */\r\n setTravelState(state: { fromRoomId: string; toRoomId: string; progress: number } | null): void {\r\n this.travelState = state;\r\n }\r\n\r\n /**\r\n * Get map rendering mode from GameMap type\r\n */\r\n private getMapMode(): MapMode {\r\n if (!this.state_data) return 'town';\r\n return this.state_data.currentMap.type;\r\n }\r\n\r\n protected renderContent(ctx: RenderContext): void {\r\n if (!this.state_data) return;\r\n\r\n const mode = this.getMapMode();\r\n\r\n if (mode === 'dungeon') {\r\n this.renderDungeonMap(ctx);\r\n } else {\r\n this.renderTownMap(ctx);\r\n }\r\n }\r\n\r\n // ===========================================================================\r\n // DUNGEON MAP - Box-based rooms (clearer visualization)\r\n // ===========================================================================\r\n\r\n private renderDungeonMap(ctx: RenderContext): void {\r\n const { screen, bounds } = ctx;\r\n const { x, y, width, height } = bounds;\r\n\r\n const mapX = x + 1;\r\n const mapY = y + 1;\r\n const mapWidth = width - 2;\r\n const mapHeight = height - 3;\r\n\r\n const rooms = Array.from(this.state_data!.currentMap.rooms.values());\r\n const currentRoom = this.state_data!.currentRoom;\r\n const connections = currentRoom.connections;\r\n\r\n // Calculate room bounds for positioning\r\n const gridBounds = this.calculateRoomBounds(rooms);\r\n\r\n // Box dimensions for dungeon rooms (smaller than town)\r\n const boxWidth = 8;\r\n const boxHeight = 3;\r\n const hSpacing = 10; // horizontal spacing between room centers\r\n const vSpacing = 5; // vertical spacing between room centers\r\n\r\n // Initialize center to player position if not set\r\n if (this.centerX === null || this.centerY === null) {\r\n this.centerX = currentRoom.position.x;\r\n this.centerY = currentRoom.position.y;\r\n }\r\n\r\n // Apply zoom\r\n const scale = this.zoom;\r\n const scaledHSpacing = Math.round(hSpacing * scale);\r\n const scaledVSpacing = Math.round(vSpacing * scale);\r\n\r\n // Calculate the center of the map area\r\n const mapCenterX = mapX + Math.floor(mapWidth / 2);\r\n const mapCenterY = mapY + Math.floor(mapHeight / 2);\r\n\r\n // Function to convert room position to screen position\r\n const roomToScreen = (room: Room): { x: number; y: number } => {\r\n const offsetX = (room.position.x - this.centerX!) * scaledHSpacing;\r\n const offsetY = (room.position.y - this.centerY!) * scaledVSpacing;\r\n return {\r\n x: mapCenterX + offsetX,\r\n y: mapCenterY + offsetY,\r\n };\r\n };\r\n\r\n // First pass: draw connections\r\n for (const room of rooms) {\r\n const pos = roomToScreen(room);\r\n\r\n for (const connId of room.connections) {\r\n const connRoom = this.state_data!.currentMap.rooms.get(connId);\r\n if (!connRoom) continue;\r\n\r\n const connPos = roomToScreen(connRoom);\r\n\r\n // Only draw if target is to the right or below (avoid double-drawing)\r\n if (connPos.x < pos.x || (connPos.x === pos.x && connPos.y < pos.y)) continue;\r\n\r\n // Draw connection line\r\n const startX = pos.x + Math.floor(boxWidth / 2);\r\n const startY = pos.y + 1;\r\n const endX = connPos.x + Math.floor(boxWidth / 2);\r\n const endY = connPos.y + 1;\r\n\r\n // Simple L-shaped or straight connection\r\n if (startY === endY) {\r\n // Horizontal connection\r\n for (let cx = Math.min(startX, endX) + 1; cx < Math.max(startX, endX); cx++) {\r\n if (cx >= mapX && cx < mapX + mapWidth && startY >= mapY && startY < mapY + mapHeight) {\r\n screen.write(cx, startY, '-', ANSI.fg.gray);\r\n }\r\n }\r\n } else if (startX === endX) {\r\n // Vertical connection\r\n for (let cy = Math.min(startY, endY) + 1; cy < Math.max(startY, endY); cy++) {\r\n if (startX >= mapX && startX < mapX + mapWidth && cy >= mapY && cy < mapY + mapHeight) {\r\n screen.write(startX, cy, '|', ANSI.fg.gray);\r\n }\r\n }\r\n } else {\r\n // L-shaped connection (horizontal first, then vertical)\r\n const midX = endX;\r\n // Horizontal segment\r\n for (let cx = Math.min(startX, midX) + 1; cx < Math.max(startX, midX); cx++) {\r\n if (cx >= mapX && cx < mapX + mapWidth && startY >= mapY && startY < mapY + mapHeight) {\r\n screen.write(cx, startY, '-', ANSI.fg.gray);\r\n }\r\n }\r\n // Vertical segment\r\n for (let cy = Math.min(startY, endY); cy <= Math.max(startY, endY); cy++) {\r\n if (midX >= mapX && midX < mapX + mapWidth && cy >= mapY && cy < mapY + mapHeight) {\r\n screen.write(midX, cy, '|', ANSI.fg.gray);\r\n }\r\n }\r\n // Corner\r\n if (midX >= mapX && midX < mapX + mapWidth && startY >= mapY && startY < mapY + mapHeight) {\r\n screen.write(midX, startY, '+', ANSI.fg.gray);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Second pass: draw room boxes\r\n for (const room of rooms) {\r\n const pos = roomToScreen(room);\r\n const boxX = pos.x;\r\n const boxY = pos.y;\r\n\r\n // Check if room box is within visible area\r\n if (boxX + boxWidth < mapX || boxX >= mapX + mapWidth ||\r\n boxY + boxHeight < mapY || boxY >= mapY + mapHeight) {\r\n continue;\r\n }\r\n\r\n const isCurrentRoom = room.id === currentRoom.id;\r\n const isConnected = connections.includes(room.id);\r\n const connIdx = isConnected ? connections.indexOf(room.id) : -1;\r\n const isSelected = this.state.entered && connIdx === this.state.selectedIndex;\r\n\r\n // Determine room color and symbol based on type\r\n let borderFg = ANSI.fg.gray;\r\n let contentFg = ANSI.fg.white;\r\n let icon = '?';\r\n\r\n if (room.type === 'combat') {\r\n borderFg = ANSI.fg.red;\r\n icon = '!';\r\n } else if (room.type === 'treasure') {\r\n borderFg = ANSI.fg.yellow;\r\n icon = '$';\r\n } else if (room.type === 'dungeon_entrance') {\r\n borderFg = ANSI.fg.cyan;\r\n icon = '>';\r\n } else if (room.type === 'rest') {\r\n borderFg = ANSI.fg.blue;\r\n icon = 'R';\r\n } else if (room.type === 'event') {\r\n borderFg = ANSI.fg.magenta;\r\n icon = '?';\r\n } else if (room.type === 'shop') {\r\n borderFg = ANSI.fg.green;\r\n icon = 'S';\r\n } else if (room.type === 'empty') {\r\n borderFg = ANSI.fg.gray;\r\n icon = '.';\r\n }\r\n\r\n if (isCurrentRoom) {\r\n borderFg = ANSI.fg.brightGreen;\r\n icon = '@';\r\n }\r\n\r\n if (isSelected) {\r\n borderFg = ANSI.fg.brightCyan;\r\n }\r\n\r\n // Draw room box (3 lines)\r\n const top = '+' + '-'.repeat(boxWidth - 2) + '+';\r\n const bottom = '+' + '-'.repeat(boxWidth - 2) + '+';\r\n\r\n // Room label: icon + short type\r\n let label = icon;\r\n if (isConnected && connIdx >= 0) {\r\n label = `${connIdx + 1}${icon}`;\r\n }\r\n const middle = '|' + label.padStart(Math.floor((boxWidth - 2 + label.length) / 2)).padEnd(boxWidth - 2) + '|';\r\n\r\n // Clip and draw each line\r\n for (let row = 0; row < boxHeight; row++) {\r\n const lineY = boxY + row;\r\n if (lineY < mapY || lineY >= mapY + mapHeight) continue;\r\n\r\n let line: string;\r\n if (row === 0) line = top;\r\n else if (row === boxHeight - 1) line = bottom;\r\n else line = middle;\r\n\r\n // Calculate visible portion\r\n const startCol = Math.max(0, mapX - boxX);\r\n const endCol = Math.min(boxWidth, mapX + mapWidth - boxX);\r\n\r\n if (startCol < endCol) {\r\n const visiblePart = line.slice(startCol, endCol);\r\n const drawX = Math.max(boxX, mapX);\r\n screen.write(drawX, lineY, visiblePart, borderFg);\r\n }\r\n }\r\n }\r\n\r\n // Legend at bottom\r\n const legendY = y + height - 2;\r\n screen.write(x + 2, legendY, '@:You !:Enemy $:Loot >:Exit R:Rest ?:Event', ANSI.fg.gray);\r\n }\r\n\r\n private drawCorridor(\r\n buffer: string[][],\r\n colorBuffer: Array<Array<{ fg: string; bg?: string }>>,\r\n x1: number, y1: number, x2: number, y2: number,\r\n gridWidth: number, gridHeight: number\r\n ): void {\r\n // Only draw if target is to the right or below (avoid double-drawing)\r\n if (x2 < x1 || (x2 === x1 && y2 < y1)) return;\r\n\r\n // Horizontal first, then vertical\r\n const midX = x2;\r\n const midY = y1;\r\n\r\n // Horizontal segment\r\n const hStart = Math.min(x1, midX);\r\n const hEnd = Math.max(x1, midX);\r\n for (let cx = hStart + 1; cx < hEnd; cx++) {\r\n if (cx >= 0 && cx < gridWidth && y1 >= 0 && y1 < gridHeight) {\r\n if (buffer[y1][cx] === TILES.UNKNOWN) {\r\n buffer[y1][cx] = TILES.CORRIDOR;\r\n colorBuffer[y1][cx] = { fg: ANSI.fg.gray };\r\n }\r\n }\r\n }\r\n\r\n // Vertical segment\r\n const vStart = Math.min(midY, y2);\r\n const vEnd = Math.max(midY, y2);\r\n for (let cy = vStart + 1; cy < vEnd; cy++) {\r\n if (midX >= 0 && midX < gridWidth && cy >= 0 && cy < gridHeight) {\r\n if (buffer[cy][midX] === TILES.UNKNOWN) {\r\n buffer[cy][midX] = TILES.CORRIDOR;\r\n colorBuffer[cy][midX] = { fg: ANSI.fg.gray };\r\n }\r\n }\r\n }\r\n }\r\n\r\n // ===========================================================================\r\n // TOWN MAP - Node-link diagram with box-drawing characters\r\n // ===========================================================================\r\n\r\n private renderTownMap(ctx: RenderContext): void {\r\n const { screen, bounds } = ctx;\r\n const { x, y, width, height } = bounds;\r\n\r\n // Viewport bounds (inside the box border)\r\n const mapX = x + 1;\r\n const mapY = y + 1;\r\n const mapWidth = width - 2;\r\n const mapHeight = height - 3;\r\n\r\n const rooms = Array.from(this.state_data!.currentMap.rooms.values());\r\n const currentRoom = this.state_data!.currentRoom;\r\n const connections = currentRoom.connections;\r\n\r\n // Calculate data bounds\r\n const roomBounds = this.calculateRoomBounds(rooms);\r\n\r\n // Initialize center to current room position if not set (first render or after reset)\r\n // This ensures the player's room is always visible initially\r\n if (this.centerX === null || this.centerY === null) {\r\n this.centerX = currentRoom.position.x;\r\n this.centerY = currentRoom.position.y;\r\n }\r\n\r\n // Node spacing in screen pixels - scales with zoom\r\n const baseNodeWidth = 12;\r\n const baseNodeHeight = 4;\r\n const nodeWidth = Math.round(baseNodeWidth * this.zoom);\r\n const nodeHeight = Math.round(baseNodeHeight * this.zoom);\r\n\r\n // Screen center coordinates\r\n const screenCenterX = mapX + Math.floor(mapWidth / 2);\r\n const screenCenterY = mapY + Math.floor(mapHeight / 2);\r\n\r\n // Helper to convert room data position to screen position\r\n // centerX and centerY are guaranteed to be initialized at this point\r\n const cx = this.centerX!;\r\n const cy = this.centerY!;\r\n const roomToScreen = (room: Room): { x: number; y: number } => {\r\n // Position relative to the view center, scaled by nodeWidth/Height\r\n const dx = (room.position.x - cx) * nodeWidth;\r\n const dy = (room.position.y - cy) * nodeHeight;\r\n return {\r\n x: Math.round(screenCenterX + dx),\r\n y: Math.round(screenCenterY + dy),\r\n };\r\n };\r\n\r\n // First pass: Draw connections with box-drawing characters\r\n for (const room of rooms) {\r\n const fromPos = roomToScreen(room);\r\n\r\n for (const connId of room.connections) {\r\n const connRoom = this.state_data!.currentMap.rooms.get(connId);\r\n if (!connRoom) continue;\r\n\r\n // Avoid double-drawing\r\n if (connRoom.position.x < room.position.x ||\r\n (connRoom.position.x === room.position.x && connRoom.position.y < room.position.y)) {\r\n continue;\r\n }\r\n\r\n const toPos = roomToScreen(connRoom);\r\n this.drawBoxConnection(screen, fromPos.x, fromPos.y, toPos.x, toPos.y, mapX, mapY, mapWidth, mapHeight);\r\n }\r\n }\r\n\r\n // Second pass: Draw room nodes\r\n for (const room of rooms) {\r\n const pos = roomToScreen(room);\r\n\r\n const isCurrentRoom = room.id === currentRoom.id;\r\n const isConnected = connections.includes(room.id);\r\n const connIdx = isConnected ? connections.indexOf(room.id) : -1;\r\n const isSelected = this.state.entered && connIdx === this.state.selectedIndex;\r\n\r\n // Determine style\r\n let fg = ANSI.fg.gray;\r\n let bg: string | undefined;\r\n let borderFg = ANSI.fg.gray;\r\n\r\n if (isCurrentRoom) {\r\n fg = ANSI.fg.brightGreen;\r\n borderFg = ANSI.fg.green;\r\n } else if (isSelected) {\r\n fg = ANSI.fg.black;\r\n bg = ANSI.bg.cyan;\r\n borderFg = ANSI.fg.cyan;\r\n } else if (isConnected) {\r\n fg = ANSI.fg.white;\r\n borderFg = ANSI.fg.white;\r\n }\r\n\r\n // Draw node box - size adapts slightly with zoom\r\n const boxWidth = Math.min(10, room.name.length + 2);\r\n const boxX = pos.x - Math.floor(boxWidth / 2);\r\n const boxY = pos.y - 1;\r\n\r\n // Check if any part of the box is visible (not just top-left corner)\r\n const boxVisible =\r\n boxX + boxWidth > mapX && boxX < mapX + mapWidth &&\r\n boxY + 2 >= mapY && boxY < mapY + mapHeight;\r\n\r\n if (!boxVisible) continue;\r\n\r\n // Top border - render if row is visible\r\n if (boxY >= mapY && boxY < mapY + mapHeight) {\r\n const top = BOX.TL + BOX.H.repeat(boxWidth - 2) + BOX.TR;\r\n const startX = Math.max(mapX, boxX);\r\n const endX = Math.min(mapX + mapWidth, boxX + boxWidth);\r\n if (startX < endX) {\r\n const sliceStart = startX - boxX;\r\n const sliceEnd = endX - boxX;\r\n screen.write(startX, boxY, top.slice(sliceStart, sliceEnd), borderFg);\r\n }\r\n }\r\n\r\n // Middle with name - render if row is visible\r\n if (pos.y >= mapY && pos.y < mapY + mapHeight) {\r\n const symbol = isCurrentRoom ? '@' : this.getRoomSymbol(room);\r\n const label = `${symbol}${room.name}`.slice(0, boxWidth - 2);\r\n const padded = label.padEnd(boxWidth - 2);\r\n\r\n // Draw left border if visible\r\n if (boxX >= mapX && boxX < mapX + mapWidth) {\r\n screen.write(boxX, pos.y, BOX.V, borderFg);\r\n }\r\n // Draw right border if visible\r\n if (boxX + boxWidth - 1 >= mapX && boxX + boxWidth - 1 < mapX + mapWidth) {\r\n screen.write(boxX + boxWidth - 1, pos.y, BOX.V, borderFg);\r\n }\r\n\r\n // Draw content\r\n const contentStartX = Math.max(mapX, boxX + 1);\r\n const contentEndX = Math.min(mapX + mapWidth, boxX + boxWidth - 1);\r\n if (contentStartX < contentEndX) {\r\n const sliceStart = contentStartX - (boxX + 1);\r\n const sliceEnd = contentEndX - (boxX + 1);\r\n screen.write(contentStartX, pos.y, padded.slice(sliceStart, sliceEnd), fg, bg);\r\n }\r\n }\r\n\r\n // Bottom border - render if row is visible\r\n if (boxY + 2 >= mapY && boxY + 2 < mapY + mapHeight) {\r\n const bottom = BOX.BL + BOX.H.repeat(boxWidth - 2) + BOX.BR;\r\n const startX = Math.max(mapX, boxX);\r\n const endX = Math.min(mapX + mapWidth, boxX + boxWidth);\r\n if (startX < endX) {\r\n const sliceStart = startX - boxX;\r\n const sliceEnd = endX - boxX;\r\n screen.write(startX, boxY + 2, bottom.slice(sliceStart, sliceEnd), borderFg);\r\n }\r\n }\r\n\r\n // Selection number\r\n if (isConnected && connIdx >= 0) {\r\n const numX = pos.x + Math.floor(boxWidth / 2);\r\n if (numX >= mapX && numX < mapX + mapWidth && pos.y >= mapY && pos.y < mapY + mapHeight) {\r\n screen.write(numX, pos.y, String(connIdx + 1), ANSI.fg.yellow);\r\n }\r\n }\r\n }\r\n\r\n // Render traveling player icon when in travel state\r\n if (this.travelState) {\r\n const fromRoom = this.state_data!.currentMap.rooms.get(this.travelState.fromRoomId);\r\n const toRoom = this.state_data!.currentMap.rooms.get(this.travelState.toRoomId);\r\n\r\n if (fromRoom && toRoom) {\r\n const fromPos = roomToScreen(fromRoom);\r\n const toPos = roomToScreen(toRoom);\r\n\r\n // Linear interpolation for current position\r\n const progress = this.travelState.progress;\r\n const currentX = Math.round(fromPos.x + (toPos.x - fromPos.x) * progress);\r\n const currentY = Math.round(fromPos.y + (toPos.y - fromPos.y) * progress);\r\n\r\n // Check if within visible bounds\r\n if (currentX >= mapX && currentX < mapX + mapWidth &&\r\n currentY >= mapY && currentY < mapY + mapHeight) {\r\n // Draw player icon with blinking effect\r\n const blink = Math.floor(Date.now() / 300) % 2 === 0;\r\n const icon = blink ? '*' : '@';\r\n screen.write(currentX, currentY, icon, ANSI.fg.brightYellow);\r\n }\r\n }\r\n }\r\n\r\n // Zoom and pan indicator - show in the map area, not the border\r\n const zoomText = `Zoom:${Math.round(this.zoom * 100)}%`;\r\n screen.write(mapX + 1, mapY, zoomText, ANSI.fg.gray);\r\n\r\n // Display selected/current room info in the bottom-right corner\r\n let selectedRoom: Room | null = null;\r\n if (this.state.entered && this.state.selectedIndex < connections.length) {\r\n // Show selected connected room when entered\r\n const selectedId = connections[this.state.selectedIndex];\r\n selectedRoom = this.state_data!.currentMap.rooms.get(selectedId) || null;\r\n } else {\r\n // Show current room when just focused\r\n selectedRoom = currentRoom;\r\n }\r\n\r\n if (selectedRoom) {\r\n const symbol = selectedRoom.id === currentRoom.id ? '@' : this.getRoomSymbol(selectedRoom);\r\n const roomInfo = `${symbol} ${selectedRoom.name} (${selectedRoom.type})`;\r\n const infoX = x + width - roomInfo.length - 2;\r\n const infoY = y + height - 2;\r\n const infoColor = selectedRoom.id === currentRoom.id ? ANSI.fg.brightGreen : ANSI.fg.cyan;\r\n screen.write(Math.max(x + 2, infoX), infoY, roomInfo.slice(0, width - 4), infoColor);\r\n }\r\n\r\n // Legend - left side\r\n const legendY = y + height - 1;\r\n screen.write(x + 2, legendY, `+/-:Zoom WASD:Pan R:Reset`, ANSI.fg.gray);\r\n }\r\n\r\n private drawBoxConnection(\r\n screen: import('../Screen.js').Screen,\r\n x1: number, y1: number, x2: number, y2: number,\r\n mapX: number, mapY: number, mapWidth: number, mapHeight: number\r\n ): void {\r\n // Orthogonal connection: horizontal then vertical\r\n const midX = x2;\r\n const midY = y1;\r\n\r\n // Horizontal segment\r\n const hStart = Math.min(x1, midX) + 1;\r\n const hEnd = Math.max(x1, midX);\r\n for (let cx = hStart; cx < hEnd; cx++) {\r\n if (this.isInBounds(cx, y1, mapX, mapY, mapWidth, mapHeight)) {\r\n screen.write(cx, y1, BOX.H, ANSI.fg.gray);\r\n }\r\n }\r\n\r\n // Corner\r\n if (y1 !== y2 && this.isInBounds(midX, midY, mapX, mapY, mapWidth, mapHeight)) {\r\n const corner = y2 > y1 ? (x2 > x1 ? BOX.TL : BOX.TR) : (x2 > x1 ? BOX.BL : BOX.BR);\r\n screen.write(midX, midY, corner, ANSI.fg.gray);\r\n }\r\n\r\n // Vertical segment\r\n const vStart = Math.min(midY, y2) + 1;\r\n const vEnd = Math.max(midY, y2);\r\n for (let cy = vStart; cy < vEnd; cy++) {\r\n if (this.isInBounds(midX, cy, mapX, mapY, mapWidth, mapHeight)) {\r\n screen.write(midX, cy, BOX.V, ANSI.fg.gray);\r\n }\r\n }\r\n }\r\n\r\n // ===========================================================================\r\n // COMMON HELPERS\r\n // ===========================================================================\r\n\r\n private calculateRoomBounds(rooms: Room[]): { minX: number; maxX: number; minY: number; maxY: number } {\r\n if (rooms.length === 0) {\r\n return { minX: 0, maxX: 0, minY: 0, maxY: 0 };\r\n }\r\n\r\n let minX = Infinity, maxX = -Infinity;\r\n let minY = Infinity, maxY = -Infinity;\r\n\r\n for (const room of rooms) {\r\n minX = Math.min(minX, room.position.x);\r\n maxX = Math.max(maxX, room.position.x);\r\n minY = Math.min(minY, room.position.y);\r\n maxY = Math.max(maxY, room.position.y);\r\n }\r\n\r\n return { minX, maxX, minY, maxY };\r\n }\r\n\r\n private isInBounds(px: number, py: number, mapX: number, mapY: number, mapWidth: number, mapHeight: number): boolean {\r\n return px >= mapX && px < mapX + mapWidth && py >= mapY && py < mapY + mapHeight;\r\n }\r\n\r\n private getRoomSymbol(room: Room): string {\r\n const symbols: Record<string, string> = {\r\n safe: '♦',\r\n shop: 'S',\r\n exit: '→',\r\n start: '○',\r\n enemy: '!',\r\n boss: 'B',\r\n treasure: '$',\r\n trap: '^',\r\n event: '?',\r\n empty: '·',\r\n };\r\n return symbols[room.type] || '·';\r\n }\r\n\r\n getItemCount(): number {\r\n return this.state_data?.currentRoom.connections.length || 0;\r\n }\r\n\r\n activateItem(): boolean {\r\n if (!this.state_data) return false;\r\n\r\n const connections = this.state_data.currentRoom.connections;\r\n if (this.state.selectedIndex < connections.length) {\r\n this.onTravel?.(this.state.selectedIndex);\r\n this.exit();\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n protected getMaxVisibleItems(): number {\r\n return this.state_data?.currentRoom.connections.length || 0;\r\n }\r\n\r\n /**\r\n * Helper to check if a key matches a character (checks both raw and name)\r\n */\r\n private isKey(key: KeyEvent, ...chars: string[]): boolean {\r\n const raw = key.raw?.toLowerCase();\r\n const name = key.name?.toLowerCase();\r\n for (const char of chars) {\r\n const c = char.toLowerCase();\r\n if (raw === c || name === c) return true;\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Handle zoom/pan controls - works when focused (not just entered)\r\n * Pan moves the center in data coordinates (like mapscii)\r\n */\r\n handleZoomPan(key: KeyEvent): boolean {\r\n // Pan step scales inversely with zoom (faster pan when zoomed out)\r\n const panStep = this.BASE_PAN_STEP / this.zoom;\r\n\r\n // Zoom controls - check both raw characters\r\n if (key.raw === '+' || key.raw === '=' || key.sequence === '+') {\r\n this.zoom = Math.min(this.MAX_ZOOM, this.zoom + this.ZOOM_STEP);\r\n return true;\r\n }\r\n if (key.raw === '-' || key.raw === '_' || key.sequence === '-') {\r\n this.zoom = Math.max(this.MIN_ZOOM, this.zoom - this.ZOOM_STEP);\r\n return true;\r\n }\r\n\r\n // Initialize center if null (before any pan operation)\r\n // This can happen if handleZoomPan is called before first render\r\n if (this.centerX === null) this.centerX = 0;\r\n if (this.centerY === null) this.centerY = 0;\r\n\r\n // Pan controls (WASD) - move center in data coordinates\r\n // Use isKey helper to check both key.raw and key.name\r\n // W = up = decrease Y (move view up = center moves up in data space)\r\n if (this.isKey(key, 'w')) {\r\n this.centerY -= panStep;\r\n return true;\r\n }\r\n // S = down = increase Y\r\n if (this.isKey(key, 's')) {\r\n this.centerY += panStep;\r\n return true;\r\n }\r\n // A = left = decrease X\r\n if (this.isKey(key, 'a')) {\r\n this.centerX -= panStep;\r\n return true;\r\n }\r\n // D = right = increase X\r\n if (this.isKey(key, 'd')) {\r\n this.centerX += panStep;\r\n return true;\r\n }\r\n\r\n // Reset view - reset center to null (will be recalculated on next render)\r\n if (this.isKey(key, 'r', '0')) {\r\n this.zoom = 1.0;\r\n this.centerX = null;\r\n this.centerY = null;\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n protected handleCustomKey(key: KeyEvent): boolean {\r\n return this.handleZoomPan(key);\r\n }\r\n\r\n /**\r\n * Override handleKey to allow zoom/pan when focused OR entered\r\n */\r\n handleKey(key: KeyEvent): boolean {\r\n // Always try zoom/pan first when focused or entered\r\n if ((this.focused || this.state.entered) && this.handleZoomPan(key)) {\r\n return true;\r\n }\r\n\r\n // For other keys, use default behavior (requires entered state)\r\n return super.handleKey(key);\r\n }\r\n\r\n resetView(): void {\r\n this.zoom = 1.0;\r\n this.centerX = null;\r\n this.centerY = null;\r\n }\r\n}\r\n"],"names":[],"mappings":"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;QACd,CAAC;QAED,0EAA0E;QAC1E,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;YAC9B,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;YAChB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAES,eAAe,CAAC,GAAa;QACrC,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,GAAa;QACrB,oDAAoD;QACpD,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC;YACpE,OAAO,IAAI,CAAC;QACd,CAAC;QAED,gEAAgE;QAChE,OAAO,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS;QACP,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;CACF","debug_id":"fbdefc1f-3be2-522e-b408-c468135e7ae5"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status Section - Displays player/team status information
|
|
3
|
+
* Read-only section, cannot be entered
|
|
4
|
+
*/
|
|
5
|
+
import { BaseSection } from '../core/BaseSection.js';
|
|
6
|
+
import type { RenderContext } from '../core/Component.js';
|
|
7
|
+
import type { GameState, Actor, Team } from '../../core/types.js';
|
|
8
|
+
import type { ExtendedNPC } from '../../npc/types.js';
|
|
9
|
+
import type { Quest } from '../../quest/types.js';
|
|
10
|
+
/**
|
|
11
|
+
* Status section data
|
|
12
|
+
*/
|
|
13
|
+
export interface StatusData {
|
|
14
|
+
state: GameState;
|
|
15
|
+
npcs: ExtendedNPC[];
|
|
16
|
+
quests: Quest[];
|
|
17
|
+
team?: Team;
|
|
18
|
+
actors?: Record<string, Actor>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Status Section - Shows gold, equipment, quest progress, NPC count
|
|
22
|
+
*/
|
|
23
|
+
export declare class StatusSection extends BaseSection {
|
|
24
|
+
private data;
|
|
25
|
+
constructor();
|
|
26
|
+
/**
|
|
27
|
+
* Update section data
|
|
28
|
+
*/
|
|
29
|
+
update(data: StatusData): void;
|
|
30
|
+
/**
|
|
31
|
+
* Render status content
|
|
32
|
+
*/
|
|
33
|
+
protected renderContent(ctx: RenderContext): void;
|
|
34
|
+
/**
|
|
35
|
+
* Get role icon for actor
|
|
36
|
+
*/
|
|
37
|
+
private getRoleIcon;
|
|
38
|
+
/**
|
|
39
|
+
* Status section has no selectable items
|
|
40
|
+
*/
|
|
41
|
+
getItemCount(): number;
|
|
42
|
+
/**
|
|
43
|
+
* Cannot activate items in read-only section
|
|
44
|
+
*/
|
|
45
|
+
activateItem(): boolean;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=StatusSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusSection.d.ts","sourceRoot":"/","sources":["tui/sections/StatusSection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAA0B,MAAM,wBAAwB,CAAC;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,MAAM,EAAE,KAAK,EAAE,CAAC;IAEhB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CAChC;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C,OAAO,CAAC,IAAI,CAA2B;;IAgBvC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAI9B;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI;IA8EjD;;OAEG;IACH,OAAO,CAAC,WAAW;IAWnB;;OAEG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACH,YAAY,IAAI,OAAO;CAGxB"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status Section - Displays player/team status information
|
|
3
|
+
* Read-only section, cannot be entered
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3f18a815-9a6c-5275-bd0d-c0fbe117958d")}catch(e){}}();
|
|
7
|
+
import { BaseSection } from '../core/BaseSection.js';
|
|
8
|
+
import { ANSI } from '../Screen.js';
|
|
9
|
+
/**
|
|
10
|
+
* Status Section - Shows gold, equipment, quest progress, NPC count
|
|
11
|
+
*/
|
|
12
|
+
export class StatusSection extends BaseSection {
|
|
13
|
+
data = null;
|
|
14
|
+
constructor() {
|
|
15
|
+
const config = {
|
|
16
|
+
id: 'status',
|
|
17
|
+
title: 'Status',
|
|
18
|
+
canEnter: false, // Read-only section
|
|
19
|
+
hints: {
|
|
20
|
+
focused: '(read-only)',
|
|
21
|
+
entered: '',
|
|
22
|
+
unfocused: '',
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
super(config);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Update section data
|
|
29
|
+
*/
|
|
30
|
+
update(data) {
|
|
31
|
+
this.data = data;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Render status content
|
|
35
|
+
*/
|
|
36
|
+
renderContent(ctx) {
|
|
37
|
+
if (!this.data)
|
|
38
|
+
return;
|
|
39
|
+
const { screen, bounds } = ctx;
|
|
40
|
+
const { state, npcs, quests, team, actors } = this.data;
|
|
41
|
+
const { x, y, width, height } = bounds;
|
|
42
|
+
let lineY = y + 1;
|
|
43
|
+
// If team mode, show team members
|
|
44
|
+
if (team && actors) {
|
|
45
|
+
// Team gold (shared)
|
|
46
|
+
const gold = `Team Gold: ${team.sharedGold}`;
|
|
47
|
+
screen.write(x + 2, lineY, gold, ANSI.fg.yellow);
|
|
48
|
+
lineY++;
|
|
49
|
+
// Team formation
|
|
50
|
+
const formation = team.formation.charAt(0).toUpperCase() + team.formation.slice(1);
|
|
51
|
+
screen.write(x + 2, lineY, `Formation: ${formation}`, ANSI.fg.cyan);
|
|
52
|
+
lineY++;
|
|
53
|
+
lineY++;
|
|
54
|
+
// Show each active member
|
|
55
|
+
screen.write(x + 2, lineY, '── Members ──', ANSI.fg.gray);
|
|
56
|
+
lineY++;
|
|
57
|
+
for (const memberId of team.activeMembers) {
|
|
58
|
+
if (lineY >= y + height - 3)
|
|
59
|
+
break;
|
|
60
|
+
const actor = actors[memberId];
|
|
61
|
+
if (!actor)
|
|
62
|
+
continue;
|
|
63
|
+
const hpPct = Math.floor((actor.stats.hp / actor.stats.maxHp) * 100);
|
|
64
|
+
const roleIcon = this.getRoleIcon(actor.role);
|
|
65
|
+
const hpColor = hpPct > 70 ? ANSI.fg.green : hpPct > 30 ? ANSI.fg.yellow : ANSI.fg.red;
|
|
66
|
+
const line = `${roleIcon}${actor.name.slice(0, 8)} Lv${actor.stats.level}`;
|
|
67
|
+
screen.write(x + 2, lineY, line.slice(0, width - 12), ANSI.fg.white);
|
|
68
|
+
screen.write(x + width - 8, lineY, `${hpPct}%`, hpColor);
|
|
69
|
+
lineY++;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
// Legacy single player mode display
|
|
74
|
+
// Gold
|
|
75
|
+
const gold = `Gold: ${state.player.stats.gold}`;
|
|
76
|
+
screen.write(x + 2, lineY, gold, ANSI.fg.yellow);
|
|
77
|
+
lineY++;
|
|
78
|
+
// Equipment
|
|
79
|
+
if (state.player.equipment.weapon) {
|
|
80
|
+
screen.write(x + 2, lineY, `Weapon: ${state.player.equipment.weapon.name}`, ANSI.fg.white);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
screen.write(x + 2, lineY, 'Weapon: (none)', ANSI.fg.gray);
|
|
84
|
+
}
|
|
85
|
+
lineY++;
|
|
86
|
+
// Armor
|
|
87
|
+
if (state.player.equipment.armor && lineY < y + height - 2) {
|
|
88
|
+
screen.write(x + 2, lineY, `Armor: ${state.player.equipment.armor.name}`, ANSI.fg.white);
|
|
89
|
+
lineY++;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// Active quest (if any)
|
|
93
|
+
if (quests.length > 0 && lineY < y + height - 2) {
|
|
94
|
+
const quest = quests[0];
|
|
95
|
+
const completed = quest.objectives.filter(o => o.isComplete).length;
|
|
96
|
+
const total = quest.objectives.length;
|
|
97
|
+
const questText = `Quest: ${quest.name} [${completed}/${total}]`;
|
|
98
|
+
screen.write(x + 2, lineY, questText.slice(0, width - 4), ANSI.fg.magenta);
|
|
99
|
+
lineY++;
|
|
100
|
+
}
|
|
101
|
+
// NPCs count
|
|
102
|
+
if (npcs.length > 0 && lineY < y + height - 2) {
|
|
103
|
+
screen.write(x + 2, lineY, `NPCs: ${npcs.length} here`, ANSI.fg.cyan);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Get role icon for actor
|
|
108
|
+
*/
|
|
109
|
+
getRoleIcon(role) {
|
|
110
|
+
switch (role) {
|
|
111
|
+
case 'tank': return '🛡';
|
|
112
|
+
case 'dps': return '⚔';
|
|
113
|
+
case 'healer': return '✚';
|
|
114
|
+
case 'support': return '★';
|
|
115
|
+
case 'balanced':
|
|
116
|
+
default: return '◆';
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Status section has no selectable items
|
|
121
|
+
*/
|
|
122
|
+
getItemCount() {
|
|
123
|
+
return 0;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Cannot activate items in read-only section
|
|
127
|
+
*/
|
|
128
|
+
activateItem() {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=StatusSection.js.map
|
|
133
|
+
//# debugId=3f18a815-9a6c-5275-bd0d-c0fbe117958d
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusSection.js","sources":["tui/sections/StatusSection.ts"],"sourceRoot":"/","sourcesContent":["/**\r\n * Status Section - Displays player/team status information\r\n * Read-only section, cannot be entered\r\n */\r\n\r\nimport { BaseSection, type BaseSectionConfig } from '../core/BaseSection.js';\r\nimport type { RenderContext } from '../core/Component.js';\r\nimport { ANSI } from '../Screen.js';\r\nimport type { GameState, Actor, Team } from '../../core/types.js';\r\nimport type { ExtendedNPC } from '../../npc/types.js';\r\nimport type { Quest } from '../../quest/types.js';\r\n\r\n/**\r\n * Status section data\r\n */\r\nexport interface StatusData {\r\n state: GameState;\r\n npcs: ExtendedNPC[];\r\n quests: Quest[];\r\n // Team mode data\r\n team?: Team;\r\n actors?: Record<string, Actor>;\r\n}\r\n\r\n/**\r\n * Status Section - Shows gold, equipment, quest progress, NPC count\r\n */\r\nexport class StatusSection extends BaseSection {\r\n private data: StatusData | null = null;\r\n\r\n constructor() {\r\n const config: BaseSectionConfig = {\r\n id: 'status',\r\n title: 'Status',\r\n canEnter: false, // Read-only section\r\n hints: {\r\n focused: '(read-only)',\r\n entered: '',\r\n unfocused: '',\r\n },\r\n };\r\n super(config);\r\n }\r\n\r\n /**\r\n * Update section data\r\n */\r\n update(data: StatusData): void {\r\n this.data = data;\r\n }\r\n\r\n /**\r\n * Render status content\r\n */\r\n protected renderContent(ctx: RenderContext): void {\r\n if (!this.data) return;\r\n\r\n const { screen, bounds } = ctx;\r\n const { state, npcs, quests, team, actors } = this.data;\r\n const { x, y, width, height } = bounds;\r\n\r\n let lineY = y + 1;\r\n\r\n // If team mode, show team members\r\n if (team && actors) {\r\n // Team gold (shared)\r\n const gold = `Team Gold: ${team.sharedGold}`;\r\n screen.write(x + 2, lineY, gold, ANSI.fg.yellow);\r\n lineY++;\r\n\r\n // Team formation\r\n const formation = team.formation.charAt(0).toUpperCase() + team.formation.slice(1);\r\n screen.write(x + 2, lineY, `Formation: ${formation}`, ANSI.fg.cyan);\r\n lineY++;\r\n lineY++;\r\n\r\n // Show each active member\r\n screen.write(x + 2, lineY, '── Members ──', ANSI.fg.gray);\r\n lineY++;\r\n\r\n for (const memberId of team.activeMembers) {\r\n if (lineY >= y + height - 3) break;\r\n const actor = actors[memberId];\r\n if (!actor) continue;\r\n\r\n const hpPct = Math.floor((actor.stats.hp / actor.stats.maxHp) * 100);\r\n const roleIcon = this.getRoleIcon(actor.role);\r\n const hpColor = hpPct > 70 ? ANSI.fg.green : hpPct > 30 ? ANSI.fg.yellow : ANSI.fg.red;\r\n\r\n const line = `${roleIcon}${actor.name.slice(0, 8)} Lv${actor.stats.level}`;\r\n screen.write(x + 2, lineY, line.slice(0, width - 12), ANSI.fg.white);\r\n screen.write(x + width - 8, lineY, `${hpPct}%`, hpColor);\r\n lineY++;\r\n }\r\n } else {\r\n // Legacy single player mode display\r\n // Gold\r\n const gold = `Gold: ${state.player.stats.gold}`;\r\n screen.write(x + 2, lineY, gold, ANSI.fg.yellow);\r\n lineY++;\r\n\r\n // Equipment\r\n if (state.player.equipment.weapon) {\r\n screen.write(x + 2, lineY, `Weapon: ${state.player.equipment.weapon.name}`, ANSI.fg.white);\r\n } else {\r\n screen.write(x + 2, lineY, 'Weapon: (none)', ANSI.fg.gray);\r\n }\r\n lineY++;\r\n\r\n // Armor\r\n if (state.player.equipment.armor && lineY < y + height - 2) {\r\n screen.write(x + 2, lineY, `Armor: ${state.player.equipment.armor.name}`, ANSI.fg.white);\r\n lineY++;\r\n }\r\n }\r\n\r\n // Active quest (if any)\r\n if (quests.length > 0 && lineY < y + height - 2) {\r\n const quest = quests[0];\r\n const completed = quest.objectives.filter(o => o.isComplete).length;\r\n const total = quest.objectives.length;\r\n const questText = `Quest: ${quest.name} [${completed}/${total}]`;\r\n screen.write(x + 2, lineY, questText.slice(0, width - 4), ANSI.fg.magenta);\r\n lineY++;\r\n }\r\n\r\n // NPCs count\r\n if (npcs.length > 0 && lineY < y + height - 2) {\r\n screen.write(x + 2, lineY, `NPCs: ${npcs.length} here`, ANSI.fg.cyan);\r\n }\r\n }\r\n\r\n /**\r\n * Get role icon for actor\r\n */\r\n private getRoleIcon(role?: string): string {\r\n switch (role) {\r\n case 'tank': return '🛡';\r\n case 'dps': return '⚔';\r\n case 'healer': return '✚';\r\n case 'support': return '★';\r\n case 'balanced':\r\n default: return '◆';\r\n }\r\n }\r\n\r\n /**\r\n * Status section has no selectable items\r\n */\r\n getItemCount(): number {\r\n return 0;\r\n }\r\n\r\n /**\r\n * Cannot activate items in read-only section\r\n */\r\n activateItem(): boolean {\r\n return false;\r\n }\r\n}\r\n"],"names":[],"mappings":"AAAA;;;GAGG;;;AAEH,OAAO,EAAE,WAAW,EAA0B,MAAM,wBAAwB,CAAC;AAE7E,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAiBpC;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IACpC,IAAI,GAAsB,IAAI,CAAC;IAEvC;Q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AAK,SAAS,CAAC,CAAC,OAAO,GAAG,CAAC;YAC3B,KAAK,UAAU,CAAC;YAChB,OAAO,CAAC,CAAC,OAAO,GAAG,CAAC;QACtB,CAAC;IACH,CAAC;IAED;;OAEG;IACH,YAAY;QACV,OAAO,CAAC,CAAC;IACX,CAAC;IAED;;OAEG;IACH,YAAY;QACV,OAAO,KAAK,CAAC;IACf,CAAC;CACF","debug_id":"3f18a815-9a6c-5275-bd0d-c0fbe117958d"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Team Section - Displays team member status in the UI
|
|
3
|
+
* Shows all active team members with their HP, MP, level, and role
|
|
4
|
+
*/
|
|
5
|
+
import { BaseSection } from '../core/BaseSection.js';
|
|
6
|
+
import type { RenderContext } from '../core/Component.js';
|
|
7
|
+
import type { Actor, Team } from '../../core/types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Team section data
|
|
10
|
+
*/
|
|
11
|
+
export interface TeamSectionData {
|
|
12
|
+
team: Team;
|
|
13
|
+
actors: Record<string, Actor>;
|
|
14
|
+
showReserve?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Callback type for actor selection
|
|
18
|
+
*/
|
|
19
|
+
export type ActorSelectedCallback = (actor: Actor) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Team Section - Shows all team members and their status
|
|
22
|
+
*/
|
|
23
|
+
export declare class TeamSection extends BaseSection {
|
|
24
|
+
private data;
|
|
25
|
+
private showReserve;
|
|
26
|
+
private onActorSelected;
|
|
27
|
+
constructor();
|
|
28
|
+
/**
|
|
29
|
+
* Update section data
|
|
30
|
+
*/
|
|
31
|
+
update(data: TeamSectionData): void;
|
|
32
|
+
/**
|
|
33
|
+
* Render team content
|
|
34
|
+
*/
|
|
35
|
+
protected renderContent(ctx: RenderContext): void;
|
|
36
|
+
/**
|
|
37
|
+
* Format a single actor line
|
|
38
|
+
*/
|
|
39
|
+
private formatActorLine;
|
|
40
|
+
/**
|
|
41
|
+
* Get color based on actor status
|
|
42
|
+
*/
|
|
43
|
+
private getActorColor;
|
|
44
|
+
/**
|
|
45
|
+
* Get total item count
|
|
46
|
+
*/
|
|
47
|
+
getItemCount(): number;
|
|
48
|
+
/**
|
|
49
|
+
* Handle key input when entered
|
|
50
|
+
*/
|
|
51
|
+
handleKeyInput(key: {
|
|
52
|
+
name: string;
|
|
53
|
+
}): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Activate selected item (view details)
|
|
56
|
+
*/
|
|
57
|
+
activateItem(): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Get the selected actor
|
|
60
|
+
*/
|
|
61
|
+
getSelectedActor(): Actor | null;
|
|
62
|
+
/**
|
|
63
|
+
* Reset selection
|
|
64
|
+
*/
|
|
65
|
+
resetSelection(): void;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Create a compact team status display for status bars
|
|
69
|
+
*/
|
|
70
|
+
export declare function renderCompactTeamStatus(team: Team, actors: Record<string, Actor>, width: number): string[];
|
|
71
|
+
//# sourceMappingURL=TeamSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TeamSection.d.ts","sourceRoot":"/","sources":["tui/sections/TeamSection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAA0B,MAAM,wBAAwB,CAAC;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAiB,MAAM,qBAAqB,CAAC;AAItE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAE3D;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C,OAAO,CAAC,IAAI,CAAgC;IAC5C,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,eAAe,CAAsC;;IAgB7D;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI;IAKnC;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI;IA+DjD;;OAEG;IACH,OAAO,CAAC,eAAe;IAiBvB;;OAEG;IACH,OAAO,CAAC,aAAa;IAWrB;;OAEG;IACH,YAAY,IAAI,MAAM;IAQtB;;OAEG;IACH,cAAc,CAAC,GAAG,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO;IA6B9C;;OAEG;IACH,YAAY,IAAI,OAAO;IAiBvB;;OAEG;IACH,gBAAgB,IAAI,KAAK,GAAG,IAAI;IAWhC;;OAEG;IACH,cAAc,IAAI,IAAI;CAGvB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAC7B,KAAK,EAAE,MAAM,GACZ,MAAM,EAAE,CAcV"}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Team Section - Displays team member status in the UI
|
|
3
|
+
* Shows all active team members with their HP, MP, level, and role
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9a9c7e96-1d70-5f08-b96a-e5ecbe47d7c1")}catch(e){}}();
|
|
7
|
+
import { BaseSection } from '../core/BaseSection.js';
|
|
8
|
+
import { ANSI } from '../Screen.js';
|
|
9
|
+
import { getActiveMembers, getReserveMembers, getFormationDisplayName } from '../../core/Team.js';
|
|
10
|
+
import { getActorRoleIcon } from '../../core/Actor.js';
|
|
11
|
+
/**
|
|
12
|
+
* Team Section - Shows all team members and their status
|
|
13
|
+
*/
|
|
14
|
+
export class TeamSection extends BaseSection {
|
|
15
|
+
data = null;
|
|
16
|
+
showReserve = false;
|
|
17
|
+
onActorSelected = null;
|
|
18
|
+
constructor() {
|
|
19
|
+
const config = {
|
|
20
|
+
id: 'team',
|
|
21
|
+
title: 'Team',
|
|
22
|
+
canEnter: true,
|
|
23
|
+
hints: {
|
|
24
|
+
focused: '↑↓ Select | Enter View | F Formation',
|
|
25
|
+
entered: 'Enter View Details | Esc Back',
|
|
26
|
+
unfocused: '',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
super(config);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Update section data
|
|
33
|
+
*/
|
|
34
|
+
update(data) {
|
|
35
|
+
this.data = data;
|
|
36
|
+
this.showReserve = data.showReserve ?? false;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Render team content
|
|
40
|
+
*/
|
|
41
|
+
renderContent(ctx) {
|
|
42
|
+
if (!this.data)
|
|
43
|
+
return;
|
|
44
|
+
const { screen, bounds } = ctx;
|
|
45
|
+
const { team, actors } = this.data;
|
|
46
|
+
const { x, y, width, height } = bounds;
|
|
47
|
+
let lineY = y + 1;
|
|
48
|
+
const maxContentHeight = height - 2;
|
|
49
|
+
// Team name and formation
|
|
50
|
+
const headerLine = `${team.name} | ${getFormationDisplayName(team.formation)}`;
|
|
51
|
+
screen.write(x + 2, lineY, headerLine.slice(0, width - 4), ANSI.fg.cyan);
|
|
52
|
+
lineY++;
|
|
53
|
+
// Active members header
|
|
54
|
+
const activeMembers = getActiveMembers(team, actors);
|
|
55
|
+
screen.write(x + 2, lineY, `Active (${activeMembers.length}/4):`, ANSI.fg.white);
|
|
56
|
+
lineY++;
|
|
57
|
+
// Render active members
|
|
58
|
+
activeMembers.forEach((actor, index) => {
|
|
59
|
+
if (lineY >= y + maxContentHeight)
|
|
60
|
+
return;
|
|
61
|
+
const isSelected = this.state.entered && this.state.selectedIndex === index;
|
|
62
|
+
const prefix = isSelected ? '▶ ' : ' ';
|
|
63
|
+
const line = this.formatActorLine(actor, index, width - 6);
|
|
64
|
+
const color = isSelected ? ANSI.fg.yellow : this.getActorColor(actor);
|
|
65
|
+
screen.write(x + 2, lineY, prefix + line, color);
|
|
66
|
+
lineY++;
|
|
67
|
+
});
|
|
68
|
+
// Show reserve if enabled
|
|
69
|
+
if (this.showReserve) {
|
|
70
|
+
const reserveMembers = getReserveMembers(team, actors);
|
|
71
|
+
if (reserveMembers.length > 0 && lineY < y + maxContentHeight - 1) {
|
|
72
|
+
lineY++;
|
|
73
|
+
screen.write(x + 2, lineY, `Reserve (${reserveMembers.length}):`, ANSI.fg.gray);
|
|
74
|
+
lineY++;
|
|
75
|
+
reserveMembers.forEach((actor, index) => {
|
|
76
|
+
if (lineY >= y + maxContentHeight)
|
|
77
|
+
return;
|
|
78
|
+
const isSelected = this.state.entered && this.state.selectedIndex === activeMembers.length + index;
|
|
79
|
+
const prefix = isSelected ? '▶ ' : ' ';
|
|
80
|
+
const line = this.formatActorLine(actor, -1, width - 6);
|
|
81
|
+
const color = isSelected ? ANSI.fg.yellow : ANSI.fg.gray;
|
|
82
|
+
screen.write(x + 2, lineY, prefix + line, color);
|
|
83
|
+
lineY++;
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// Show shared gold at bottom
|
|
88
|
+
if (lineY < y + maxContentHeight) {
|
|
89
|
+
lineY = y + maxContentHeight - 1;
|
|
90
|
+
const goldLine = `Team Gold: ${team.sharedGold}`;
|
|
91
|
+
screen.write(x + 2, lineY, goldLine, ANSI.fg.yellow);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Format a single actor line
|
|
96
|
+
*/
|
|
97
|
+
formatActorLine(actor, position, maxWidth) {
|
|
98
|
+
const roleIcon = getActorRoleIcon(actor.role);
|
|
99
|
+
const hpPercent = Math.floor((actor.stats.hp / actor.stats.maxHp) * 100);
|
|
100
|
+
const mpPercent = Math.floor((actor.stats.mp / actor.stats.maxMp) * 100);
|
|
101
|
+
// Position indicator for active members
|
|
102
|
+
const posStr = position >= 0 ? `[${position + 1}]` : '';
|
|
103
|
+
// Status indicator
|
|
104
|
+
const statusIcon = actor.status === 'active' ? '' :
|
|
105
|
+
actor.status === 'reserve' ? '[R]' :
|
|
106
|
+
actor.status === 'injured' ? '[!]' : '[X]';
|
|
107
|
+
const line = `${posStr}${roleIcon} ${actor.name} Lv${actor.stats.level} HP:${hpPercent}% MP:${mpPercent}% ${statusIcon}`;
|
|
108
|
+
return line.slice(0, maxWidth);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Get color based on actor status
|
|
112
|
+
*/
|
|
113
|
+
getActorColor(actor) {
|
|
114
|
+
if (actor.status === 'dead')
|
|
115
|
+
return ANSI.fg.red;
|
|
116
|
+
if (actor.status === 'injured')
|
|
117
|
+
return ANSI.fg.yellow;
|
|
118
|
+
// Color based on HP
|
|
119
|
+
const hpPercent = actor.stats.hp / actor.stats.maxHp;
|
|
120
|
+
if (hpPercent > 0.7)
|
|
121
|
+
return ANSI.fg.green;
|
|
122
|
+
if (hpPercent > 0.3)
|
|
123
|
+
return ANSI.fg.yellow;
|
|
124
|
+
return ANSI.fg.red;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Get total item count
|
|
128
|
+
*/
|
|
129
|
+
getItemCount() {
|
|
130
|
+
if (!this.data)
|
|
131
|
+
return 0;
|
|
132
|
+
const { team, actors } = this.data;
|
|
133
|
+
const activeCount = getActiveMembers(team, actors).length;
|
|
134
|
+
const reserveCount = this.showReserve ? getReserveMembers(team, actors).length : 0;
|
|
135
|
+
return activeCount + reserveCount;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Handle key input when entered
|
|
139
|
+
*/
|
|
140
|
+
handleKeyInput(key) {
|
|
141
|
+
if (!this.data)
|
|
142
|
+
return false;
|
|
143
|
+
const itemCount = this.getItemCount();
|
|
144
|
+
switch (key.name) {
|
|
145
|
+
case 'up':
|
|
146
|
+
if (this.state.selectedIndex > 0) {
|
|
147
|
+
this.state.selectedIndex--;
|
|
148
|
+
return true;
|
|
149
|
+
}
|
|
150
|
+
break;
|
|
151
|
+
case 'down':
|
|
152
|
+
if (this.state.selectedIndex < itemCount - 1) {
|
|
153
|
+
this.state.selectedIndex++;
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
break;
|
|
157
|
+
case 'r':
|
|
158
|
+
// Toggle reserve display
|
|
159
|
+
this.showReserve = !this.showReserve;
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Activate selected item (view details)
|
|
166
|
+
*/
|
|
167
|
+
activateItem() {
|
|
168
|
+
if (!this.data || this.state.selectedIndex < 0)
|
|
169
|
+
return false;
|
|
170
|
+
const { team, actors } = this.data;
|
|
171
|
+
const activeMembers = getActiveMembers(team, actors);
|
|
172
|
+
const reserveMembers = this.showReserve ? getReserveMembers(team, actors) : [];
|
|
173
|
+
const allMembers = [...activeMembers, ...reserveMembers];
|
|
174
|
+
if (this.state.selectedIndex >= allMembers.length)
|
|
175
|
+
return false;
|
|
176
|
+
const selectedActor = allMembers[this.state.selectedIndex];
|
|
177
|
+
// Notify via callback for viewing actor details
|
|
178
|
+
this.onActorSelected?.(selectedActor);
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Get the selected actor
|
|
183
|
+
*/
|
|
184
|
+
getSelectedActor() {
|
|
185
|
+
if (!this.data || this.state.selectedIndex < 0)
|
|
186
|
+
return null;
|
|
187
|
+
const { team, actors } = this.data;
|
|
188
|
+
const activeMembers = getActiveMembers(team, actors);
|
|
189
|
+
const reserveMembers = this.showReserve ? getReserveMembers(team, actors) : [];
|
|
190
|
+
const allMembers = [...activeMembers, ...reserveMembers];
|
|
191
|
+
return allMembers[this.state.selectedIndex] ?? null;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Reset selection
|
|
195
|
+
*/
|
|
196
|
+
resetSelection() {
|
|
197
|
+
this.state.selectedIndex = 0;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Create a compact team status display for status bars
|
|
202
|
+
*/
|
|
203
|
+
export function renderCompactTeamStatus(team, actors, width) {
|
|
204
|
+
const lines = [];
|
|
205
|
+
const activeMembers = getActiveMembers(team, actors);
|
|
206
|
+
activeMembers.forEach((actor, index) => {
|
|
207
|
+
const roleIcon = getActorRoleIcon(actor.role);
|
|
208
|
+
const hpPercent = Math.floor((actor.stats.hp / actor.stats.maxHp) * 100);
|
|
209
|
+
const hpBar = createHpBar(actor.stats.hp / actor.stats.maxHp, 8);
|
|
210
|
+
const line = `${index + 1}${roleIcon}${actor.name.slice(0, 6)} ${hpBar} ${hpPercent}%`;
|
|
211
|
+
lines.push(line.slice(0, width));
|
|
212
|
+
});
|
|
213
|
+
return lines;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Create a simple HP bar
|
|
217
|
+
*/
|
|
218
|
+
function createHpBar(percent, width) {
|
|
219
|
+
const filled = Math.floor(percent * width);
|
|
220
|
+
const empty = width - filled;
|
|
221
|
+
return '[' + '█'.repeat(filled) + '░'.repeat(empty) + ']';
|
|
222
|
+
}
|
|
223
|
+
//# sourceMappingURL=TeamSection.js.map
|
|
224
|
+
//# debugId=9a9c7e96-1d70-5f08-b96a-e5ecbe47d7c1
|