early return when value == 0 on dosacrifice()
`calc_value()` returns a non-negative value, and there is no code that sets `value` to 0 after this point.
This commit is contained in:
+3
-6
@@ -1908,7 +1908,9 @@ dosacrifice(void)
|
|||||||
value = -1;
|
value = -1;
|
||||||
HAggravate_monster |= FROMOUTSIDE;
|
HAggravate_monster |= FROMOUTSIDE;
|
||||||
} else if (!value) {
|
} else if (!value) {
|
||||||
; /* too old; don't give undead or unicorn bonus or penalty */
|
/* too old; don't give undead or unicorn bonus or penalty */
|
||||||
|
pline1(nothing_happens);
|
||||||
|
return ECMD_TIME;
|
||||||
} else if (is_undead(ptr)) { /* Not demons--no demon corpses */
|
} else if (is_undead(ptr)) { /* Not demons--no demon corpses */
|
||||||
/* most undead that leave a corpse yield 'human' (or other race)
|
/* most undead that leave a corpse yield 'human' (or other race)
|
||||||
corpse so won't get here; the exception is wraith; give the
|
corpse so won't get here; the exception is wraith; give the
|
||||||
@@ -1954,11 +1956,6 @@ dosacrifice(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value == 0) {
|
|
||||||
pline1(nothing_happens);
|
|
||||||
return ECMD_TIME;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (altaralign != u.ualign.type && highaltar) {
|
if (altaralign != u.ualign.type && highaltar) {
|
||||||
desecrate_altar(highaltar, altaralign);
|
desecrate_altar(highaltar, altaralign);
|
||||||
} else if (value < 0) { /* don't think the gods are gonna like this... */
|
} else if (value < 0) { /* don't think the gods are gonna like this... */
|
||||||
|
|||||||
Reference in New Issue
Block a user