Commit Graph
82 Commits
Author SHA1 Message Date
Hide_D 94dec6c794 feat: replace custom clamp function with es-toolkit's clamp in multiple files 2026-01-03 16:47:45 +00:00
Hide_D eb4577a4c5 Refactor code structure for improved readability and maintainability 2026-01-03 16:43:14 +00:00
Hide_D aec43e67fa feat: add es-toolkit dependency to multiple package.json files 2026-01-03 16:40:15 +00:00
Hide_D e5bd6d89ab feat: add admin user management features and update user repository methods
- Implemented updateRoles, updateSanctions, and deleteUser methods in both in-memory and PostgreSQL user repositories.
- Enhanced UserSanctions and UserServerRestriction interfaces to include additional properties.
- Added AdminView component for admin functionalities including user lookup, role management, sanctions application, and profile management.
- Integrated admin token handling in TRPC client for secure API requests.
- Updated routing to include admin dashboard and linked it in the default layout.
2026-01-03 15:28:51 +00:00
Hide_D a9609dcc19 feat: add database schema support for gateway and game profiles
- Introduced `dbSchema` configuration option in GatewayApiConfig and GatewayOrchestratorConfig.
- Implemented schema resolution logic in environment configuration functions.
- Updated context and orchestrator factory to use GatewayPrismaClient instead of PrismaClient.
- Refactored orchestrator server and profile repository to accommodate new database schema handling.
- Created separate Prisma schemas for game and gateway in the infra package.
- Enhanced Postgres connector to support schema overrides in database URLs.
- Updated documentation to reflect changes in database schema handling.
- Added new Prisma generation and database push scripts for game and gateway schemas.
2026-01-03 14:47:28 +00:00
Hide_D 67d995c65f feat: implement lobby functionality with user and server information retrieval 2026-01-03 13:35:16 +00:00
Hide_D 395d937fd5 feat: update stat handling by introducing specific types for GeneralStatName and WarStatName across various modules 2026-01-03 09:49:46 +00:00
Hide_D d1522ff450 feat(items): add new item modules and enhance item functionality
- Introduced various item modules including '흑색마', '사륜거', '단궁', '동호비궁', '도기', '변도론', '전론', and '환약'.
- Implemented stat item modules to enhance general and war action contexts.
- Added triggers for item healing and sniping actions during battles.
- Enhanced item management with new utility functions for inventory handling.
- Updated the item registry and loader to support new items and their functionalities.
- Improved the overall structure of item-related code for better maintainability and scalability.
2026-01-03 09:28:46 +00:00
Hide_D e10bcba49b Refactor import paths to use absolute paths from '@sammo-ts/logic' for consistency and clarity across the codebase. This includes updates to various modules related to actions, triggers, constraints, and world management, ensuring that all imports are correctly pointing to the new structure. 2026-01-03 08:08:33 +00:00
Hide_D 64953e39a5 feat: add special action modules for domestic and war triggers
- Implemented '발명' and '인덕' domestic special action modules with modifiers for technology research and population management.
- Added '의술' and '징병' war special action modules to enhance healing and recruitment capabilities during battles.
- Created a general trigger for city healing in '의술' and integrated it with the war action pipeline.
- Developed a comprehensive registry and loader for special action modules to streamline their usage in the game logic.
- Enhanced test coverage for special action modules, ensuring correct application of modifiers and trigger functionalities.
2026-01-03 08:01:04 +00:00
Hide_D eb361e1bed feat: add caching mechanism to GeneralTurnCommandLoader and NationTurnCommandLoader for improved performance 2026-01-03 07:02:55 +00:00
Hide_D 7b41852938 feat: replace js-sha512 with @noble/hashes for SHA-512 implementation and update related logic 2026-01-03 06:47:45 +00:00
Hide_D 4f90f50033 feat: Introduce action context builders for various turn actions
- Added `actionContextBuilder` to multiple turn action files to utilize the default action context builder.
- Implemented specific context builders for actions requiring additional context, such as war configurations, world summaries, and general statistics.
- Created new `actionContext.ts` and `actionContextHelpers.ts` files to define interfaces and helper functions for managing action contexts.
- Enhanced context handling for nation and general actions, ensuring proper data injection for turn execution.
2026-01-03 06:28:50 +00:00
Hide_D b628b32968 feat: add non-aggression cancel actions and related diplomacy constraints 2026-01-03 06:09:10 +00:00
Hide_D 11ffdfef0e feat: add state property to city and update related processing logic in battle simulation and world map 2026-01-02 21:13:37 +00:00
Hide_D edcfad4e40 feat: enhance action context with diplomacy and map handling, add constraints for crew and route validation 2026-01-02 19:52:17 +00:00
Hide_D ea2ef91b31 feat: enhance war action handling with new configurations and context management 2026-01-02 19:35:36 +00:00
Hide_D fba363c6ce feat: add command module and update action resolvers with GeneralActionResolver implementation 2026-01-02 19:08:11 +00:00
Hide_D f58b8b2553 feat: remove VolunteerRecruit module and related imports 2026-01-02 18:35:58 +00:00
Hide_D 10ff64946e feat: add non-aggression proposal and acceptance actions with constraints 2026-01-02 18:33:24 +00:00
Hide_D cb86a47f94 feat: implement diplomacy system with state management and processing logic 2026-01-02 17:48:44 +00:00
Hide_D f137c5be65 Refactor action effects to use direct state mutations and logging
- Removed the use of createGeneralPatchEffect and createLogEffect in various action definitions.
- Replaced effects with direct mutations of the state for general and city entities.
- Updated logging to use context.addLog for better clarity and consistency.
- Ensured that all actions now return an empty effects array after processing.
2026-01-02 10:25:33 +00:00
Hide_D 18247eeff4 feat: add immer dependency and integrate draft handling in engine actions 2026-01-02 09:38:05 +00:00
Hide_D 56495c65e3 feat: add city, diplomacy, general, nation, and helper constraints
- Implemented various constraints for city management including occupied, supplied, and capacity checks.
- Added diplomacy constraints to manage relationships between nations.
- Introduced general constraints to validate general states and resources.
- Created helper functions for reading entities and resolving IDs.
- Enhanced the overall logic for managing game state and constraints.
2026-01-02 06:06:33 +00:00
Hide_D 6d421e81a0 feat: Refactor General and Nation Turn Command types and importers for improved structure and consistency 2026-01-01 19:12:50 +00:00
Hide_D bfbcb4472e feat: Implement general and nation turn commands with command specifications
- Added command specifications for various general turn commands including talent scouting, appointments, and military actions.
- Introduced command specifications for nation turn commands such as assignments and declarations of war.
- Created a command environment interface to encapsulate command-related parameters.
- Developed a command profile loader to manage default and custom command profiles.
- Established a reserved turn action context to facilitate command execution with necessary context data.
- Updated the default command profile JSON to include new commands and their configurations.
2026-01-01 15:17:30 +00:00
Hide_D cce57d0fea feat: Add new general actions and constraints for game mechanics
- Introduced new general turn commands: 'che_거병', 'che_임관', 'che_건국', 'che_훈련', 'che_사기진작', 'che_요양', 'che_출병', 'che_주민선정', 'che_농지개간', 'che_기술연구', 'che_치안강화', 'che_수비강화', 'che_성벽보수'.
- Implemented action definitions for each new command, including constraints and resolution logic.
- Added new constraints: 'beNeutral', 'remainCityCapacityByMax', 'existsDestNation'.
- Enhanced city development actions for '농지개간', '성벽보수', and '수비강화'.
- Created a new action for declaring war: 'che_선전포고' with appropriate constraints.
- Updated existing action definitions to accommodate new game mechanics and ensure proper functionality.
2026-01-01 11:49:15 +00:00
Hide_D 8c9f61700e feat: Enhance Gateway Orchestrator with preopen and open scheduling, add error handling for paused states, and implement new profile management features 2026-01-01 11:27:10 +00:00
Hide_D e64962c3fd feat: Add Git workspace management for build profiles and implement workspace cleanup 2026-01-01 10:55:07 +00:00
Hide_D b46249dcbc feat: Implement admin router and orchestrator for managing profiles and builds
- Added `adminRouter` for handling profile management, including listing, upserting, and updating statuses.
- Introduced `BuildRunner` interface and `PnpmBuildRunner` class for executing build commands.
- Created `GatewayOrchestrator` to manage profile states, reconcile processes, and handle build queues.
- Implemented `Pm2ProcessManager` for managing processes using PM2.
- Developed `GatewayProfileRepository` for interacting with the database to manage profiles.
- Added utility functions for resolving workspace roots and managing process definitions.
- Included tests for profile reconciliation logic.
2026-01-01 10:38:28 +00:00
Hide_D cc78319948 feat: refactor database client types and update related logic across game engine modules 2025-12-30 12:40:55 +00:00
Hide_D 56e662a7db feat(battle-sim): implement battle simulation logic and metrics tracking
- Added WarBattleMetrics interface to track attacker and defender skills during battles.
- Enhanced WarUnit class with method to log activated skills.
- Introduced environment setup for battle simulation, including unit set loading and configuration resolution.
- Developed in-memory and Redis transport layers for handling battle simulation requests and results.
- Created types and interfaces for battle simulation payloads and responses.
- Implemented battle simulation processing logic, including logging and skill tracking.
- Added tests for battle simulation processor to ensure functionality and correctness.
2025-12-30 11:17:28 +00:00
Hide_D 97439f64a9 feat: add aftermath module with war aftermath logic and related types 2025-12-30 10:40:30 +00:00
Hide_D b0c4f84656 feat: implement war engine with unit types, battle mechanics, and logging
- Added types for war engine configuration, battle input, and outcomes.
- Implemented core war unit classes for generals and cities, including combat logic.
- Introduced utility functions for managing meta data and conflict resolution.
- Developed tests for war triggers and battle resolution scenarios.
2025-12-30 10:25:48 +00:00
Hide_D d599d94a7b feat: add atmos property to General entity and update related logic
- Added `atmos` property to the `General` interface in `entities.ts`.
- Initialized `atmos` to 0 in the `buildGeneralSeeds` function in `bootstrap.ts`.
- Updated exports in `index.ts` to include `unitSet.js`.
- Introduced new types for crew types and their requirements in `types.ts`.
- Implemented `unitSetLoader.ts` for loading unit set definitions from JSON files.
- Created `che_징병.ts` action for recruiting crew types with cost and training calculations.
- Developed `unitSet.ts` for handling crew type availability and requirements.
- Added tests for crew type availability and unit set parsing in `crewType.test.ts`.
2025-12-30 09:45:51 +00:00
Hide_D e3bbbd3718 feat: refactor DatabaseClient interface and add db module 2025-12-30 08:38:45 +00:00
Hide_D c5cba31418 feat: add siegetank unit set and implement messaging system
- Created a new unit set for "siegetank" with various crew types and their attributes.
- Implemented a messaging system with types, payloads, and storage functionality.
- Added tests for the messaging system to ensure correct behavior for different message types (private, national, public, diplomacy).
2025-12-30 08:19:10 +00:00
Hide_D 519a0a76cb feat: add troop model and integrate troop handling in game logic 2025-12-30 05:41:16 +00:00
Hide_D 648d186428 refactor: simplify imports for game session token and turn command modules 2025-12-30 04:54:39 +00:00
Hide_D 6fe6d54432 feat: add GeneralTurn and NationTurn models with CRUD operations
- Introduced GeneralTurn and NationTurn models in Prisma schema.
- Implemented reserved turns management in the game API, including loading, setting, and shifting turns for generals and nations.
- Created unit tests for reserved turns functionality to ensure correctness.
- Developed reserved turn handler to process actions based on reserved turns.
- Established in-memory storage for reserved turns with persistence to the database.
2025-12-30 04:45:07 +00:00
Hide_D 7b719f00de chore: update package dependencies for improved compatibility and performance 2025-12-30 03:58:18 +00:00
Hide_D 0c1e27ee4a feat: integrate Kakao OAuth for user authentication and enhance user repository
- Added Kakao OAuth client implementation for handling authentication flows.
- Updated user repository to support OAuth-based user creation and retrieval.
- Introduced Redis-based session management for OAuth sessions.
- Enhanced in-memory user repository to handle OAuth user data.
- Updated environment configuration files to include new OAuth settings.
- Modified API routes to support Kakao login and registration flows.
- Added Prisma schema updates for user model to accommodate OAuth fields.
- Implemented tests for the new authentication flow and user repository methods.
2025-12-30 02:19:32 +00:00
Hide_D f01a21f2f0 feat: implement user session management with Redis and add game token verification 2025-12-30 01:55:40 +00:00
Hide_D a650fc2daa feat: add JosaUtil for Korean grammatical handling in 의병모집 and 인재탐색 actions 2025-12-30 00:11:25 +00:00
Hide_D 30de11797b feat: update typecheck script for incremental compilation and add JosaUtil for Korean postposition handling 2025-12-29 12:50:45 +00:00
Hide_D cd43445e4b feat: add 발령 (Assignment) and 포상 (Award) actions for generals, and implement 휴식 (Rest) action 2025-12-29 12:26:58 +00:00
Hide_D 69be22749d feat: add 휴식 (Rest) action for generals 2025-12-29 12:11:05 +00:00
Hide_D 0e0ae82e03 feat: add 인재탐색 및 의병모집 기능 구현 2025-12-29 11:59:00 +00:00
Hide_D ee719df8fe feat: add 화계 (Fire Attack) action for generals
- Implemented the 화계 action in the general turn actions, allowing generals to perform sabotage on enemy cities.
- Created CommandResolver and ActionResolver classes to handle the logic and resolution of the action.
- Added necessary constraints to ensure valid conditions for executing the action, including checks for city occupation and resource requirements.
- Updated the general action index to include the new 화계 action.
- Introduced evaluation functions for constraints to manage action prerequisites effectively.
- Enhanced logging for successful and failed attempts of the 화계 action, providing detailed feedback on outcomes.
2025-12-29 09:38:32 +00:00
Hide_D 27cc016804 feat: 로그 시스템 구현 및 관련 클래스 추가 2025-12-29 08:40:01 +00:00