mattgodbolt / xania

Xania MUD source
Other
58 stars 13 forks source link

dispel magic on a PC causes the PC to get confusing message: "Sorry, player killing is not permitted." #196

Closed mattgodbolt closed 4 years ago

mattgodbolt commented 4 years ago

an IMM casting dispel magic on a PC (outside of safe rooms...). On the PC you see:

You feel less protected.
TheMoog utters the words, 'dispel magic'.
You slowly float to the ground.
You feel weaker.
Sorry, player killing is not permitted.
snellers commented 4 years ago

This message gets sent to the 'victim' because casting dispel magic is classed as an offensive spell, so it automatically triggers multi_hit from the victim. And that's guarded by many things including the check on player killing. I think I can fix it by checking much earlier that the original target is an NPC, and if not, whether they two chars are duelling.