Skip to content
Permalink
Browse files

XEEN: Fix original bug prematurely resetting WEAK condition

  • Loading branch information
dreammaster committed Apr 29, 2018
1 parent 7798de5 commit 432d5fea3010964bc807c56d56f2e30b41c4c327
Showing with 10 additions and 2 deletions.
  1. +4 −0 engines/xeen/interface.cpp
  2. +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;

0 comments on commit 432d5fe

Please sign in to comment.
You can’t perform that action at this time.