Permalink
Browse files
XEEN: Fix original bug prematurely resetting WEAK condition
- Loading branch information
Showing
with
10 additions
and
2 deletions.
-
+4
−0
engines/xeen/interface.cpp
-
+6
−2
engines/xeen/party.cpp
|
|
@@ -1077,6 +1077,10 @@ void Interface::rest() { |
|
|
c._conditions[UNCONSCIOUS] = 0; |
|
|
c._currentHp = c.getMaxHP(); |
|
|
c._currentSp = c.getMaxSP(); |
|
|
|
|
|
// WORKAROUND: Resting curing weakness only originally worked due to a bug in changeTime |
|
|
// resetting WEAK if party wasn't drunk. With that resolved, we have to reset WEAK here |
|
|
c._conditions[WEAK] = 0; |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
@@ -464,8 +464,12 @@ void Party::changeTime(int numMinutes) { |
|
|
} |
|
|
} |
|
|
|
|
|
player._conditions[WEAK] = player._conditions[DRUNK]; |
|
|
player._conditions[DRUNK] = 0; |
|
|
// WORKAROUND: Original incorrectly reset weakness (due to lack of sleep) even when party |
|
|
// wasn't drunk. We now have any resetting drunkness add to, rather than replace, weakness |
|
|
if (player._conditions[WEAK] != -1) { |
|
|
player._conditions[WEAK] += player._conditions[DRUNK]; |
|
|
player._conditions[DRUNK] = 0; |
|
|
} |
|
|
|
|
|
if (player._conditions[DEPRESSED]) { |
|
|
player._conditions[DEPRESSED] = (player._conditions[DEPRESSED] + 1) % 4; |
|
|
|