split offering a corpse into a separate function
This commit is contained in:
20
src/pray.c
20
src/pray.c
@@ -29,6 +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 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);
|
||||||
@@ -1834,9 +1835,6 @@ dosacrifice(void)
|
|||||||
struct obj *otmp;
|
struct obj *otmp;
|
||||||
boolean highaltar;
|
boolean highaltar;
|
||||||
aligntyp altaralign = a_align(u.ux, u.uy);
|
aligntyp altaralign = a_align(u.ux, u.uy);
|
||||||
int value;
|
|
||||||
struct permonst *ptr;
|
|
||||||
struct monst *mtmp;
|
|
||||||
|
|
||||||
if (!on_altar() || u.uswallow) {
|
if (!on_altar() || u.uswallow) {
|
||||||
You("are not %s an altar.",
|
You("are not %s an altar.",
|
||||||
@@ -1867,11 +1865,21 @@ dosacrifice(void)
|
|||||||
return ECMD_TIME;
|
return ECMD_TIME;
|
||||||
} /* fake Amulet */
|
} /* fake Amulet */
|
||||||
|
|
||||||
if (otmp->otyp != CORPSE) {
|
if (otmp->otyp == CORPSE) {
|
||||||
pline1(nothing_happens);
|
return offer_corpse(otmp, highaltar, altaralign);
|
||||||
return ECMD_TIME;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pline1(nothing_happens);
|
||||||
|
return ECMD_TIME;
|
||||||
|
}
|
||||||
|
|
||||||
|
staticfn int
|
||||||
|
offer_corpse(struct obj *otmp, boolean highaltar, aligntyp altaralign)
|
||||||
|
{
|
||||||
|
int value;
|
||||||
|
struct permonst *ptr;
|
||||||
|
struct monst *mtmp;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Was based on nutritional value and aging behavior (< 50 moves).
|
* Was based on nutritional value and aging behavior (< 50 moves).
|
||||||
* Sacrificing a food ration got you max luck instantly, making the
|
* Sacrificing a food ration got you max luck instantly, making the
|
||||||
|
|||||||
Reference in New Issue
Block a user