Welcome to the Builder Academy

Question suffering from poison

More
04 May 2017 23:35 #6702 by WhiskyTest
Apart from missing the closing bracket (I'm assuming you have the object timers and happy hour stuff below)
I don't have Drows or Globes of Darkness so I tested it on characters without sanctuary being damaged by Magic Missile.
I change point_update() to trigger every 15 seconds to help speed things up.

This is what I changed:
Code:
static int isLightSensitive(char_data *i) { return !IS_AFFECTED(i, AFF_SANCTUARY); }
Code:
if (isLightSensitive(i) && isLitLocation(i)) if (damage(i, i, 10, SPELL_MAGIC_MISSILE) == -1) continue;

It was pretty funny to watch. No crashes, plenty of dead things everywhere during daylight hours...

Next step for your troubleshooting would be to add in some debug logging of some kind. You want to track down where the code is getting to, and figure out if there is a logic error or something being called from within the function that is causing unexpected behavior.

Example 1:
Take your new race and spell out of the mix using the changes above.

Example 2:
Take damage out of the mix:
Code:
if (isLightSensitive(i) && isLitLocation(i)) send_to_char(i, "You're burning up! Grab the sunblock!\r\n"); continue;

Please Log in or Create an account to join the conversation.

More
17 Dec 2017 12:33 #7255 by JTP
Replied by JTP on topic suffering from poison/Sun light
Hmm i thought this was fixed, but just now when i attacked a mob i got 3 messages:

You stab a local female citizen.
A local female citizen is mortally wounded, and will die soon, if not aided.
A local female citizen lies here immobile on the ground, suffering.
A local female citizen is mortally wounded, and will die soon, if not aided.


Code:
/* Update PCs, NPCs, and objects */ void point_update(void) { struct char_data *i, *next_char; struct obj_data *j, *next_thing, *jj, *next_thing2; /* struct char_data *ch; */ /* characters */ for (i = character_list; i; i = next_char) { next_char = i->next; gain_condition(i, HUNGER, -1); gain_condition(i, DRUNK, -1); gain_condition(i, THIRST, -1); if (GET_POS(i) >= POS_STUNNED) { GET_HIT(i) = MIN(GET_HIT(i) + hit_gain(i), GET_MAX_HIT(i)); GET_MANA(i) = MIN(GET_MANA(i) + mana_gain(i), GET_MAX_MANA(i)); GET_MOVE(i) = MIN(GET_MOVE(i) + move_gain(i), GET_MAX_MOVE(i)); if (AFF_FLAGGED(i, AFF_POISON)) if (damage(i, i, 2, SPELL_POISON) == -1) continue; /* Oops, they died. -gg 6/24/98 */ /* if ((!ROOM_FLAGGED(IN_ROOM(i), ROOM_DARK) && (!ROOM_FLAGGED(IN_ROOM(i), ROOM_INDOORS)) && (!ROOM_FLAGGED(IN_ROOM(i), ROOM_TUNNEL))) && (GET_RACE(i) == RACE_DROW) && (!AFF_F$ if (damage(i, i, GET_LEVEL(i), SPELL_SUN_LIGHT) == -1) continue; */ if (isLightSensitive(i) && isLitLocation(i)) if (damage(i, i, GET_LEVEL(i), SPELL_SUN_LIGHT) == -1) continue; if (GET_POS(i) <= POS_STUNNED) update_pos(i); } else if (GET_POS(i) == POS_INCAP) { if (damage(i, i, 1, TYPE_SUFFERING) == -1) continue; } else if (GET_POS(i) == POS_MORTALLYW) { if (damage(i, i, 2, TYPE_SUFFERING) == -1) continue; } if (!IS_NPC(i)) { update_char_objects(i); (i->char_specials.timer)++; if (GET_LEVEL(i) < CONFIG_IDLE_MAX_LEVEL) check_idling(i); } }


Any ideas ?

Please Log in or Create an account to join the conversation.

More
17 Dec 2017 13:53 #7256 by zusuk
off the top of my head, there should be a place in damage() that will check their position and send you a message if you are stunned, incapacitated, mortally wounded, etc... you can check the skill/spellnum there to not send a message if it's poison spell

but you may want to keep that message there...

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

More
17 Dec 2017 14:08 #7257 by JTP
Replied by JTP on topic suffering from poison/Sun light
It all started after adding the if (damage(i, i, GET_LEVEL(i), SPELL_SUN_LIGHT) == -1) if

Please Log in or Create an account to join the conversation.

More
18 Dec 2017 00:05 #7264 by WhiskyTest
It is as Zusuk pointed out.
Any time damage() is called on a victim it will send the appropriate messages for mortally wounded, incap, stunned etc.

If you want to remove them, in fight.c, damage() line 693ish is where you'd start making your changes.

But you might want to keep that message there...

Please Log in or Create an account to join the conversation.

More
18 Dec 2017 00:10 - 18 Dec 2017 00:10 #7265 by JTP
Replied by JTP on topic suffering from poison/Sun light
Cant be right that i hit once, and Then the mob gives me 2 Will die soon If not aided and 1 suffering ?

That truly seems odd, and it only happends some times.
Last edit: 18 Dec 2017 00:10 by JTP.

Please Log in or Create an account to join the conversation.

Time to create page: 0.205 seconds