Worm AI

From Terraria Wiki
Jump to navigation Jump to search
This article is about the AI type. For the critter, see Worm.

Worm AI is an AI type followed by most multi-segmented enemies.


An NPC with the Worm AI exhibits the following behavior:


  • 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 specific sound 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[1]). Note that all worms excluded, except the Leech, typically move through the air.[2]




  • Desktop 1.1:
    • All segments now share a life counter, instead of individual life counters for all segments – except for the Eater of Worlds.


  1. A tick is a time unit countable by the software. Most of Terraria's updating logic happens every tick. A tick has the length of 1/60th of a second, hence there are 60 ticks in a second and 3600 ticks in a minute.
  2. Information taken from the Desktop version Desktop source code, method AI_006_Worms() in Terraria.NPC.cs. There may be inaccuracies, as the current Desktop version Desktop version is