Spielerando

Make a treasure thief drop its gold hit by hit while it runs away

A creature that runs off with a sack of gold is a fun chase, but if the prize only comes on the killing blow, a player who almost had it gets nothing, and one who overkills it gets too much. This entry pays out in step with the damage and always adds up.

Why this works

Reward should follow effort, in every step. Working out what should have dropped from the total damage so far, instead of adding per hit, means rounding never eats coins and an escape, an overkill or a heal changes nothing unfairly.

When not to use it

Don't pay out by damage when the chase itself is the point and the prize should be all or nothing, such as a thief the player must catch. Paying along the way takes the tension out; give the whole sack on the catch.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • A diagram of every state
  • 17 lines of example code with 3 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Make a treasure thief drop its gold hit by hit while it runs away" (read_entry fleeing-treasure-creature-drops-gold-as-it-is-hurt) 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