Restful sleep regenerates hp
When sleeping due to wearing an amulet of restful sleep, hit points will regenerate, one point faster than with normal regeneration.
This commit is contained in:
@@ -287,6 +287,7 @@ hero poly'd into rust monster could implicitly eat bars when adjacent by
|
|||||||
trying to move there, now when in rock mole form too; in xorn form
|
trying to move there, now when in rock mole form too; in xorn form
|
||||||
can explicitly eat them via 'e' after moving onto their spot
|
can explicitly eat them via 'e' after moving onto their spot
|
||||||
monster hiding under an egg that hatched was kept hidden
|
monster hiding under an egg that hatched was kept hidden
|
||||||
|
restful sleep regenerates hit points
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
@@ -471,6 +471,8 @@ boolean resuming;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define U_CAN_REGEN() (Regeneration || (Sleepy && u.usleep))
|
||||||
|
|
||||||
/* maybe recover some lost health (or lose some when an eel out of water) */
|
/* maybe recover some lost health (or lose some when an eel out of water) */
|
||||||
static void
|
static void
|
||||||
regen_hp(wtcap)
|
regen_hp(wtcap)
|
||||||
@@ -491,7 +493,7 @@ int wtcap;
|
|||||||
&& (!Half_physical_damage || !(g.moves % 2L)))
|
&& (!Half_physical_damage || !(g.moves % 2L)))
|
||||||
heal = -1;
|
heal = -1;
|
||||||
} else if (u.mh < u.mhmax) {
|
} else if (u.mh < u.mhmax) {
|
||||||
if (Regeneration || (encumbrance_ok && !(g.moves % 20L)))
|
if (U_CAN_REGEN() || (encumbrance_ok && !(g.moves % 20L)))
|
||||||
heal = 1;
|
heal = 1;
|
||||||
}
|
}
|
||||||
if (heal) {
|
if (heal) {
|
||||||
@@ -506,7 +508,7 @@ int wtcap;
|
|||||||
no !Upolyd check here, so poly'd hero recovered lost u.uhp
|
no !Upolyd check here, so poly'd hero recovered lost u.uhp
|
||||||
once u.mh reached u.mhmax; that may have been convenient
|
once u.mh reached u.mhmax; that may have been convenient
|
||||||
for the player, but it didn't make sense for gameplay...] */
|
for the player, but it didn't make sense for gameplay...] */
|
||||||
if (u.uhp < u.uhpmax && (encumbrance_ok || Regeneration)) {
|
if (u.uhp < u.uhpmax && (encumbrance_ok || U_CAN_REGEN())) {
|
||||||
if (u.ulevel > 9) {
|
if (u.ulevel > 9) {
|
||||||
if (!(g.moves % 3L)) {
|
if (!(g.moves % 3L)) {
|
||||||
int Con = (int) ACURR(A_CON);
|
int Con = (int) ACURR(A_CON);
|
||||||
@@ -523,8 +525,10 @@ int wtcap;
|
|||||||
if (!(g.moves % (long) ((MAXULEV + 12) / (u.ulevel + 2) + 1)))
|
if (!(g.moves % (long) ((MAXULEV + 12) / (u.ulevel + 2) + 1)))
|
||||||
heal = 1;
|
heal = 1;
|
||||||
}
|
}
|
||||||
if (Regeneration && !heal)
|
if (U_CAN_REGEN() && !heal)
|
||||||
heal = 1;
|
heal = 1;
|
||||||
|
if (Sleepy && u.usleep)
|
||||||
|
heal++;
|
||||||
|
|
||||||
if (heal) {
|
if (heal) {
|
||||||
g.context.botl = TRUE;
|
g.context.botl = TRUE;
|
||||||
@@ -541,6 +545,8 @@ int wtcap;
|
|||||||
interrupt_multi("You are in full health.");
|
interrupt_multi("You are in full health.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef U_CAN_REGEN
|
||||||
|
|
||||||
void
|
void
|
||||||
stop_occupation()
|
stop_occupation()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user