Keep the cloud platform out of the ground - #120
Conversation
|
CI is red on The same test fails identically on the base: run #183 is the last run of the branch merged as #115, 134 tests, same single failure. This branch adds 4 tests (138 total) and they all pass; the build and the unit tests are green. The test and the shell disagree on purpose rather than by accident: Generated by Claude Code |
The cloud power-up dropped its platform a block and a half under the player's feet, which put it inside the floor whenever it was used from the ground: a platform buried in blocks is one nobody can stand on. The spot is now looked for from that ideal height upwards, until one free of blocks is found, and the player rides up with the platform when it had to be raised. Only the column the player stands in is checked, since the platform is four blocks wide and testing it whole would refuse to place it anywhere near a wall. With nowhere for it to go, the action fails instead of spending a charge on a platform inside the ground. Closes #117 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WsfRkRhL8WipUenLPAWJUD
aaff175 to
28c26c4
Compare
|
Rebased onto the updated Generated by Claude Code |
Closes #117.
The problem
SpawnCloudPlatformPowerUpActionalways dropped the platform atplayerY - 0.5 - height, which is a block and a half under the player's feet. Used from the ground, that is inside the floor.The fix
The spot is now searched for from that ideal height upwards, in quarter-block steps, up to the player's feet — the first one free of blocks wins. When the platform had to be raised, the player is teleported onto its top, so they end up standing on a platform above the ground rather than next to one buried in it. The existing upward nudge stays, so they still hop slightly and land back on it.
Two details worth calling out:
FAILwithout spending a charge, instead of spawning a platform inside blocks.Tests
New
SpawnCloudPlatformActionGameTest(registered in the game testfabric.mod.json), covering:I could not run
runDatagen/runGameTesthere (no JDK 25 in this environment, the project targets release 25), so the suites are left to CI.Generated by Claude Code