[Circle] Infravision question.

From: Mud Admin (empire@www.cedarnet.com)
Date: 07/25/96


I guess I am just really stupid, but I have been fighting with a workable 
infravision system for a VERY long time.

Nothing too difficult, I want all non-human character races to be able to 
see in the dark. 

Right now, in the charcter creation it sets an infra bit on the character 
if they are non-human. I have done many diferent things, but I always end 
up with some kind of minor inconsistancy in it. 

For awhile in combat, if you were fighting a human in the dark for 
example you would get his short desc when you attacked him, but when he 
attacked you it was 'Someone'. Stuff like that. Right now, it is allowing 
affected players to see invis and hidden as well.

Some of my utils.

#define CAN_SEE_IN_DARK(ch)  ((AFF_FLAGGED(ch, AFF_INFRAVISION)) \
 || (PRF_FLAGGED(ch, PRF_HOLYLIGHT)) || (IS_DEMI_HUMAN(ch)))

#define IS_DEMI_HUMAN(ch) (GET_RACE(ch) != RACE_HUMAN)

#define LIGHT_OK(sub)   (!IS_AFFECTED(sub, AFF_BLIND) && \
   (IS_LIGHT((sub)->in_room) || IS_AFFECTED((sub), AFF_INFRAVISION) || \
   IS_DEMI_HUMAN(ch)))

Thoughts anyone?

--Ziz, NetShamen

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/07/00 PST