Parcourir la source

[changed] changes to how health is regained. You now regain your maximum health back over a total of 16 hours of sleep (2 full nights, or 3 shorter ones)

anjuna krokus il y a 2 semaines
Parent
commit
f32e0327a6
2 fichiers modifiés avec 13 ajouts et 6 suppressions
  1. 7 5
      locations/sleep.qsrc
  2. 6 1
      locations/sleep_simple.qsrc

+ 7 - 5
locations/sleep.qsrc

@@ -118,8 +118,6 @@ if $ARGS[0] = 'sleep_loop':
 		sleepVars['minutes_to_wakeup'] -= 1
 		sleepVars['time_to_full'] -= 1
 
-		if recuperation = 0 or sleepVars['no_health'] = 1: pcs_health += 5
-
 		if vibratorIN = 1:
 			sleepVars['vtime'] += 1
 			if sleepVars['vtime'] >= 5:
@@ -128,6 +126,12 @@ if $ARGS[0] = 'sleep_loop':
 			end
 		end
 
+		if recuperation = 0 or SleepVars['no_health'] = 1: sleepVars['health_stock'] += healthmax
+		if sleepVars['health_stock'] >= 960:
+			pcs_health += sleepVars['health_stock'] / 960
+			sleepVars['health_stock'] = sleepVars['health_stock'] mod 960
+		end
+
 		if sleepVars['stime'] mod 5 = 0: pcs_sleep += 1
 
 		if sleepVars['stime'] >= 60:
@@ -146,9 +150,7 @@ if $ARGS[0] = 'sleep_loop':
 
 		gs 'sleep', 'mod_sleeptriggers'
 
-		if sleepVars['stime'] mod 5 = 0:
-			gs 'sleep_events', 'start'
-		end
+		if sleepVars['stime'] mod 5 = 0: gs 'sleep_events', 'start'
 
 	if sleepVars['minutes_to_wakeup'] > 0: jump 'sleep_loop_loop'
 	sleepVars['no_health'] = 0

+ 6 - 1
locations/sleep_simple.qsrc

@@ -46,9 +46,14 @@ if $ARGS[0] = 'loop':
 		sleepVars['minutes_to_wakeup'] -= 1
 		sleepVars['time_to_full'] -= 1
 
-		if recuperation = 0 or SleepVars['no_health'] = 1: pcs_health += 5
+		if recuperation = 0 or SleepVars['no_health'] = 1: sleepVars['health_stock'] += healthmax
+		if sleepVars['health_stock'] >= 960:
+			pcs_health += sleepVars['health_stock'] / 960
+			sleepVars['health_stock'] = sleepVars['health_stock'] mod 960
+		end
 
 		if sleepVars['stime'] mod 5 = 0: pcs_sleep += 1
+
 		if sleepVars['stime'] >= 60: sleepVars['stime'] = 0
 		if minut = 60: gs 'stat'