Spielerando

A door should open when I have the key and the lamp, but it stays shut

When a rule with several conditions says no, the game just says no, and your AI starts guessing at which condition it is. This entry gives a helper that names each failing condition, shows what the game actually holds there, and spots names that were never set at all.

Why this works

A combined rule hides which part failed. Evaluating each part on its own and printing the value it saw turns a guess into a read-out, and a name that was never set is the usual cause that a plain true or false hides.

When not to use it

If the rule is a long chain with branches, such as or-groups inside and-groups, evaluate it as a tree instead; this helper covers a flat list where all parts must hold.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 30 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 "A door should open when I have the key and the lamp, but it stays shut" (read_entry rpg-why-the-door-stays-shut) 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