Skip to content

Boss fight health bar resets to full when player types a word containing special characters #16

Description

@woydarko

Bug Description

During the boss fight stage, if a player types a word that contains special characters such as apostrophes or hyphens (e.g., "don't", "well-done"), the boss health bar completely resets to its maximum value instead of decreasing. This makes the boss fight impossible to complete if such words appear.

Steps to Reproduce

  1. Start the game and progress to the boss fight stage
  2. Wait for a word containing an apostrophe or hyphen to appear (e.g., "it's", "re-type")
  3. Type the word correctly and press Enter
  4. Observe the boss health bar

Expected Behavior

Boss health bar should decrease by the correct damage amount when the word is typed correctly, regardless of special characters in the word.

Actual Behavior

Boss health bar resets to 100% full. The bug appears to be caused by a regex match failing on special characters, triggering a fallback that reinitializes the health variable.

Environment

  • Chrome 122
  • Windows 10

Wallet: 0x3A9f2B8c1D4E6F0a7b5C2d8E9F1A3B4C5D6E7F8A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions