Skip to content

Fix timing units and update reward image count to 12#34

Merged
Null000 merged 2 commits intomainfrom
claude/fix-bugs-jv2xw
Feb 23, 2026
Merged

Fix timing units and update reward image count to 12#34
Null000 merged 2 commits intomainfrom
claude/fix-bugs-jv2xw

Conversation

@Null000
Copy link
Copy Markdown
Owner

@Null000 Null000 commented Feb 23, 2026

Summary

This PR fixes inconsistent timing units in the Wizard class, corrects a bug in the XP leveling calculation, and updates the reward image count from 5 to 12 across the codebase.

Key Changes

  • Timing unit fixes in Wizard.ts: Changed missileDuration from 0.35 to 350 and magicTrails life from 0.2 to 200 to use milliseconds consistently instead of seconds
  • XP leveling bug fix: Fixed levelUpStats() to use cumulative this.xp instead of just newXp for calculating the XP factor, ensuring stats scale properly with total experience
  • Reward image count update: Updated numberOfRewardImages constant from 5 to 12 in src/constants.ts
  • Script enhancement: Modified update-reward-count.ts to update both RPG constants and main constants files, with improved variable naming for clarity

Notable Details

The timing unit changes align millisecond-based durations with the rest of the codebase's timing system. The XP calculation fix ensures that leveling progression is based on total accumulated experience rather than just the experience gained in the current level-up event.

https://claude.ai/code/session_01JFbWn7GdZW5sDTWFXUkVqK

…ard count

- Fix levelUpStats() using newXp instead of this.xp for xpFactor calculation,
  causing stats to not scale with total accumulated XP
- Fix missileDuration using seconds (0.35) instead of milliseconds (350),
  causing missile animations to complete instantly
- Fix arcane beam trail life using seconds (0.2) instead of milliseconds (200),
  causing beam particles to vanish instantly
- Fix numberOfRewardImages hardcoded to 5 instead of actual count of 12,
  preventing practice mode from showing all reward images
- Update build script to also sync src/constants.ts reward count

https://claude.ai/code/session_01JFbWn7GdZW5sDTWFXUkVqK
- Fix missile startDelay using seconds (0.07) instead of milliseconds (70),
  causing all 3 missiles to fire simultaneously on the first frame
- Fix frost shard stagger by initializing progress to negative values (-i*50),
  enabling the existing delay check (progress <= 0) to create a sequential
  firing effect for the 5 shards

https://claude.ai/code/session_01JFbWn7GdZW5sDTWFXUkVqK
@Null000 Null000 merged commit c22da4b into main Feb 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants