Skip to content

Bug: "Click Happy" achievement never triggers on 5 clicks — tracks hand-kills instead of clicks #329

@saebyn

Description

@saebyn

Description

The "Click Happy" achievement (click_happy) is described as "Click 5 times" (threshold = 5, condition type = CLICKS_PERFORMED), but players are not receiving it after clicking 5 times in a new game — they have to click many more times before it unlocks (or it never unlocks at all during early gameplay).

Root Cause (Investigation)

In Utilities/Systems/achievement_manager.gd, the CLICKS_PERFORMED condition type is resolved as:

Resource_Achievement.ConditionType.CLICKS_PERFORMED:
    return float(StatsManager.get_enemies_defeated_by_hand())

This reads enemies_defeated_by_hand from StatsManager, which is only incremented when an enemy is fully defeated by a hand/click — not when the player clicks. Early in a new game, enemies may require multiple clicks to die, so enemies_defeated_by_hand stays at 0 (or is much lower than the number of clicks performed).

The CLICKS_PERFORMED condition type is documented/named as "Track total clicks performed (hand defeats)" — the parenthetical "hand defeats" was apparently used as the implementation, but the intent per the GDD is raw click count.

From docs/zom_nom_defense_gdd.md:

Completing specific achievements (e.g., "Click 5 times", "Defeat a zombie") unlocks more tech.

This confirms "Click 5 times" should fire on 5 raw clicks, not 5 kill-clicks.

Steps to Reproduce

  1. Start a new game
  2. Click on enemies 5 or more times (without necessarily killing any)
  3. Observe: "Click Happy" achievement does not unlock

Expected Behavior

The "Click Happy" achievement should unlock after the player clicks 5 times, regardless of whether those clicks resulted in enemy kills.

Affected Files

  • Utilities/Systems/achievement_manager.gd_get_stat_value() maps CLICKS_PERFORMEDget_enemies_defeated_by_hand()
  • Utilities/Systems/stats_manager.gd — has enemies_defeated_by_hand but no dedicated click counter
  • Config/Achievements/achievement_resource.gdConditionType.CLICKS_PERFORMED comment is ambiguous ("Track total clicks performed (hand defeats)")
  • Config/Achievements/click_happy.tres — the affected achievement resource

Suggested Fix

  1. Add a dedicated clicks_performed counter to StatsManager that increments on every player click input (not just kills).
  2. Update achievement_manager.gd to use StatsManager.get_clicks_performed() for CLICKS_PERFORMED.
  3. Clarify the ConditionType.CLICKS_PERFORMED doc comment to remove the ambiguous "(hand defeats)" parenthetical.
  4. Consider whether enemies_defeated_by_hand should become its own separate condition type (e.g., HAND_KILLS) to preserve that tracking for other potential achievements like the GDD's ach_click_kills_25.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions