Jumping onto farmland should trample crops, but not every time
Farmers in a survival world dislike visitors who hop across their fields. Trampling must depend on how hard you land, happen once per landing, and not be decided by a lottery drawn every frame. Here is how to turn a drop into a chance, and how to keep the result repeatable for tests and saves.
Why this works
Harm should follow how hard the landing was, and it should be decided once per landing, not once per frame. Turning the drop into a chance, with the dice handed in from outside, gives every cell its own fate and keeps results repeatable for saves.
When not to use it
Do not use it in a gentle farming game where the joy is tending a field, as surprise damage from a hop would only frustrate. There, let crops die from neglect or weather, not from the player walking about.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 17 lines of example code with 5 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Jumping onto farmland should trample crops, but not every time" (read_entry landing-tramples-crops-by-drop-height) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP