A chain attack jumps between enemies, fades out and must never hit the same one twice
Chain lightning, bouncing projectiles and spreading fire all pass from one target to a nearby one. Without care they ping-pong between two close enemies, favour a random neighbour on every machine, or run forever. This entry defines the hop rules so the chain is fair and ends.
Why this works
A chain must be able to end, and it must never return to where it has been. A list of those already hit rules out going back, a chance that shrinks with each jump guarantees the end, and always taking the nearest target gives the same result on every machine.
When not to use it
Skip it when the effect should spread without limit, such as fire across a dry forest, or when it should jump back on purpose, like a boomerang. Then the list of visited targets gets in the way. Use separate spreading rules for those.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- A diagram of every state
- 40 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 "A chain attack jumps between enemies, fades out and must never hit the same one twice" (read_entry chain-lightning-jump-chance-fades-and-never-bounces-back) 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