Spielerando

Merge three gems into a better one and follow the chain all the way up

Three small gems make one medium gem, three medium make one large. A player with ten small gems and two medium ones presses merge and the result depends on which row the code looks at first. This entry merges in the right order, keeps the leftovers and stops at the top tier.

Why this works

A merge is a chain where each step feeds the next. Working from the bottom up lets new items arrive before their tier is looked at, so one press settles everything. Going the other way leaves unfinished piles and makes the player press again without knowing why.

When not to use it

Do not merge automatically when players want to keep small pieces, for example to craft with them or to hit a quest count. Offer a one-step merge or a confirm screen, since an eager chain can swallow material they needed.

In the full entry

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

Say this to your AI

Use the Spielerando entry "Merge three gems into a better one and follow the chain all the way up" (read_entry merge-three-into-one-with-chain-reaction) 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