feat: Batch implementation of researched issues (#34, #39, #40, #43, #44, #45)#46
Merged
feat: Batch implementation of researched issues (#34, #39, #40, #43, #44, #45)#46
Conversation
Starting branch to tackle researched issues one by one: - #34 VendingMachinePanel static inventory persistence - #35 CodexPanel rebuild on every open - #38 Tutorial level starting items - #39 Movement smoothing - #41 Door spawning in world gen - #43 Corrupted items - #44 Corruption → item level scaling - #45 Levelup curve tuning 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
VendingMachinePanel._machine_inventories is a static var that persists across scene reloads. Added a clear() call in game_over_panel alongside the existing KnowledgeDB and ChunkManager resets. Closes #34 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… Mustard) Adds three new tutorial-only items for Level -1, each mapped to a pool: - Meat (BODY, COMMON, +5 BODY) ~67% spawn chance - Vegetables (MIND, UNCOMMON, +5 MIND) ~27% spawn chance - Mustard (NULL, RARE, +5 NULL) ~7% spawn chance Only one spawns per run, selected by weighted rarity. Items use level=5 with the base class stat bonus system for a flat +5 boost. Each has PSX-style pixel art textures and clearance-gated descriptions. Also removes dead `starting_items` property from level_config.gd and replaces the hardcoded debug_item spawn in the tutorial generator with weighted rarity selection. Note: The generator explicitly includes "level" in item_data because WorldItem.to_dict() doesn't serialize level yet (tracked in #44). Closes #38 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Smooth visual transitions between grid positions for player and entities using the Anathema Interloper pattern: tree-level tweens on local position with TRANS_SINE + EASE_OUT at 0.2s duration. This avoids camera jitter that occurred with node-level tweens and manual lerp approaches. - Player movement tweens via get_tree().create_tween() on position - Entity billboard/health bar tweens match player timing - Settings toggle: "Move Smoothing: ON/OFF" in pause menu - snap_visual_position() bypasses tween for init/teleport/level loads - Utilities.movement_smoothing static var controls the feature 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds automatic exploration that navigates toward unexplored tiles at configurable speed, with intelligent stop conditions and settings UI. Core implementation: - AutoExploreState: new player input state with per-step re-pathing, camera rotation to face movement, auto-pickup of items along path - ExplorationTracker autoload: BFS-based nearest unexplored tile finder with chunk-preference bias (finishes current chunk before crossing) - Activated via Y key / Y button, cancelled by any input Stop conditions (all configurable in settings): - HP or sanity below threshold (default 50%) - Enemy detected in perception range - Item or vending machine detected (navigates adjacent then stops) - Stairs detected (navigates adjacent then stops) - Took damage since last step - No unexplored tiles or path blocked Settings panel: - Speed slider (1-30 turns/sec, default 10) - HP/Sanity threshold sliders - Toggle buttons for enemies, items, damage, stairs - Accessible via Auto-Explore Settings button in pause menu Other changes: - ExplorationTracker marks tiles explored each turn in PreTurnState - HUD indicator shows "AUTO-EXPLORE" when active - Frame-based guard prevents Y key from cancelling then re-triggering - Explicit ui_accept mapping (Enter, Space, JOY_BUTTON_A) for start menu - Auto-explore log coloring in game.gd 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This was referenced Feb 2, 2026
Stats panel now updates immediately when any stat changes, instead of waiting for the next turn. All signal handlers route through _update_all_stats() for a general solution rather than piecemeal per-handler logic. - Add regen percent setters to StatBlock that emit stat_changed signal - Add corruption_changed signal to CorruptionTracker - Connect modifier_added/modifier_removed signals in stats panel - Lazy-connect corruption_tracker signal to handle init ordering - Fix _modify_corruption using hardcoded level_id=0 (tutorial is -1) - Fix settings panel not re-opening after unpausing from AE sub-panel 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Players need to keep clearance pace with corruption-scaled item levels. The old curve (100 × n^1.5) made mid-game leveling too slow, locking players out of item information. - XP curve: BASE 100→75, EXPONENT 1.5→1.25 (Lv5: 1118→447, Lv10: 3162→1334) - Chunk exploration XP: 10→20 - Kill XP: min 10→15, divisor 10→5 (weak enemies feel more rewarding) Net effect: ~2-3x faster progression across the board. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Items now spawn at higher levels based on corruption: each 0.25 corruption gives +1 guaranteed bonus level, with fractional remainder as a probability roll. This applies to natural spawns, pity spawns, and vending machine offerings. Item combining is now additive (a Level 3 pickup + Level 2 equipped = Level 5). WorldItem serialization preserves level through chunk load/unload cycles. Also halved corruption's impact on sanity drain to keep high-corruption runs survivable. - item_spawner: Add _roll_item_level() with CORRUPTION_PER_LEVEL_STEP=0.25 - item_spawner: Apply corruption-scaled levels to spawn and forced spawn - vending_machine_panel: Scale offerings with corruption - pickup_to_slot_action: Additive combining (level_up(item.level)) - item.gd: level_up() accepts amount parameter - world_item: Serialize/restore level in to_dict()/from_dict() - sanity_damage_action: Halve corruption multipliers (10→5, 6→3) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Any item can become corrupted, gaining random debuffs that are "dark mirrors" of positive item effects. Corrupted items default to OFF and display [CORRUPT] prefix with glitch animation on ground sprites. Corruption system: - STAT debuffs reduce body/mind/null_stat (mirrors +N stat bonuses) - PER_TURN debuffs drain HP/Sanity/corruption (mirrors regen items) - ON_USE debuffs reduce damage and increase mana cost (mirrors attack bonuses) - All scale with item_level * (1 + corruption), worsening over time - Clearance-gated descriptions hide debuff details below item level Item lifecycle changes: - on_enable/on_disable now toggle ALL effects (stat bonus + corruption) - clamp_resources() ensures current HP/Sanity respect new max values - starts_enabled=false items correctly start with no active effects - Combining corrupted items merges debuff arrays Spawning and display: - Corruption-scaled spawn chance with bonus corrupted item spawns - Glitch shader (chromatic aberration, scanlines, vertex wobble) - Tween-based modulate animation for corrupted ground sprites - Vending machines can offer corrupted items - Corrupted items show distinct color in all UI panels Wired-up on-use effects: - damage_penalty multiplier applied during attack building - mana_tax multiplier applied during attack building - corruption_spike triggers on successful pool attack hit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Root cause: find_nearest_unexplored() ran a full BFS traversal of the entire walkable graph every auto-explore step (~10x/sec). As the explored area grew, BFS became increasingly expensive — most noticeably after the first vending machine detour expanded the explored region significantly. Fix: Cache the BFS target and only recompute when the cached target tile becomes explored (player reached it). Between steps the target doesn't change, so this eliminates redundant O(explored_area) BFS calls. Also adds dismissed item tracking — items the player chose to "Leave on Ground" are remembered so auto-explore won't stop for them again, matching the existing visited vending machine behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
aebrer
pushed a commit
that referenced
this pull request
Feb 3, 2026
Reviewed all six features from PR #46: - Auto-explore system: Excellent implementation with BFS caching - Corrupted items: Good but identified stat debuff drift bug - Movement smoothing: Clean tree-level tween implementation - Corruption-scaled spawning: Mathematically sound scaling - Levelup curve: Rebalanced for faster progression - Vending cache fix: Simple and correct Key finding: Corruption stat debuffs are applied/removed using current corruption value, which can drift if corruption changes while item is equipped. Recommended fix: store corruption at application time for consistent removal. https://claude.ai/code/session_01AZj9GxxZ6TLBkHDvK4kvdW
aebrer
pushed a commit
that referenced
this pull request
Feb 3, 2026
Corrected the issue description after discussing with maintainer: - Not a "drift bug" but an incomplete feature - PER_TURN debuffs already scale with current corruption each turn - STAT debuffs should do the same but currently only apply once at equip - Updated suggested fix to recalculate STAT debuffs in on_turn() https://claude.ai/code/session_01AZj9GxxZ6TLBkHDvK4kvdW
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements a batch of researched issues from the backlog, including several new systems and balance improvements:
Changes
corruption_debuffs.gd,psx_sprite_glitch.gdshader,door_behavior.gdTest plan
Closes #34, closes #39, closes #40, closes #43, closes #44, closes #45
🤖 Generated with Claude Code