Skip to content

Fix red koopa shell homing without an owner - #124

Merged
Hugman76 merged 1 commit into
devfrom
claude/fix-dev-test-failure-f9fki8
Aug 25, 2026
Merged

Fix red koopa shell homing without an owner#124
Hugman76 merged 1 commit into
devfrom
claude/fix-dev-test-failure-f9fki8

Conversation

@Hugman76

Copy link
Copy Markdown
Member

The problem

RedKoopaShell.findTarget() looked for and locked onto a target even when the shell had no owner. That contradicts the documented intent right above the test it breaks (KoopaShellGameTest: "It only looks for a target on behalf of whoever threw it, so a shell without an owner never homes at all") and fails anownerlessRedShellGoesStraight on dev — the same failure several other open PRs (#123, #121, #120) call out as pre-existing and unrelated to their changes.

The fix

findTarget() now returns null immediately when the shell's owner isn't a LivingEntity (i.e. no owner), instead of still searching for and homing in on the nearest valid target. The stale comment claiming owner-less shells "still home in" is removed along with the now-unnecessary null-owner handling further down.

Tests

./gradlew runDatagen (no changes) and ./gradlew runGameTest — all 134 game tests pass, including anownerlessRedShellGoesStraight.


Generated by Claude Code

RedKoopaShell.findTarget() searched for and locked onto a target even
when the shell had no owner, contradicting the intended behaviour (a
shell nobody threw has nothing to chase for) and failing
KoopaShellGameTest.anownerlessRedShellGoesStraight on dev.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018CgrnTJ5h1s22YS1BTCi8r
@Hugman76
Hugman76 merged commit 66462b3 into dev Aug 25, 2026
1 check passed
@Hugman76
Hugman76 deleted the claude/fix-dev-test-failure-f9fki8 branch August 25, 2026 09:10
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