I'm trying to find a way to determine whether a player resistance comes from worn equipment or as an innate ability granted from p_info.txt. I've found the resistance variables in player.pkg but they don't seem to differentiate between the two, i.e. confusion resistance is confusion resistance, whether it comes from equipment, race, or skill.

The idea behind this is, if a player is hit by some status attack (paralysis/blindness/confusion/fear), the player doesn't take damage, but a message does appear stating that "This attack would have paralysed you. You need a source of free action to resist this type of attack."

My thought was to use the lua in-game help to generate the message, as long as the player doesn't have *identified* equipment that provides the resist. However, this message should probably not appear on 'every' attack, since this could get annoying fast. Perhaps it could be timed, (appear once, then set a delay of 500 turns. Once that time has elapsed, the message can pop up again), or possibly have a chance of appearing when attacked.

This is coming from IdeaArchive/Player/Newbie subrace. I read it and it sounded interesting, and could be a useful thing for those trying to get an initial grip on the game. I'm trying to write a module (my first) based on this idea, mainly to see if I can do it, but I will probably release it (with appropriate permission) if it works.

Module Developers Discussion/Determining Resistance Sources (last edited 2005-08-24 16:25:10 by TimmyBravo)