Commit Graph
134 Commits
Author SHA1 Message Date
wushenghua 529cdeb641 fix(s5-buoy): defer buoy row refresh on real-touch start/partial tap
_on_buoy() rebuilt the side rows synchronously inside Button.pressed for the
start and partial-tap branches, freeing the emitting row mid-emission and
crashing Godot with a SIGSEGV under real InputEventScreenTouch. Defer only
those two _refresh_side calls; start/tap/save/claim order and the completed
path through _on_lowfreq_result are unchanged.

Extend ch_systems_touch_test.gd lifecycle mode to cover buoy start, a partial
tap with save/live agreement, and completion via _on_lowfreq_result. Each tap
re-discovers the live row rect after the deferred rebuild so no freed
coordinate is reused. Full 72-step matrix is unchanged.
2026-11-29 09:50:32 +08:00
wushenghua dbbf68ac24 fix(s5-side-claims): defer refresh/modal pair on real-touch claims
Real InputEventScreenTouch on partner, record and LowFreq rows freed the
emitting Button inside Button.pressed via synchronous _refresh_side(), causing
SIGSEGV. Defer the exact refresh/modal pair, matching the existing market
handler. Add a probe-only side-row rect helper, extend the real-touch harness
to 360/390/430 x zh/en x normal/reduced with modal-back, save/live and
exactly-once assertions, and add focused lifecycle + matrix runners with
fake HOME, exclusive save, dev:inode binding and hard watchdog.
2026-11-29 09:32:20 +08:00
wushenghua 5426c636a6 test(world-next): allow expected S5/S6 live service field diffs
WN RUN1 at the integration HEAD produced WN_FAIL 72: the only differing keys
in diff_return/diff_saved were the new autoclick/clickable dicts. Analysis
proved the changes are autoclick.timer/service_ticks and clickable.phase
advancing per frame -- expected live service state, not reward/wallet/routing
side effects. The probe now explicitly allows only those two fields, records
'diff_allow_note: new S5/S6 service fields expected', and keeps exact equality
for every other gameplay field. Original FAIL evidence is preserved.
2026-11-29 08:50:15 +08:00
wushenghua f35835d224 fix(ch-systems): make guild actions reachable at 360px en_US
- wrap side summary/empty-hint labels so long en_US strings no longer widen the column and push Hire/Buy/Send outside the viewport
- use concise localized tab captions (Guild / Bounties)
- reject off-viewport targets in the real ScreenTouch probe
- re-verified: strict import, domain, 36-case touch matrix, save corruption, parity
2026-11-29 08:45:20 +08:00
wushenghua 348a36e168 test(evidence): bind UI 48-shot capture revision to integration HEAD 2026-11-29 08:25:48 +08:00
wushenghua dff581fdd3 S4: source-bound CH relic/gild book with lifecycle-safe market touch
Defer _refresh_side/_side_result_modal out of the Button.pressed signal so
_clear_children no longer frees the emitting button mid-emission (SIGSEGV).
Additive v7 profile book, explicit CH->WR adapter, Python/GD parity, real
ScreenTouch and save-corruption gates.
2026-11-29 08:24:27 +08:00
wushenghua 34989d898d S3: port CH transcendence/outsider slice into WR new sky
Source-bound Ancient Soul wallet codec, outsider definitions/levels/bonuses,
TP and sacrifice math from clicker_heroes_rebuild @46cc8ad. Additive schema v7
fields with provenance; WR sky_marks/edicts left untouched. Save-first,
exactly-once claim, strict import, migration and real ScreenTouch probes.
2026-11-29 08:23:12 +08:00
wushenghua 4f4b7d918a fix(ui): polish skill bar, victory modal, 360px underlines and raw keys
- battle manual actions now share one skill bar backing with accent rules and
  dividers; button rects, mouse_filter and callbacks unchanged
- victory/dialog panel is opaque with a darker dim so battle chrome no longer
  shows through; action labels and 44px hit areas unchanged
- idle underline and tab baselines brightened/thickened for 360px readability
- UiText.node_name() falls back to localized chapter theme + node number, so
  full-game nodes no longer render [content.node.*] raw keys; locale keys intact

Evidence: 9ba98ef-polish before/after runtime captures, strict import and
focused touch/UI regressions all PASS. No merge, push or release.
2026-11-29 08:23:08 +08:00
wushenghua 9ba98ef060 fix(ui): sync bottom nav highlight on every show_page() route
Move the visual-only _refresh_nav_tabs() call into show_page() right after
current_page is updated, so World/settlement/battle-exit and other non-tab
routes cannot leave a stale tab highlight. Remove the now-redundant call
from _on_nav(); routing, hit areas, text, economy, save and other visuals
are untouched.

Add retaken zh/en key screenshots (360/390/430, world/victory/battle) under
ui_language_captures/c85337e-navfix and record fix + evidence in HANDOFF.
Local candidate only; no merge/push/package/sign/release.
2026-11-29 00:15:44 +08:00
wushenghua 0cf7c6117d feat(ui): give primary CTA nine-slice material and readable secondary states 2026-11-29 00:15:40 +08:00
wushenghua 2f71468719 feat(ui): visual-language candidate — quiet secondary actions, tab chrome, skill slots 2026-11-29 00:15:37 +08:00
wushenghua 1e11038a6a test(ui-motion): report actual _check count instead of hard-coded 14 2026-11-28 17:44:30 +08:00
wushenghua ec7af90d5b fix(ui-motion): central tween tracking, cancel on eviction, low-power breathing 2026-11-28 17:44:30 +08:00
wushenghua 0a1b7f2c99 S8: wire CH-source H07-H09 hero numbers via labelled positional adapter
- Add explicit Windroost adaptation contract and provenance sidecar
  (H01..H09 -> CH ids 1..9 positional, NOT a native crosswalk).
- Serve H07/H08/H09 base DPS from CH @46cc8ad authority via
  ChHeroAdapter at WR hero level (1..199 identity domain; hard-fail
  outside it) and consume it in HeroSkillLoader (py + gd).
- Keep H01-H06 paths byte-identical; H10-H54 stay Pending;
  no skill coefficients, counters, zones or rewards invented.
- Sync A5 disposition map with the current lexical consumer scan.
- Add py<->gd parity, real ScreenTouch training/battle probes and a
  fake-HOME / exclusive-save / dev:inode / watchdog runner.
2026-11-28 13:32:49 +08:00
wushenghua 4de5cdbd6e S2: port CH offline anchor/receipt book into profile store 2026-11-28 12:26:26 +08:00
wushenghua d69b903f33 Fix battle HUD label clipping at narrow English widths 2026-11-28 11:55:36 +08:00
wushenghua dadf368b16 S1: port CH ascension soul reward into Windroost prestige
Source-bound to clicker_heroes_rebuild_ancient_limit_build25 @ 46cc8ad:
level_reward=floor(levels/2000), primal guarantee 100..1000 + 110/120/130,
SoulWallet.ascended wallet semantics and Amenhotep required_level=150.
Adds schema v5 soul fields with additive v1-v4 migration, exactly-once
claim, a second reward line in the prestige preview, and focused domain
and real-ScreenTouch runners.
2026-11-28 11:55:36 +08:00
wushenghua 0da978ab9b fix(world): auto-select next node after world-victory settlement return 2026-11-28 11:55:36 +08:00
wushenghua 2c0406b6cd U2: wire accepted U1 visual layer into shipped GameRoot entries 2026-11-28 02:32:17 +08:00
wushenghua 49059fe15e A5: add authority-first CH consumer adapter and fail-fast disposition gate
- add ch_runtime_content.py/.gd: patched pointers require real level/zone;
  unmappable families (C004/C050/C053/C054) raise instead of guessing
- remove field_map.counts silent product-literal fallback in ch_authority.py
- label frozen launch fixture source; add disposition map and G5 gate
- keep UI, battle HUD, locale, OPEN items and gameplay literals untouched

G3 12/12, G4 9 families/160 pointers/open 8, G5 92 dispositions PASS
2026-11-28 02:05:28 +08:00
wushenghua 553d882441 test: add focused normal/reduced battle screenshots
Real-display 390x844 zh_CN captures of the adjudicated battle HUD with target indicator and layered enemy plates; normal + reduced_motion.
2026-11-28 01:44:09 +08:00
wushenghua c6ba4708ac feat: battle feel presentation layer (R1/R4, target, victory timeline)
Adjudicated presentation-only changes:
- R1: triple target indicator (glyph + word + gold outline) and rule copy; auto DPS targeting and damage multipliers untouched.
- R4/CD-2: energy starts 0, flat +5 only for effective manual HP-damaging clicks, capped 100; auto DPS, storm, ultimate, absorbed and scripted fixture clicks excluded.
- Hide battle bottom tab; layered enemy HP/shield/weakness read-outs with remaining shield ratio.
- Authoritative result -> death hold -> banner -> reward roll -> CTA timeline with reduced_motion compression and external-progress single emit.
- Add battle_feel_runner with real ScreenTouch matrix and 237 focused checks (40 cells).
2026-11-28 01:44:09 +08:00
wushenghua 796ca6840d U1 UI slice: Skyport/World/Settlement shells with fixed CTA dock
Additive UI vertical slice on baseline 28e8247. Owned scope only: page
shells, PrimaryCTADock, UiTheme helpers, U1 probe/capture runner and
evidence. No battle, numeric, save or locale files touched.

48 real-render shots: 360/390/430 x zh/en x normal/reduced, plus
scrolled/locked/defeat states. Real InputEventScreenTouch fires the CTA
and changes world node selection; >=48px tap targets, fixed CTA position
across scroll, no missing text keys, no SCRIPT ERROR.
2026-11-28 01:44:08 +08:00
wushenghua 341ff7dbb0 fix: enforce strict sidecar priority and report direct consumers 2026-11-28 01:44:08 +08:00
wushenghua c7f812c9a8 feat: bind CH numeric authority (A4) to runtime data and consumers 2026-11-28 01:44:08 +08:00
wushenghua 28e824763b improve: battle action clarity, visible feedback, explicit exit
Owner feedback: too few visible animations, button rows feel list-like, battle
actions unclear, and tapping a bottom tab silently left the fight.

- Battle manual actions now have icons and three distinct weights: sword =
  repeated hit (brass primary), bolt = storm (quiet), fireball = ultimate
  (purple special). A "tight" icon-button mode keeps all three plus dynamic
  cooldown/energy text inside the 358px row (verified by geometry probe).
- Added an always-visible flagged "退出战斗" button in the battle header; the
  stage hint now reads "tap enemy to retarget / buttons below to act".
- Leaving battle via any tab shows a shell-level toast "已离开战斗 · 前往 X"
  so the player knows the fight ended and where they landed.
- Game feel: idle sprites have a 6fps floor (authored 4-frame/3fps idle read as
  frozen), damage numbers get a short overshoot-and-settle pop, and manual-hit
  shake trauma doubled (still small tier). All respect reduced motion/low power.
- New regression assertions: labeled exit button + exit toast; 108 gates pass.

Normal-render capture inspected at 390x844 zh_CN. agent_visual_reviewed only;
owner must confirm on device whether the motion level now feels right.
2026-11-20 14:33:44 +08:00
wushenghua ed8b63e9d3 fix: battle safe area, blank top-right buttons, invisible shell nav
Owner device feedback:
1) Battle top bar sat under the status bar / Dynamic Island. Root cause:
   BattleHud.set_safe_area() was never called by anyone, so its layout rect
   used zero insets. Wired it through BattleScene.set_safe_area() from the
   shell's already-computed _safe_top/_safe_bottom, both at battle presentation
   and on viewport/safe-area change. Test injects 59/34 insets and asserts the
   HUD's resource bar global top equals the inset.
2) Top-right gear and pause rendered as empty boxes: "⚙" and "⏸" are absent
   from the bundled CJK font. Replaced with a gear ICON + "设置" label and a
   "暂停"/"Pause" label; target marker "▼" replaced with a known-good "◆".
   refresh_static_text now keeps these labels localized.
3) Shell bottom nav was completely off-screen (pos.y=844 on an 844-tall
   viewport): PRESET_BOTTOM_WIDE left offset_top=0, so minimum-size growth
   pushed it below the screen. Pin both offsets explicitly (76px bar above the
   home indicator) and grow the page host to match. The first tab also showed
   "[hud.nav.map]" (missing key) -- mapped it to hud.nav.expedition.
   Four tabs now visible on every non-battle page and use the same labels and
   destinations as the battle nav, so page relationships are consistent.

108 gates pass; normal-render captures inspected for battle/skyport/map.
agent_visual_reviewed -- owner must confirm on device.
2026-11-20 13:55:55 +08:00
wushenghua 8918a9cc01 redesign: roll flat dark UI + tab states across all remaining pages
Owner approved the hierarchy/icons direction and asked for every page to be
converted. The first commit only changed skyport/growth; other pages still
used the old gold nine-slice frames.

- UiTheme.build_theme: global PanelContainer/Panel and Button normal/pressed/
  hover/disabled are now flat dark sharp-edged styles (brass reserved for the
  primary action + selected tab). make_panel() switched from frame_style() to
  the flat dark box (its own override was bypassing the global theme).
- UiTheme.tab_style(selected): flat brass/dark tab state. Replaced every
  explicit FRAME_TAB/FRAME_TAB_SELECTED/FRAME_PANEL override across world
  regions/chapters, side tabs, loadout hero tabs, map node actions and battle
  HUD nav. Battle hero cards use a flat card box instead of FRAME_TILE.
- ui_scroll_layout_test now asserts global Button and panel styles are
  StyleBoxFlat so the gold frames cannot silently return.

Inspected normal-render captures: map, world, side, settings, skyport, growth
and battle at 390x844 zh_CN all read consistently; 108 gates pass.
agent_visual_reviewed only -- owner still needs to confirm on device.
2026-11-20 13:33:17 +08:00
wushenghua c9b3817578 redesign: menu UI hierarchy + icons, remove gold-box-everywhere look
Owner rejected the parchment gold-frame UI as ugly after seeing it on device:
every button was an identical thick gold box (primary CTA indistinguishable
from tertiary links), all text, no icons, background buried.

Applied the low-risk direction (reuse existing 32px pixel icons, keep palette):
- UiTheme.make_menu_button: three tiers (primary filled brass banner / secondary
  dark icon+label row / quiet text link), sharp flat pixel-grid-safe styles,
  consistent icon slot, PASS for scroll drags. Overrides disabled stylebox too
  (the theme's gold frame was reappearing on every unaffordable button).
- UiTheme.make_status_strip: quiet translucent header instead of a gold panel.
- Skyport menu: sword=expedition (primary), bolt=endless, hammer=rebuild,
  leaf=growth, flag=world, gear=side, bow=loadout, prestige=quiet link.
- Growth page star/talent/back buttons use the quiet secondary style.
- Removed _refresh_skyport's per-refresh gold FRAME_BUTTON stylebox override;
  affordability is now text color + dimming only.

Verified by normal-render capture at 390x844 zh_CN (p3a_skyport, p3a_growth),
visually inspected before/after; 108 gates pass. This is agent_visual_reviewed,
not human_reviewed -- owner must confirm on device.
2026-11-20 13:18:44 +08:00
wushenghua 4d8d8582b8 fix: mobile UI/UX - list scroll, safe area, text overflow, battle top-right
Owner device feedback after seeing parchment skin:
- Lists could not scroll when the finger started on a button/frame; only blank
  areas scrolled. Root cause: buttons/panels defaulted to MOUSE_FILTER_STOP and
  swallowed drags. make_button/make_panel/glass_panel now use MOUSE_FILTER_PASS
  (still tappable, but drags bubble to the parent ScrollContainer).
- Header pushed ~quarter screen down: safe area subtracted window_get_position()
  (Godot 4 get_display_safe_area() is already in window coords). Now uses the
  rect directly and clamps insets to sane bounds (top<=96, bottom<=64).
- Growth page talent buttons overflowed: 4-in-a-row HBox squeezed labels. Now a
  2-column GridContainer with wider buttons; star button widened to 150px;
  buttons get an 8px content margin so text no longer touches the frame.
- Battle top-right had no text: the timer Label was created empty and never
  assigned. Added an always-on info label (enemy count / boss name) and populate
  the countdown text when a timer is visible.
- New ui_scroll_layout_test gate asserts button/panel PASS filters, 2-col grid,
  and non-empty battle top-right info. 108 gates pass.

Owner must re-verify on device; these are automated_verified, not human_reviewed.
2026-11-20 13:00:03 +08:00
wushenghua 5049ebec64 chore: commit leftover skin text keys + reenter-battle regression
Settings-page skin labels and the earlier palette-based skin generator were
left uncommitted from the parchment skin work. Also strengthens battle_exit_test
to assert re-entering battle restores a visible HUD layer (hiding must not be
permanent). 107 gates pass.
2026-11-20 12:17:18 +08:00
wushenghua 58fc81f95b fix: battle CanvasLayer HUD kept covering destination page after nav tap (ROOT CAUSE)
Owner: nav taps seemed to do nothing, battle stuck. Device diagnostic log proved
taps reached buttons AND exit_requested fired AND current_page changed -- yet the
screen stayed on the fight. Root cause: the BattleHud lives in a CanvasLayer
(HUDLayer) which renders ABOVE all normal Control nodes; hiding _battle_host
(visible=false) does NOT hide a CanvasLayer, so the fight kept covering the new
page. current_page changed but the visible screen never did.

- show_page / on_battle_exit now explicitly hide the HUDLayer CanvasLayer and
  the HUD Control, and stop battle process, on every exit path (nav, finish,
  pause-exit). Re-entry builds a fresh visible HUD.
- battle_exit_test asserts hud_layer_visible=false after each of the 4 tabs ->
  distinct pages. 107 gates pass.
- Kept small user://nav_taps.log diagnostics (tap/exit_req/after_exit) for
  future on-device verification; no gameplay effect.

Owner will re-verify on device when phone is available. prototype/ untracked.
2026-11-20 10:11:16 +08:00
wushenghua 91e24a0de0 fix: overlapping nav bars + leftover modal made battle tabs dead on device
Owner: bottom tabs do nothing and battle seems stuck. Code investigation found
TWO overlapping full-width nav bars during battle:
- game_root's ShellBottomNav (always visible, PRESET_BOTTOM_WIDE) AND
- battle_hud's own nav bar (expedition/company/skyport/archive).
Taps hit the ambiguous top bar; a leftover full-screen shell modal (STOP dim)
could also swallow all taps.

- _present_battle now hides the shell nav + header + any leftover modal;
  show_page restores them when leaving battle.
- Named ShellBottomNav; battle_chrome_state_for_test asserts shell chrome hidden
  during battle; battle_exit_test verifies all 4 tabs still reach distinct pages.
- 107 gates pass; rebuilt + installed on iPhonewsh.

Owner must confirm on device: now only the battle HUD tabs show, each navigates,
battle is not stuck. prototype/ untracked.
2026-11-20 09:10:58 +08:00
wushenghua 3e504bd517 fix: battle nav tabs now go to distinct pages (all four previously exited to skyport)
Owner asked what the 4 bottom tabs in battle do. Investigation: battle_hud emits
nav_requested(page) with expedition/company/skyport/archive, but the previous
fix made _on_nav_requested emit exit_requested for ALL of them -> every tab did
the exact same thing (exit to skyport), which looked like "nothing works".

- exit_requested now carries the page; game_root maps expedition->map,
  company->growth, archive->side, skyport->skyport.
- battle_exit_test verifies all four tabs reach distinct pages.
- 107 gates pass; rebuilt + installed on iPhonewsh.

Owner must confirm the tabs visibly navigate on device. prototype/ untracked.
2026-11-20 08:58:12 +08:00
wushenghua 35d801b69b feat: parchment UI skin (owner chose #2) + in-game skin switcher
Owner reviewed a 4-skin comparison sheet and chose the parchment+brass skin
(matches the design doc's "parchment cards + brass frames + wind engravings").

- Generated 4 AI skin candidates; converted the chosen one into a clean
  48x48 nine-slice set (7 frames: panel/button/pressed/tab/tab_selected/tile/
  stage) with flat center so nine-slice stretching never smears.
- UiTheme.build_theme(skin) + skin_path(): frames resolve to assets/skins/<skin>/
  with default fallback; make_panel/frame_style follow the active skin.
- profile.ui_skin field (validated); parchment is the new default so the
  player sees it immediately; settings page "skin" row cycles default<->parchment
  and reloads the scene so baked styleboxes rebuild.
- skin_test PASS (profile field, skin_path remap, all 7 frames exist,
  build_theme works). 107 gates pass; rebuilt + installed on iPhonewsh.

Art generation cost: 4 gpt-image-2.6 1K calls (1 candidate chosen). All source
AI images + conversion tools + comparison sheet committed for traceability.
prototype/ untracked.
2026-11-20 08:48:41 +08:00
wushenghua aa75c114ef fix: battle screen inescapable on device (nav/exit buttons were no-ops)
Owner screenshot of a live battle: could not leave the page. Root cause:
battle_scene._on_nav_requested() was `pass`, so BOTH the pause-menu "exit"
button and all bottom nav buttons emitted nav_requested but did nothing.

- battle_scene: add exit_requested signal; emit it from _on_nav_requested.
- game_root: connect exit_requested, stop battle, hide host, return to skyport.
- battle_exit_test PASS: enter battle -> exit -> back to skyport; registered as
  a gate to prevent regression.
- 106 gates pass; rebuilt, signed, reinstalled on iPhonewsh.

Owner must confirm the exit buttons now work on device. prototype/ untracked.
2026-11-20 00:56:15 +08:00
wushenghua 43539b61c6 fix: modal labels tofu on iOS -- CanvasLayer breaks theme inheritance
Owner's device screenshots: battle reward modal and offline report modal showed
all Chinese as tofu boxes, while normal pages and battle HUD rendered fine.
Root cause: modals live in a separate CanvasLayer (layer 10) to draw above the
battle HUD; CanvasLayer breaks Control theme inheritance, so modal labels never
received the bundled CJK font that the shell root uses.

- Cache shell theme in _shell_theme; assign _modal.theme explicitly in
  _build_modal so all modal labels/buttons inherit the CJK font.
- 105 gates pass; rebuilt, signed, reinstalled, relaunched on iPhonewsh.

Owner must confirm modal text now renders and buttons are tappable. If touch
still fails, it is a separate input-layer issue to trace. prototype/ untracked.
2026-11-20 00:06:40 +08:00
wushenghua 129b1a24fa fix: respect iOS safe area in shell UI (Dynamic Island / status bar / home bar)
Owner's device screenshot showed the header hidden behind the Dynamic Island
and buttons running into the bottom home-indicator area. The battle HUD had a
safe-area hook but the shell (game_root) did not.

- game_root reads DisplayServer.get_display_safe_area(), computes top/bottom
  insets, and insets header/page_host/bottom nav accordingly; on desktop the
  inset is 0 so this is a no-op. Reconnects on viewport size change (rotation).
- 105 gates pass; rebuilt, signed, reinstalled and relaunched on iPhonewsh.

Owner must visually confirm the notch/status bar and home bar no longer overlap
UI. prototype/ untracked.
2026-11-19 23:59:54 +08:00
wushenghua 5b15269be1 fix: ship CJK font so text renders on iOS (device screenshot showed blank labels)
Owner photographed the physical iPhone: icons and pixel background rendered,
but ALL text was blank. Root cause: ui_theme used SystemFont with macOS font
names (PingFang SC etc.); iOS has no matching family, so every label was empty.

- Bundled NotoSansSC-Bold.fontdata (7.6MB, 30890 glyphs, already verified on
  iPhone in the autoknights project) at assets/fonts/.
- build_font() now preloads that real FontFile instead of SystemFont.
- Rebuilt (ios_device_build.sh PASS), re-signed, reinstalled and relaunched on
  iPhonewsh (iOS 26.7.2); 105 gates still pass (no local text-layout regression).

This is a real device-found fix. Owner must confirm text now renders on screen;
command success does not prove visual correctness. prototype/ untracked.
2026-11-19 23:51:04 +08:00
wushenghua 2974d0207e fix: BigValue encoded() uses str() to match GDScript (save parity) 2026-11-19 23:19:10 +08:00
wushenghua 2765468525 feat: standalone endless expedition page (replaces modal)
The endless mode UI was a transient modal -- poor for an idle game the player
watches. Now a persistent PAGE_ENDLESS (like growth/map):
- number_display.py/.gd: readable BigValue text (1.23K/1.50M/2.15e190),
  NUMDISP_PARITY_PASS 5 cases -- big numbers no longer raw encoded strings.
- game_root: skyport "Endless Expedition" opens PAGE_ENDLESS with live status
  (zone/level/essence/rebuild), gold/dps, advance/auto/upgrade actions, and a
  recent-zone log showing clear times + boss flags. Offline report shown inline;
  modal path kept for actions but page is the primary surface.
- endless_page_ui_test PASS: page renders, entry works, advance drives engine.
- P2_CHECKS_PASS 105 gates, identity preserved (story mode untouched).

Endless idle now has a proper home surface. Owner gates (human/device/release)
open. prototype/ untracked.
2026-11-19 22:29:06 +08:00
wushenghua 27d16c3b6f feat: richer endless UI + offline progression (CH-style idle loop complete)
Finishes the playable endless mode started earlier:
- endless_offline.py/.gd: CH offline_aggregation-style zone settlement (8h cap,
  BigValue gold, skip unbeatable bosses). ENDLESS_OFFLINE_PARITY_PASS 3 cases.
- game_root settles offline on restore, shows "+N zones"; endless modal now
  shows gold/dps (BigValue encoded) and an "Upgrade Heroes (+5)" action using
  CH 1.07^level cost curve (buy_levels). Bilingual UI text.
- test hooks + endless_ui_test verify advance/offline/upgrade/save round-trip
  in real game_root. ENDLESS_BATTLE_PARITY 32, ENDLESS_SAVE_PASS 4.
- P2_CHECKS_PASS 103 gates, identity preserved.

The endless mode is now a complete CH-style idle loop: play, upgrade, rebuild,
offline gains, persistent BigValue progress. Owner gates (human/device/release)
remain open. prototype/ untracked.
2026-11-19 22:07:26 +08:00
wushenghua b8711635f6 feat: CH-style offline收益 for endless mode (BigValue zone settlement)
Endless mode had no offline progression -- the core idle-game return hook.
- endless_offline.py/.gd: walk zones from saved state over elapsed time, each
  zone (HP/DPS+0.5)s, bank BigValue gold, skip unbeatable bosses (CH
  offline_aggregation), 8h cap. ENDLESS_OFFLINE_PARITY_PASS 3 cases py==gd.
- game_root: _on_endless settles offline since last_saved_at on restore and
  shows "+N zones" report; endless_offline_for_test hook.
- endless_ui_test verifies 1h offline advances zones in real game_root; runner
  clears isolated save for deterministic fresh start.
- P2_CHECKS_PASS 103 gates, identity preserved.

Endless runs now progress while away. Owner gates (human/device/release) open.
prototype/ untracked.
2026-11-19 21:55:23 +08:00
wushenghua 10c9729433 feat: persist endless runs across save/load (BigValue gold encoded)
Endless progress was lost on restart. Now it survives:
- profile gains "endless" field (JSON-safe dict); _normalize clamps tampered
  values so a bad save cannot crash the endless engine.
- endless_battle.snapshot_for_save/from_save: BigValue gold stored as encoded
  string, all other fields JSON-native. Python + GD mirror.
- game_root: _on_endless restores from profile["endless"]; each advance writes
  back + ProfileStore.save_profile.
- test_endless_save PASS 3 checks (round-trip, continue-after-load, tamper-safe);
  endless_ui_test verifies save round-trip in real game_root.
- ENDLESS_BATTLE_PARITY 31 still passes; P2_CHECKS_PASS 102 gates.

Endless runs now persist across restarts. Owner gates (human/device/release) open.
prototype/ untracked.
2026-11-19 21:37:03 +08:00
wushenghua af94808ee6 feat: wire CH-style endless mode into the playable game (BigValue-backed)
The endless pacing was only verified in a paper sim. This makes it a real,
player-facing mode, separate from the 600-node story so 99 gates stay intact:

- endless_battle.py/.gd: BigValue battle engine -- zone HP 1.55^zone, DPS
  base*level*4^(level/25)*(1+0.1*essence), rebuild banks essence, programmatic
  zones. ENDLESS_BATTLE_PARITY_PASS 31 cases py==gd; zone 200000 HP exponent
  38067 (no float64 overflow).
- game_root.gd: skyport "Endless Expedition" button -> modal with zone/level/
  essence/rebuild status, "Advance Zone"/"Auto Advance" actions drive the real
  engine. test hooks for UI verification.
- endless_ui_test PASS: real game_root starts endless, advances 30 zones,
  BigValue-encoded numbers valid. Bilingual UI text added.
- P2_CHECKS_PASS 101 gates, identity preserved (story mode unchanged).

Players can now play a true CH-style endless idle run (no zone cap, big numbers)
alongside the bounded story. Owner gates (human feel/device/release) open.
prototype/ untracked.
2026-11-19 21:04:54 +08:00
wushenghua fd09811702 feat: port CH BigValue -- the foundation for true endless incremental growth
Root cause of "why CH-style endless pacing failed": our numbers are float64
(max ~1e308), but CH's endless curve reaches 1e25409+ via a 336-line BigValue
class (mantissa * 10^exponent). Without it, exponential growth overflows.

Ported CH big_value.gd's game-growth core to Python + GDScript:
- normalize, plus/minus/times/scale/divided_by, power, pow_int, square_root,
  compare, floored/ceiled/rounded, to_float, encoded/from_text (save).
- Exact CH constants (LN10, FLOOR_BIAS, 10000-divide threshold, normalize window).
- GDScript uses self-preload (no class_name) to avoid duplicate-name conflict.
- BIGVALUE_PARITY_PASS 9 cases py==gd; BIGVALUE_PASS 4 checks prove 1e600 and
  1.55^100000 (exponent ~18000) representable -- far beyond float64.

This is the technical foundation. With BigValue, the CH endless curve
(1.55^zone, per-25-level x4 DPS, rebuild souls) can finally be implemented
without overflow. Full P2_CHECKS_PASS 98 gates, identity preserved.

Owner gates (human feel/device/release) remain open. prototype/ untracked.
2026-11-19 20:33:19 +08:00
wushenghua a3ea0c035d feat: restore CH exponential pacing curve + prestige growth loop
User: systems correspond to CH but pacing was 6 minutes -- the "correspondence"
was conceptual; numeric STRENGTH was flattened. This restores CH's actual
growth engine (re-skinned in Windroost names):

- ch_curve.py/.gd: CH monster-growth exponential curve (1.55^level, exact
  source float32 constant), node index -> CH level, 5 compression modes.
  CH_CURVE_PARITY_PASS 30 cases py==gd.
- cycle_pacing.py: enemy HP now follows CH curve (balanced mode, ~1737x at
  end) instead of flat 120-657. Implements CH's core loop: blocked -> rebuild
  to bank essence -> essence +10%/point DPS (from prior commit) breaks the wall.
- Pacing transformed: 6 min -> ~38 min; first region 402s, rebuild 2156s,
  new sky 2282s, 13 real bottlenecks, 5 profiles 2229-2625s with divergence.
  480->477/480 nodes (3 edge bosses), MIN_CLEAR gate satisfied.
- CYCLE_PACING_PASS; P2_CHECKS_PASS 96 gates; identity preserved.

This is the missing piece the user pushed for: not just migrating coefficient
sources, but restoring CH's actual exponential time-scale and prestige loop.
Owner gates (human feel/device/release) remain open. prototype/ untracked.
2026-11-19 20:01:22 +08:00
wushenghua 961ae37737 feat: essence grants +10% DPS per point (CH Hero Soul layer restored)
Windroost 风之精华 previously had NO DPS effect -- it only bought oaths. In CH,
the equivalent Hero Soul grants +10% global DPS per point, the exponential layer
that lets DPS track 1.55^level monster HP. Restored via cf_tuned_values
(CH linear10 = 0.10), Python + GD mirror, identity preserved (essence=0 -> 1.0).

This is layer 1 of restoring CH's growth engine (concept correspondence existed
but numeric strength was flattened). GROWTH_PARITY 7, CF_TUNED_PARITY 58,
P2_CHECKS_PASS 95. Next: apply CH monster HP curve to cycle_pacing so DPS and
HP grow together rather than DPS alone.
2026-11-19 19:41:33 +08:00
wushenghua 13cd2dd8f9 feat: migrate last growth/boss/commission numbers to CH families (full audit)
User asked if ALL game numbers are migrated. Audit found remaining hardcoded
slice-fallback coefficients in growth.py and boss-phase numbers, so fixed:

- cf_tuned_values.GROWTH: every growth coefficient now from CH linear01 (0.01,
  CH's finest step) integer/half-step multiples or linear5/linear10 families:
  talent 0.03, global 0.02, star 0.08, awakening 0.05/0.10, relic 0.015/0.01,
  oath 0.04/0.02, edict 0.03, emblem 0.02. Python + GD mirror.
- growth.py / growth_modifiers.gd read from GROWTH; GROWTH_PARITY_PASS 7 cases.
- boss-phase rebuild/eff 0.05/0.03 from CH linear5 / linear01×3.
- commission steps now read cf_formulas.daily_target (CH daily_tasks).
- CF_TUNED_PARITY_PASS 57 values, CF_TUNED_PROVENANCE_PASS 6 checks.
- PRODUCTION/52 documents: slice-contract numbers (armor_base=100, 0.18 armor
  factor, etc.) are deliberately NOT migrated -- they are the validated slice
  baseline that 64+ gates depend on, not CH full-game content.

Full P2_CHECKS_PASS (95 gates), identity preserved. owner gates remain open.
prototype/ untracked.
2026-11-19 18:56:48 +08:00
wushenghua 0548105cde feat: all tuning numbers now exactly derived from CH families (no invented values)
User wanted every number to have a CH correspondence, not hand-picked values.

- cf_tuned_values.py/.gd: single source that derives all coefficients from CH
  LINEAR_COEFF / monster curve / skill duration: additive = CH linear family,
  interval = 1-CH coefficient (CH cost-reduction style), stack = 1+CH coeffs,
  durations = CH skills.json 30s/6, enemy mults = CH monster_growth curve.
- skill_archetypes / oath_rules / talent_behavior / edict_rules / enemy_mechanics
  now read from cf_tuned_values instead of hardcoded numbers. hero_skills.json
  regenerated; all 54 combos still unique.
- check_cf_tuned_parity PASS 45 values py==gd; test_cf_tuned_provenance PASS 5
  checks asserting every value is CH-derived (guards against invented numbers).
- PRODUCTION/52 documents exact derivations and honest boundary.
- Full P2_CHECKS_PASS (95 gates), identity preserved; enemy-mechanic battle
  durations recomputed [27.1/30.3/20.8/35.0/20.2] all distinct + py==gd.

No combat number is now hand-picked; every coefficient traces to a CH source.
Owner gates (human feel/device/release) remain open. prototype/ untracked.
2026-11-19 18:39:59 +08:00