Bläddra i källkod

[added] Trauma system to limit max mood from julzor

KevinSmarts 4 år sedan
förälder
incheckning
97f17b3e96
3 ändrade filer med 21 tillägg och 0 borttagningar
  1. 3 0
      locations/cikl.qsrc
  2. 11 0
      locations/stat.qsrc
  3. 7 0
      locations/stat_display.qsrc

+ 3 - 0
locations/cikl.qsrc

@@ -629,6 +629,9 @@ if pcs_breath = 1:pcs_breath = 0
 
 if cheatNoEat = 1 and dounspell = 1:fat += 15
 
+!!Trauma decay
+if mood_trauma > 0: mood_trauma -= 1
+
 !!STD check
 if SifacOnce = 1:Sifilis += 1
 if GerpesOnce = 1:Gerpes += 1

+ 11 - 0
locations/stat.qsrc

@@ -210,6 +210,16 @@ if pcs_stam > stammax: pcs_stam = stammax
 if pcs_mana > manamax: pcs_mana = manamax
 if pcs_mood > 100: pcs_mood = 100
 
+!!Add mood_trauma to events to lower max mood for a period of time
+if mood_trauma > 0:
+	mood_max_calc = 100 - (mood_trauma * 5)
+	mood_max = max(10, mood_max_calc)
+	if pcs_mood > mood_max: pcs_mood = mood_max
+	killvar 'mood_max_calc'
+elseif mood_trauma < 0:
+	mood_trauma = 0
+end
+
 if hypnoAddict = 1 and pcs_horny < 30:
 	pcs_horny = 30
 elseif hypnoAddict = 2 and pcs_horny < 50:
@@ -988,6 +998,7 @@ if cheatNoMood = 0:
 	end
 else
 	pcs_mood = 100
+	mood_trauma = 0
 end
 
 if pcs_mood >= 80:

+ 7 - 0
locations/stat_display.qsrc

@@ -802,6 +802,13 @@ if cheatStatusIcons = 0:
 		$statusIconBarTab += '<td><a href="exec:msg ''You are really depressed and need to improve your mood.''"><img title="You are really depressed." height = <<set_siconht>> src="images/system/icon/status_icons/mood_6.png"></a></td>'
 	end
 	
+	if mood_trauma > 0:
+		mood_max_calc = max(10, mood_max)
+		$stat_trauma_msg = 'Recent events lower your maximum mood to <<mood_max_calc>>.'
+		$statusIconBarTab += '<td><a href="exec:msg $stat_trauma_msg"><img title="<<$stat_trauma_msg>>" height = <<set_siconht>> src="images/system/icon/status_icons/mood_6.png"></a></td>'
+		killvar 'mood_max_calc'
+	end
+	
 	if menu_off = 0:
 		if pain['total'] > 90:
 			$statusIconBarTab += '<td><a href="exec: menu_page = 3 & gs ''obj_din'', ''pain''"><img title="You feel you are at your limit with the amount of pain you''re feeling! Click to find out more." height = <<set_siconht>> src="images/system/icon/status_icons/pain_3.png"></a></td>'