Talk:Tallbird/@comment-5843762-20121217180154/@comment-5843762-20121218002220

You are right, but not on where and how the code decides this.

"ThreatNearNest" calls DefendHomeAction, which selects ACTIONS.WALKTO action. The tallbird does not actually become aggressive to you (you are not added to its attack target list).

However, the Retarget function in tallbird.txt does check for the player near the nest, and this is where the attack is issued, and why I missed this. This is also the same place where being in tallbird's range makes it attack.

Now this is probably, probably, a bug -- the bird will attack you when you come closer than TALLBIRD_TARGET_DIST=8 to its nest, and it will run back to the nest when you are closer than START_FACE_DIST=6. Of course, when the latter triggers, the bird is already attacking, which takes precedence. I am guessing it was meant so the bird run back to its nest first if you get closeby, and only attacks when you are right over it.