Commit Graph

83 Commits

Author SHA1 Message Date
hypercross 0d7a84edee test: update desert triggers test to use onEffectApplied 2026-04-23 01:04:27 +08:00
hypercross 63e55a828e refactor: rename entityKey to entityId in combat triggers
Rename `entityKey` and `sourceEntityKey` to `entityId` and
`sourceEntityId` across the slay-the-spire-like sample to improve
naming consistency with the rest of the project.
2026-04-23 00:38:10 +08:00
hypercross f4c96a4a72 refactor: update turn start triggers in desert sample
Fixes logic in `defendNext` to ensure effects are applied after
buff updates by calling `next()` before mutation. Also updates
indentation and formatting to match project style guidelines.
2026-04-22 20:13:31 +08:00
hypercross a5e2e4888e refactor(slay-the-spire-like): update combat targeting and effect logic
Refactor combat targeting types and effect application logic in the
Slay the Spire-like sample.

- Update `getEffectTargets` to use `IntentEffectTarget` and more
  descriptive target keys (e.g., `eachEnemy`, `randomEnemy`).
- Update `promptMainAction` to use `enemy` instead of `single` for
  card target types.
- Refactor `addInstantEffectTriggers` to remove unused effect loading
  and improve enemy/card instantiation logic
2026-04-22 19:35:37 +08:00
hypercross 5235ba7def feat(slay-the-spire-like): support source entity in effect targeting
Update `getEffectTargets` to accept a `sourceEntityKey`. This allows
"self" targets to correctly resolve to the entity triggering the
effect (e.g., a player or a specific enemy) rather than defaulting
to a hardcoded player reference.
2026-04-22 08:56:06 +08:00
hypercross 270b9b744e refactor(slay-the-spire-like): rename getNeighborItems to
getAdjacentItems
2026-04-21 23:22:19 +08:00
hypercross 093738cd42 test: expand shape-utils coverage and refactor style 2026-04-21 23:01:26 +08:00
hypercross 2ec0e323c4 test: fix type assertion in grid-inventory tests 2026-04-20 16:32:57 +08:00
hypercross 140b7aed86 test: add createItemIn tests for grid-inventory 2026-04-20 16:28:14 +08:00
hypercross 34cb828f60 test: refactor and format test files
- Update `game.test.ts` to use `_ctx` when `this` is not required
- Fix type assertion in `boop.test.ts`
- Update `command-runner.test.ts` to use `parseCommandSchema` in prompt
  tests
- Reformat `middleware.test.ts` to use double quotes and consistent
  indentation
2026-04-20 15:50:32 +08:00
hypercross 974c1a828c test: reformat and expand test coverage 2026-04-20 15:37:15 +08:00
hypercross b83ff28f60 style: format tic-tac-toe sample and boop tests 2026-04-20 15:19:27 +08:00
hypercross 0c94e6923a test: reformat tests to use double quotes and improve style 2026-04-20 15:16:03 +08:00
hypercross 52b6cecd64 refactor(slay-the-spire-like): update GameItemMeta import path and
reformat tests

Update imports for `GameItemMeta` from `progress/types` to
`encounter/types`
in combat and deck tests. Reformat `deck/factory.test.ts` to use double
quotes and consistent indentation.
2026-04-20 13:01:40 +08:00
hypercross 88d31430a6 test: refactor slay-the-spire-like combat tests
Update combat effect tests to use the new transform offset structure
and fix type mismatches in entity and inventory creation.
2026-04-20 11:37:18 +08:00
hypercross 5e172c61bb refactor(slay-the-spire-like): use IRunContext in combat system
Update the combat system to use `IRunContext` instead of passing
raw inventory objects. This provides a cleaner abstraction for
accessing item data and managing consumed uses.

- Update `canPlayCard` and `payCardCost` to use `IRunContext`
- Pass `IRunContext` through the trigger registration chain
- Fix logic in `canPlayCard` for "uses" cost validation
- Update combat effect tests to use a mock `IRunContext`
2026-04-20 11:25:52 +08:00
hypercross 9bed2ca13e refactor(slay-the-spire-like): rename depletion to consumedUses
Rename `depletion` to `consumedUses` in `GameItemMeta` to better reflect
its purpose. Update combat effect logic and tests to use the new field
name. Also apply consistent formatting and import organization to
combat effect modules.
2026-04-20 10:28:58 +08:00
hypercross 08c6a67d16 refactor: use English IDs for desert card effects
Replace Chinese card names with English IDs in the desert card effect
CSV to ensure consistency with the card identifiers. Update tests to
verify the data import using the new English identifiers.
2026-04-20 00:23:41 +08:00
hypercross 2f2e4e56b5 refactor: decouple card effects from card data in desert sample
Moves card effects from `card.csv` to a dedicated `cardEffect.csv` file.
This allows for more granular control over card triggers (onPlay,
onDraw, onDiscard) and targets, improving the data model for the
slay-the-spire-like sample. Also updates triggers and tests to
reflect this new structure.
2026-04-20 00:00:41 +08:00
hypercross 3840c3d739 test: expand slay-the-spire-like map generator tests 2026-04-20 00:00:41 +08:00
hypercross 4f5747d81d chore: tests for desert triggers 2026-04-17 18:07:49 +08:00
hypercross fb66ec55c4 feat: cost implementation for card play 2026-04-17 14:10:28 +08:00
hypercross 8155747cac chore: tests for effects and middleware 2026-04-17 13:48:18 +08:00
hypercross 7601a97ec9 chore: non-combat tests update 2026-04-17 12:58:29 +08:00
hypercross 4deebf67c3 chore: remove old tests 2026-04-17 10:20:04 +08:00
hyper 51da1e5308 fix: update tests 2026-04-16 18:33:13 +08:00
hypercross 94c7c91745 feat: slay-the-spire-like combat procedures 2026-04-16 14:00:49 +08:00
hypercross 6984e54bdf refactor: add status cards and rules. 2026-04-15 16:28:18 +08:00
hypercross 7b954bb5a5 refactor: add more effect 2026-04-15 15:41:20 +08:00
hypercross 7472095822 refactor: add team effect 2026-04-15 15:21:44 +08:00
hypercross e5da41c1cb refactor: op -> player 2026-04-15 15:19:58 +08:00
hypercross 509e121275 refactor: add timing to effect 2026-04-15 15:16:45 +08:00
hypercross e77e2d0737 refactor: self-referencing intent table! 2026-04-15 14:59:34 +08:00
hypercross 09148f5b13 refactor: update inline-schema to import accessors 2026-04-15 14:56:48 +08:00
hypercross 33095d5226 chore: add tests for data loading 2026-04-15 13:27:12 +08:00
hypercross 5860f2a247 feat: upgrade yarn-spinner-loader to 0.2.0 and add encounters.yarnproject test 2026-04-15 10:19:03 +08:00
hypercross 760cfc9954 feat: deck generation 2026-04-14 15:46:08 +08:00
hypercross 4fbd65e98c fix: encounter data assignment 2026-04-14 14:35:23 +08:00
hyper ef9557cba7 refactor: minimize repetitions 2026-04-13 21:18:06 +08:00
hyper 5d1dc487f8 refactor: map gen? 2026-04-13 19:06:37 +08:00
hypercross 06a2236a1d refactor: redesign map gen 2026-04-13 14:56:33 +08:00
hypercross fe361dc877 fix: avoid paths corssing each other 2026-04-13 12:56:39 +08:00
hypercross 88eeee6ab7 feat: add encounter map 2026-04-13 11:59:56 +08:00
hypercross 2a4383ff10 feat: add grid-inventory 2026-04-13 11:07:57 +08:00
hyper 4bfc6db60f chore: add data import test 2026-04-12 21:04:38 +08:00
hyper 238254c4e5 chore: add tests for shape stuff 2026-04-12 20:51:19 +08:00
hyper 617057988d feat: regicide full 2026-04-10 13:43:12 +08:00
hypercross 244a8bb35a fix: onitama win con 2026-04-08 12:25:50 +08:00
hypercross 91c993b223 refactor: clean up boop implementation structure 2026-04-07 15:43:17 +08:00
hypercross 10393f45b6 refactor: add rng & seeding 2026-04-07 15:32:06 +08:00