This is because the bitvector field in AFFECT_DATA is used to assign the AFF_ bits, like AFF_FAERIE_FIRE and AFF_INFRARED... what's happening is that it's taking the value of VULN_LIGHTNING, putting it in the slot that's used for the affect bit, and when the code goes to display it, it takes that value and searches the affect table and returns those names... I'm sure if you look at your merc.h and see what the value of VULN_LIGHTNING and whatever other VULNs you are using are, and compare them with the affect bits, you'll find those names... what you need to do is either use an affect bit as AFF_VULN_LIGHTNING, and then put a check for that in the spots you find the checks for VULN_LIGHTNING and make it react the same way, or else use a SET_BIT(ch->vuln_flags,VULN_LIGHTNING) in order to set that on the character... the only problem is going to be that when the spell wears off, you're going to have to put a manual check for that spell name and strip the bit, because otherwise it will only remove the expired AFFECT_DATA, which doesn't actually include that VULN bit... You'd have to add checks for that in spell_cancellation, spell_dispel_magic, and in update.c where the spell time decrements...
Richard Lindsey Network Administrator INTERA, Inc. 9111A Research Blvd. Austin, TX 78758 (512) 425-2006 [EMAIL PROTECTED] -----Original Message----- From: Cyhawk [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 12, 2003 7:05 AM To: [email protected] Subject: Two questions Hello. I have two questions. (rom 2.4) I wrote a few spells, that add resists/vulns/immunes. So far that works. But i get a strange display through mstat.. Immune: cold Resist: poison disease Vulnerable: lightning drowning Affected by infrared Spell: 'greater ice shield' modifies armor class by 60 for 21 hours with bits none, level 56. (this part adds -ac) Spell: 'greater ice shield' modifies none by 0 for 21 hours with bits infrared, level 57. ( this part adds the Immune) Spell: 'greater ice shield' modifies none by 0 for 21 hours with bits faerie_fire, level 58. (this one adds the vuln) its the with bits ***, part thats confusing me. They don't affect the charater. What causes this? How can I fix it? =) the spell af. is.. AFFECT_DATA af3; af3.where = TO_VULN; af3.bitvector = VULN_LIGHTNING; af3.type = sn; af3.duration = level / 2; af3.level = ch->level; af3.location = 0; af3.modifier = 0; affect_to_char(ch, &af3); am i missing something? (Was trying to find a snip that does the same thing, but the only one i found is protection_from_negitive, which adds bits poison.) Im assuming, its some sort of display error. (Hoping more like it) But I belive it to be caused by a deeper problem in the code. Any help is appreciated. -Cyhawk -- ROM mailing list [email protected] http://www.rom.org/cgi-bin/mailman/listinfo/rom

