Commit Graph

8 Commits

Author SHA1 Message Date
hypercross 113d240f71 refactor: simplify item effect handling in grid inventory
Update `getItemEffects` to directly use `startEffects` from item meta
instead of performing a manual lookup against the effect table. This
is made possible by updating `GameItemMeta` to store the full effect
object (data and stacks) instead of just the effect ID and stack count.
2026-04-21 23:17:19 +08:00
hypercross 0547180074 feat(slay-the-spire-like): add getItemEffects to grid inventory 2026-04-21 23:15:02 +08:00
hypercross 97ff61985a refactor(slay-the-spire-like): clean up barrel exports and formatting
- Convert explicit barrel exports to `export *` patterns in several
  systems
- Create a new `utils/index.ts` barrel for the system utils
- Rename `validatePlacement` to `validateShapePlacement` for clarity
- Reformat `shape-collision.ts` to use 2-space indentation and
  consistent
  styling
- Fix import paths in `index.ts`
2026-04-21 23:01:19 +08:00
hypercross b509284bc6 refactor(slay-the-spire-like): simplify exports and reorganize system
Clean up the sample's entry point by using barrel exports and move
encounter logic into the grid-inventory factory to reduce duplication
and improve module structure.
2026-04-21 22:57:28 +08:00
hypercross ca9912a5f5 feat(slay-the-spire-like): add automatic item placement to grid
inventory

Introduce `createItemIn` to automatically find the first valid
placement for a new item within the grid inventory.
2026-04-20 16:24:33 +08:00
hypercross f336a989e2 refactor(slay-the-spire-like): restructure encounter and progress
systems

Refactor the sample game logic by moving encounter-related logic from
the monolithic `progress` system into a dedicated `encounter` module.
This includes:

- Moving combat state construction and run state management to
  `system/encounter`.
- Decoupling player stats and inventory from the general progress
  logic.
- Improving type safety for `EncounterData` using generics.
- Adding navigation helpers to the map system.
- Cleaning up imports and improving code formatting.
2026-04-20 13:00:30 +08:00
hypercross 3a135a4ad1 refactor: reorg 2026-04-17 11:06:09 +08:00
hypercross 3f3490fad8 refactor: reorg 2026-04-17 01:05:48 +08:00