View Single Post
Old January 22, 2020, 12:10   #4
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 8,066
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by Pete Mack View Post
thanks much. Adding a comment to this effect. Also: if the object gets a random resist, shouldn't it also get set to
obj-init.c:356,362
Code:
    obj_info[effect].flags |= EL_INFO_RESIST | EL_INFO_RANDOM;
not just:
Code:
    obj_info[effect].flags |=  EL_INFO_RANDOM;
That is, it should resist the element if it has a resistance from any source.
No, the actual resist is handled by the res_level field (1 being single resist, 3 immunity). Some of the reason for the way this stuff is structured is to allow for use in variants with more resistance levels than V.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote