[crossfire] Invisibility and monsters
Mark Wedel
mwedel at sonic.net
Sun Aug 20 22:23:12 CDT 2006
Alex Schultz wrote:
> Bug report #1542895 on the sf.net tracker
> (http://sourceforge.net/tracker/index.php?func=detail&aid=1542895&group_id=13833&atid=113833)
> notes that:
> "All monsters seem to be able to "see" an invisible player: even ogres
> see a player wearing a God Finger."
> I'm pretty sure that's because that character didn't have stealth, and
> hence is intended to allow the ogre to see the character. Despite it
> being 'intended behavior', I'm not sure the way stealth is necessarily
> the 'right behavior'. How stealth works is something that I find few
> players understand, because there are few visual or text cues about it.
> Personally I'm thinking stealth should be made much more obvious to the
> player. Here are some ideas I had of possible ways to do that:
> - Give stealth some use when one isn't invisible/hiding
> - Make a visual cue (i.e. animation of detect invisible for a moment)
> when an invisible/hiding player without stealth moves
> - Make stealth more available
> - Document stealth better in-game.
Looking at the code, it seems to do all sorts of odd things.
the function in question appears to be can_detect_enemy() in server/monster.c
The function itself seems relatively confusing, as it the ncalls things like
can_see_enemy(), which in turn calls makes_invisible_to(), to see if the monster
can detect the creature (those functions are in themselves not confusing, but
then you get can_detect_enemy() that seems to do some of that work again).
But gong after all of that, if the player is not hidden, then monsters can
detect them if within MIN_MON_RADIUS (which is 3) or the monsters wis/5,
whichever is higher.
If the character has stealth, that detection radius is reduced.
I'm not sure, but I have a feeling here that the real issue is the
MIN_MON_RADIUS, which means if you are not stealthy/hidden, if you are within 3
spaces of a monster, they can always detect you.
More information about the crossfire
mailing list