Merge branch 'early_return' of https://github.com/argrath/NetHack into NetHack-3.7
This commit is contained in:
154
src/pray.c
154
src/pray.c
@@ -1914,7 +1914,8 @@ offer_corpse(struct obj *otmp, boolean highaltar, aligntyp altaralign)
|
|||||||
if (your_race(ptr)) {
|
if (your_race(ptr)) {
|
||||||
sacrifice_your_race(otmp, highaltar, altaralign);
|
sacrifice_your_race(otmp, highaltar, altaralign);
|
||||||
return;
|
return;
|
||||||
} else if (has_omonst(otmp)
|
}
|
||||||
|
if (has_omonst(otmp)
|
||||||
&& (mtmp = get_mtraits(otmp, FALSE)) != 0
|
&& (mtmp = get_mtraits(otmp, FALSE)) != 0
|
||||||
&& mtmp->mtame) {
|
&& mtmp->mtame) {
|
||||||
/* mtmp is a temporary pointer to a tame monster's attributes,
|
/* mtmp is a temporary pointer to a tame monster's attributes,
|
||||||
@@ -1924,11 +1925,13 @@ offer_corpse(struct obj *otmp, boolean highaltar, aligntyp altaralign)
|
|||||||
HAggravate_monster |= FROMOUTSIDE;
|
HAggravate_monster |= FROMOUTSIDE;
|
||||||
offer_negative_valued(highaltar, altaralign);
|
offer_negative_valued(highaltar, altaralign);
|
||||||
return;
|
return;
|
||||||
} else if (!value) {
|
}
|
||||||
|
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;
|
return;
|
||||||
} else if (is_undead(ptr)) { /* Not demons--no demon corpses */
|
}
|
||||||
|
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
|
||||||
bonus for wraith to chaotics too because they are sacrificing
|
bonus for wraith to chaotics too because they are sacrificing
|
||||||
@@ -1976,88 +1979,89 @@ offer_corpse(struct obj *otmp, boolean highaltar, aligntyp altaralign)
|
|||||||
|
|
||||||
if (altaralign != u.ualign.type && highaltar) {
|
if (altaralign != u.ualign.type && highaltar) {
|
||||||
desecrate_altar(highaltar, altaralign);
|
desecrate_altar(highaltar, altaralign);
|
||||||
} else if (u.ualign.type != altaralign) {
|
return;
|
||||||
|
}
|
||||||
|
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;
|
return;
|
||||||
} else {
|
}
|
||||||
consume_offering(otmp);
|
consume_offering(otmp);
|
||||||
/* OK, you get brownie points. */
|
/* OK, you get brownie points. */
|
||||||
if (u.ugangr) {
|
if (u.ugangr) {
|
||||||
int saved_anger = u.ugangr;
|
int saved_anger = u.ugangr;
|
||||||
u.ugangr -= ((value * (u.ualign.type == A_CHAOTIC ? 2 : 3))
|
u.ugangr -= ((value * (u.ualign.type == A_CHAOTIC ? 2 : 3))
|
||||||
/ MAXVALUE);
|
/ MAXVALUE);
|
||||||
if (u.ugangr < 0)
|
if (u.ugangr < 0)
|
||||||
u.ugangr = 0;
|
u.ugangr = 0;
|
||||||
if (u.ugangr != saved_anger) {
|
if (u.ugangr != saved_anger) {
|
||||||
if (u.ugangr) {
|
if (u.ugangr) {
|
||||||
pline("%s seems %s.", u_gname(),
|
pline("%s seems %s.", u_gname(),
|
||||||
Hallucination ? "groovy" : "slightly mollified");
|
Hallucination ? "groovy" : "slightly mollified");
|
||||||
|
|
||||||
if ((int) u.uluck < 0)
|
if ((int) u.uluck < 0)
|
||||||
change_luck(1);
|
change_luck(1);
|
||||||
} else {
|
} else {
|
||||||
pline("%s seems %s.", u_gname(),
|
pline("%s seems %s.", u_gname(),
|
||||||
Hallucination ? "cosmic (not a new fact)"
|
Hallucination ? "cosmic (not a new fact)"
|
||||||
: "mollified");
|
: "mollified");
|
||||||
|
|
||||||
if ((int) u.uluck < 0)
|
if ((int) u.uluck < 0)
|
||||||
u.uluck = 0;
|
u.uluck = 0;
|
||||||
}
|
}
|
||||||
} else { /* not satisfied yet */
|
} else { /* not satisfied yet */
|
||||||
|
if (Hallucination)
|
||||||
|
pline_The("gods seem tall.");
|
||||||
|
else
|
||||||
|
You("have a feeling of inadequacy.");
|
||||||
|
}
|
||||||
|
} else if (ugod_is_angry()) {
|
||||||
|
if (value > MAXVALUE)
|
||||||
|
value = MAXVALUE;
|
||||||
|
if (value > -u.ualign.record)
|
||||||
|
value = -u.ualign.record;
|
||||||
|
adjalign(value);
|
||||||
|
You_feel("partially absolved.");
|
||||||
|
} else if (u.ublesscnt > 0) {
|
||||||
|
int saved_cnt = u.ublesscnt;
|
||||||
|
u.ublesscnt -= ((value * (u.ualign.type == A_CHAOTIC ? 500 : 300))
|
||||||
|
/ MAXVALUE);
|
||||||
|
if (u.ublesscnt < 0)
|
||||||
|
u.ublesscnt = 0;
|
||||||
|
if (u.ublesscnt != saved_cnt) {
|
||||||
|
if (u.ublesscnt) {
|
||||||
if (Hallucination)
|
if (Hallucination)
|
||||||
pline_The("gods seem tall.");
|
You("realize that the gods are not like you and I.");
|
||||||
else
|
else
|
||||||
You("have a feeling of inadequacy.");
|
You("have a hopeful feeling.");
|
||||||
}
|
if ((int) u.uluck < 0)
|
||||||
} else if (ugod_is_angry()) {
|
change_luck(1);
|
||||||
if (value > MAXVALUE)
|
} else {
|
||||||
value = MAXVALUE;
|
if (Hallucination)
|
||||||
if (value > -u.ualign.record)
|
pline("Overall, there is a smell of fried onions.");
|
||||||
value = -u.ualign.record;
|
|
||||||
adjalign(value);
|
|
||||||
You_feel("partially absolved.");
|
|
||||||
} else if (u.ublesscnt > 0) {
|
|
||||||
int saved_cnt = u.ublesscnt;
|
|
||||||
u.ublesscnt -= ((value * (u.ualign.type == A_CHAOTIC ? 500 : 300))
|
|
||||||
/ MAXVALUE);
|
|
||||||
if (u.ublesscnt < 0)
|
|
||||||
u.ublesscnt = 0;
|
|
||||||
if (u.ublesscnt != saved_cnt) {
|
|
||||||
if (u.ublesscnt) {
|
|
||||||
if (Hallucination)
|
|
||||||
You("realize that the gods are not like you and I.");
|
|
||||||
else
|
|
||||||
You("have a hopeful feeling.");
|
|
||||||
if ((int) u.uluck < 0)
|
|
||||||
change_luck(1);
|
|
||||||
} else {
|
|
||||||
if (Hallucination)
|
|
||||||
pline("Overall, there is a smell of fried onions.");
|
|
||||||
else
|
|
||||||
You("have a feeling of reconciliation.");
|
|
||||||
if ((int) u.uluck < 0)
|
|
||||||
u.uluck = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
int saved_luck = u.uluck;
|
|
||||||
if (bestow_artifact())
|
|
||||||
return;
|
|
||||||
change_luck((value * LUCKMAX) / (MAXVALUE * 2));
|
|
||||||
if ((int) u.uluck < 0)
|
|
||||||
u.uluck = 0;
|
|
||||||
if (u.uluck != saved_luck) {
|
|
||||||
if (Blind)
|
|
||||||
You("think %s brushed your %s.", something,
|
|
||||||
body_part(FOOT));
|
|
||||||
else
|
else
|
||||||
You(Hallucination
|
You("have a feeling of reconciliation.");
|
||||||
? "see crabgrass at your %s. A funny thing in a dungeon."
|
if ((int) u.uluck < 0)
|
||||||
: "glimpse a four-leaf clover at your %s.",
|
u.uluck = 0;
|
||||||
makeplural(body_part(FOOT)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
int saved_luck = u.uluck;
|
||||||
|
if (bestow_artifact())
|
||||||
|
return;
|
||||||
|
change_luck((value * LUCKMAX) / (MAXVALUE * 2));
|
||||||
|
if ((int) u.uluck < 0)
|
||||||
|
u.uluck = 0;
|
||||||
|
if (u.uluck != saved_luck) {
|
||||||
|
if (Blind)
|
||||||
|
You("think %s brushed your %s.", something,
|
||||||
|
body_part(FOOT));
|
||||||
|
else
|
||||||
|
You(Hallucination
|
||||||
|
? "see crabgrass at your %s. A funny thing in a dungeon."
|
||||||
|
: "glimpse a four-leaf clover at your %s.",
|
||||||
|
makeplural(body_part(FOOT)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user