cards and lot of

This commit is contained in:
33333-33333 2026-06-07 22:04:17 +09:00
commit ca40a0cb73
13 changed files with 624 additions and 92 deletions

View file

@ -1,25 +1,40 @@
# Chick Sorter v14.0 Zunda Tax / Resale
# Chick Sorter v16.1 Card Target Overlay Fix
## Changes in this build
- Changed Egg Farm build price to `¥250`.
- Replaced the previous daily Fairies fee with `ZUNDA TAX`, paid when `Next Day` is pressed.
- `ZUNDA TAX` taxes only cash above `¥500`: `ceil((cash - 500) × rate)`, with 5% added per `¥500` band and a 95% cap.
- Removing equipment from a previous Build phase now sells it for 50% of its build price; same-Build removals still refund 100%.
- Removed visible `STOPPED` text/highlight. Blocked chicks simply stay still.
- Removed route-overlay arrows/colored flow arrows. Conveyor movement is now shown by small direction triangles inside belt tiles.
- Moved the starter S1 position lower so the Egg Farm and S1 have more distance.
- Moved the Truck to the bottom side of the grid and connected the starter S2-to-Truck belt to the new receiver.
- Made scanner and facility ports strict: a belt must occupy the exact port cell to count as connected.
- Expanded `Next Day` validation to scanner inputs/outputs and planned output routes, not just machine receiver cells.
- Build buttons for unaffordable equipment, or already-built unique machines, are disabled and visually faded.
- Removed Close buttons from clicked-equipment/upgrade popovers. Click outside the popover to close it.
- Kept `src/index.html` and `src/styles.css` removed; the project uses the root `index.html` and `styles.css` only.
- Continued centralized price/income/fine/facility definitions in `src/core/config.js`, shared text in `src/core/text.js`, and economy logic in `src/systems/economy.js`.
This build refines the v15 card and tax system.
## Structure ideas for the next cleanup pass
- Move HTML button content to a data-rendered build panel instead of hard-coded markup.
- Give every equipment object a `defId`, so runtime state never duplicates names, prices, sizes, or upgrade rules.
- Store routes as cell arrays and convert to pixel paths only at movement/draw time.
- Cache route plans per build session, then invalidate once on build/erase/drag instead of recomputing every draw.
- Split route validation into errors and warnings, so optional/unused equipment can be supported later without blocking the day.
- Remove legacy fallback paths after save compatibility is no longer needed.
## v16.1 changes
- Fixed equipment improvement target-picking overlay by importing the target bounds helper into the renderer.
- Non-candidate equipment now receives a full dark overlay, and valid upgrade candidates are explicitly white-highlighted.
- Added a fallback message when a target picker has no valid target, so the game no longer appears frozen.
## v16 changes
- `Extra Cards` is now immediate.
- Selecting it consumes the current card pick, then grants 2 more card selections in the same draft.
- It no longer increases future draft size.
- Equipment improvement cards now target machines on the map.
- Valid targets are highlighted in white.
- Non-target areas are darkened.
- Click a highlighted machine to apply the upgrade.
- `Esc` cancels target selection and returns to the card draft.
- ZUNDA TAX and Fairies tribute no longer contaminate the next day’s profit display.
- They are still paid when `Next Day` is pressed.
- They still affect cash and total outflow.
- They are not counted inside the new day’s `Turn Profit`.
- ZUNDA TAX exemption / Legal Work behavior was rechecked and kept explicit.
- Base exemption: ¥500.
- `Legal Work`: exemption +¥250 and 95% cap point +¥250.
- Tax rate: 5% from the first yen above the exemption.
- +5% per ¥500 taxable band.
- Maximum rate: 95%.
- EGG FARM price remains ¥250.
## Active ZUNDA TAX formula
```text
taxable = max(0, cash - exemption)
rate = min(95%, ceil(taxable / 500) × 5%)
ZUNDA TAX = ceil(taxable × rate)
```
With no `Legal Work`, `exemption = ¥500`, so ¥501 starts at 5% and ¥10,000 reaches 95%.