Forum:Follower condition and keepdogs

From NetHackWiki
Jump to navigation Jump to search


What decides whatever monster follows you to other level? It needs M2_STALK flag (this group of monsters is described in Follower article), but there are monster with this flag that refuse to follow you (for example Orcus or Cthulhu from UnNetHack). I thought that condition is M2_STALK, without M3_WAITFORU - but Vlad is happily following me and he have both flags. Source:Ref/keepdogs is a relevant function but I am not understanding what happens there (I thought that "&& !(mtmp->mstrategy & STRAT_WAITFORU)" should keep Vlad from following). Bulwersator (talk) 16:00, 23 May 2013 (UTC)

There's a large number of lines of code that remove STRAT_WAITFORU. (ex. mdef->mstrategy &= ~STRAT_WAITFORU). That means that the monster is currently waiting for you - that's his strategy right now - not that the monster will wait for you. dog.c is checking for that, not M3_WAITFORU directly. This just means that if you got next to a follower that was meditating, it would not follow you even if it would normally.
I'm not seeing anything else that should stop them from following you, unless they're carrying the amulet, of course. Are you certain orcus never follows? He wasn't just meditating, fleeing, or carrying the amulet? -- Qazmlpok (talk) 00:14, 24 May 2013 (UTC)