Worm AI

Worm AI is an AI type followed by most multi-segmented enemies.
== Behavior ==
An NPC with the Worm AI exhibits the following behavior:
* Can pass through all solid blocks
* Unaffected by liquids
* Immune to knockback
* Drops loot from the head segments
== Notes ==
* Worm-type creatures have a variable number of body segments. For example, a Devourer has 8-12 body segments, and a Giant Worm has 4-6 body segments.
* Worm-type creatures always produce a when digging near the player's location (besides Leeches which make no noise when released from the Wall of Flesh), so in most cases it is not only possible to tell when, but even where will it emerge next – and to aim and/or dodge accordingly. The speed of the sound gets faster as the creature gets closer, which can also help.
* Weapons that appear to go through blocks, like spears, hurt worms when going through blocks. This does not happen with most other enemies.
* Worms can dig through liquids as though they were solids.
* If using Autopause at the exact moment a worm is killed, it is possible to see negative numbers when the cursor is hovered over it. This is because, since all segments share the same health, damaging all of them at the same time can lead to the game not realizing that the worm's health is below 0 until after resuming.
* All worms save for the Leech, Wyvern, Milkyway Weaver, Phantasm Dragon, and Crawltipede will occasionally cause particles to spawn from the blocks they dig through (1/100 chance each tick). Note that all worms excluded, except the Leech, typically move through the air.
== Tips ==
* Weapons that are capable of piercing enemies, like Flying Dragon, Rainbow Gun, or Death Sickle, are exceptionally effective against all types of worms.
== Trivia ==
* It is the only AI that is used by both non-boss enemies and a boss (Eater of Worlds)
== History ==
== Reference ==