omit return value of offer_corpse(), as it is always ECMD_TIME
This commit is contained in:
22
src/pray.c
22
src/pray.c
@@ -29,7 +29,7 @@ staticfn void offer_different_alignment_altar(struct obj *, aligntyp);
|
|||||||
staticfn void sacrifice_your_race(struct obj *, boolean, aligntyp);
|
staticfn void sacrifice_your_race(struct obj *, boolean, aligntyp);
|
||||||
staticfn int bestow_artifact(void);
|
staticfn int bestow_artifact(void);
|
||||||
staticfn int sacrifice_value(struct obj *);
|
staticfn int sacrifice_value(struct obj *);
|
||||||
staticfn int offer_corpse(struct obj *, boolean, aligntyp);
|
staticfn void offer_corpse(struct obj *, boolean, aligntyp);
|
||||||
staticfn boolean pray_revive(void);
|
staticfn boolean pray_revive(void);
|
||||||
staticfn boolean water_prayer(boolean);
|
staticfn boolean water_prayer(boolean);
|
||||||
staticfn boolean blocked_boulder(int, int);
|
staticfn boolean blocked_boulder(int, int);
|
||||||
@@ -1866,14 +1866,15 @@ dosacrifice(void)
|
|||||||
} /* fake Amulet */
|
} /* fake Amulet */
|
||||||
|
|
||||||
if (otmp->otyp == CORPSE) {
|
if (otmp->otyp == CORPSE) {
|
||||||
return offer_corpse(otmp, highaltar, altaralign);
|
offer_corpse(otmp, highaltar, altaralign);
|
||||||
|
return ECMD_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
pline1(nothing_happens);
|
pline1(nothing_happens);
|
||||||
return ECMD_TIME;
|
return ECMD_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
staticfn int
|
staticfn void
|
||||||
offer_corpse(struct obj *otmp, boolean highaltar, aligntyp altaralign)
|
offer_corpse(struct obj *otmp, boolean highaltar, aligntyp altaralign)
|
||||||
{
|
{
|
||||||
int value;
|
int value;
|
||||||
@@ -1904,7 +1905,7 @@ offer_corpse(struct obj *otmp, boolean highaltar, aligntyp altaralign)
|
|||||||
*/
|
*/
|
||||||
feel_cockatrice(otmp, TRUE);
|
feel_cockatrice(otmp, TRUE);
|
||||||
if (rider_corpse_revival(otmp, FALSE))
|
if (rider_corpse_revival(otmp, FALSE))
|
||||||
return ECMD_TIME;
|
return;
|
||||||
|
|
||||||
value = sacrifice_value(otmp);
|
value = sacrifice_value(otmp);
|
||||||
|
|
||||||
@@ -1912,7 +1913,7 @@ offer_corpse(struct obj *otmp, boolean highaltar, aligntyp altaralign)
|
|||||||
too old (value==0) */
|
too old (value==0) */
|
||||||
if (your_race(ptr)) {
|
if (your_race(ptr)) {
|
||||||
sacrifice_your_race(otmp, highaltar, altaralign);
|
sacrifice_your_race(otmp, highaltar, altaralign);
|
||||||
return ECMD_TIME;
|
return;
|
||||||
} else if (has_omonst(otmp)
|
} else if (has_omonst(otmp)
|
||||||
&& (mtmp = get_mtraits(otmp, FALSE)) != 0
|
&& (mtmp = get_mtraits(otmp, FALSE)) != 0
|
||||||
&& mtmp->mtame) {
|
&& mtmp->mtame) {
|
||||||
@@ -1922,11 +1923,11 @@ offer_corpse(struct obj *otmp, boolean highaltar, aligntyp altaralign)
|
|||||||
adjalign(-3);
|
adjalign(-3);
|
||||||
HAggravate_monster |= FROMOUTSIDE;
|
HAggravate_monster |= FROMOUTSIDE;
|
||||||
offer_negative_valued(highaltar, altaralign);
|
offer_negative_valued(highaltar, altaralign);
|
||||||
return ECMD_TIME;
|
return;
|
||||||
} 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);
|
pline1(nothing_happens);
|
||||||
return ECMD_TIME;
|
return;
|
||||||
} 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
|
||||||
@@ -1947,7 +1948,7 @@ offer_corpse(struct obj *otmp, boolean highaltar, aligntyp altaralign)
|
|||||||
: unicalign ? "law" : "balance");
|
: unicalign ? "law" : "balance");
|
||||||
(void) adjattrib(A_WIS, -1, TRUE);
|
(void) adjattrib(A_WIS, -1, TRUE);
|
||||||
offer_negative_valued(highaltar, altaralign);
|
offer_negative_valued(highaltar, altaralign);
|
||||||
return ECMD_TIME;
|
return;
|
||||||
} else if (u.ualign.type == altaralign) {
|
} else if (u.ualign.type == altaralign) {
|
||||||
/* When different from altar, and altar is same as yours,
|
/* When different from altar, and altar is same as yours,
|
||||||
* it's a very good action.
|
* it's a very good action.
|
||||||
@@ -1978,7 +1979,7 @@ offer_corpse(struct obj *otmp, boolean highaltar, aligntyp altaralign)
|
|||||||
} else if (u.ualign.type != altaralign) {
|
} else if (u.ualign.type != altaralign) {
|
||||||
/* Sacrificing at an altar of a different alignment */
|
/* Sacrificing at an altar of a different alignment */
|
||||||
offer_different_alignment_altar(otmp, altaralign);
|
offer_different_alignment_altar(otmp, altaralign);
|
||||||
return ECMD_TIME;
|
return;
|
||||||
} else {
|
} else {
|
||||||
int saved_anger = u.ugangr;
|
int saved_anger = u.ugangr;
|
||||||
int saved_cnt = u.ublesscnt;
|
int saved_cnt = u.ublesscnt;
|
||||||
@@ -2043,7 +2044,7 @@ offer_corpse(struct obj *otmp, boolean highaltar, aligntyp altaralign)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (bestow_artifact())
|
if (bestow_artifact())
|
||||||
return ECMD_TIME;
|
return;
|
||||||
change_luck((value * LUCKMAX) / (MAXVALUE * 2));
|
change_luck((value * LUCKMAX) / (MAXVALUE * 2));
|
||||||
if ((int) u.uluck < 0)
|
if ((int) u.uluck < 0)
|
||||||
u.uluck = 0;
|
u.uluck = 0;
|
||||||
@@ -2059,7 +2060,6 @@ offer_corpse(struct obj *otmp, boolean highaltar, aligntyp altaralign)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ECMD_TIME;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* determine prayer results in advance; also used for enlightenment */
|
/* determine prayer results in advance; also used for enlightenment */
|
||||||
|
|||||||
Reference in New Issue
Block a user