Commit Graph

34 Commits

Author SHA1 Message Date
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