One thing I like about tabletop D&D is the idea of immunities, resistances and vulnerabilities. I'm sure you folks are familiar, but I'm talking about monsters being invulnerable to non-magical weapons, or taking half damage from piercing weapons, or being extra vulnerable to cold. This seemed to add an extra strategic level to combat.
I don't see anything in tbaMUD that handles this and I'd like to add it. Has anyone out there already done this? I'd hate to re-invent the wheel if there is already a tested solution. I understand this will make my world files incompatible (as I will have to store the information somewhere), but I'm willing to take that step. A starting point might be "attack_hit_type" maybe?
By the way, I asked ChatGTP about tbaMUD and it seemed somewhat familiar with the project
In loose outline, here is what it proposed:
1. Modify the char_data Structure (In structs.h, expand the char_data structure to store resistances and vulnerabilities)
2. Define Damage Types (In constants.c, define new damage types (if they don’t exist already))
3. Modify the Damage Calculation (In fight.c, locate damage() function and modify it to check resistances and vulnerabilities)
4. Add New Mob Attributes (Modify db.c to allow setting resistances/vulnerabilities in the mob files (e.g., via the mob editor))
5. Update Mob Loading Code (Modify db.c to read these new attributes when loading mobs from files)
6. Modify Object Weapon Effects (If you want weapons to deal specific damage types, modify weapon.c or the obj_data struct to track dam_type)
7. Test and Debug (Implement logging in fight.c to ensure damage calculations reflect the new mechanics)
If anyone wants to see the full conversation - including sample code - I have a link here:
chatgpt.com/share/67c89a8c-0224-800d-ab74-64542a4763b2
. The conversation also includes me asking ChatCGT what it knows about tabMUD.
What do you folks think?