Feature - Implemented Expose monster physical resistance in proxy record

heeheehee

Developer
Staff member
I was looking into writing a combat script and realized that it would be really nice to have access to the monster's physical resistance (or immunity). This is currently available in monsters.txt as a pseudo-field (one of the space-delimited subfields of the stats field) "Phys: X", but it seems fairly heavy-handed to require parsing an entire datafile just so I can get information about the monster I'm currently fighting.

I'll look into adding a patch in a bit, maybe.

Thanks!
 

heeheehee

Developer
Staff member
Patch attached. I decided to keep it more general because IIRC, Dread zombies have variable physical resistance based on difficulty, and Mafia might want to support this at some point in the future.

Because it was in the same place, I started to add support for item / skill / spell blocking, although I'm not motivated at the moment to finish adding that. Maybe soon (since skill blocking would actually be relevant to what I'm doing).
 

Attachments

  • phys_resist.patch
    4.8 KB · Views: 40

Veracity

Developer
Staff member
Revision 12500.

I suppose I should look at your patch. :)

Edit: revision 12501 makes it .physical_resistance, not .physical_immunity. Not sure what I was thinking.
 
Last edited:
Top