unicorn horn vs sustain ability (trunk only)
Forwarded from newsgroup by <Someone> in February, 2005: non-cursed unicorn horn fixes lost Str/Con/&c stats even when ring of sustain ability is supposedly locking those at current value. This makes unicorn horn honor the Fixed_abil intrinsic. The potion and spell of restore ability still override that, so they now have potential for use even after player has acquired a unihorn. Prayer also continues to override Fixed_abil. Major prayer result to heal crippled strength now attempts to uncurse a ring of sustain ability (or gloves or weapon covering it up--similar situation as with cursed levitation). Minor prayer result to fix lost stats resets those without attempting to do anything about Fixed_abil.
This commit is contained in:
@@ -1671,9 +1671,16 @@ struct obj *obj;
|
||||
|
||||
/* collect attribute troubles */
|
||||
for (idx = 0; idx < A_MAX; idx++) {
|
||||
if (ABASE(idx) >= AMAX(idx)) continue;
|
||||
val_limit = AMAX(idx);
|
||||
/* don't recover strength lost from hunger */
|
||||
if (idx == A_STR && u.uhs >= WEAK) val_limit--;
|
||||
if (Fixed_abil) {
|
||||
/* potion/spell of restore ability override sustain ability
|
||||
intrinsic but unicorn horn usage doesn't */
|
||||
unfixable_trbl += val_limit - ABASE(idx);
|
||||
continue;
|
||||
}
|
||||
/* don't recover more than 3 points worth of any attribute */
|
||||
if (val_limit > ABASE(idx) + 3) val_limit = ABASE(idx) + 3;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user