1
0
Pārlūkot izejas kodu

Merge remote-tracking branch 'Lusticon/master'

Kevin_Smarts 7 mēneši atpakaļ
vecāks
revīzija
451741893f

+ 49 - 37
locations/arousal.qsrc

@@ -211,47 +211,59 @@ if $ARGS[0] ! 'end' and $ARGS[0] ! 'checks' and $ARGS[0] ! 'count' and $ARGS[0]
 		!! ARGS[3] length of inserted object
 		!! ARGS[4] grange of inserted object
 		!! ARGS[5] skill (0-2) aka silavag
-		!! ARGS[6] stimulation time
-		grdif = 0
-		ltdif = 0
+		killvar 'grdif'
+		killvar 'ltdif'
 		!! cap pain to vitality
 		if ARGS[2] < max_sex_pain:
-			!! length and girth abilities of hole are not also separated
-			!! but I suppose that they are related although it is not propable
-			!! we can estimate difference in girth and length
-			grdif = (ARGS[4] - ARGS[0])/2
-			ltdif = (ARGS[3] - ARGS[0])/4
-			!! painful intercourse
-			if pain_coeff > rand(0,2):
-				grdif += rand(pain_coeff/2, pain_coeff)
-				ltdif += rand(pain_coeff/2, pain_coeff)
-			end
-			!! in pain, compensated with lube
-			if ARGS[2] > 0:
-				if ARGS[2] > rand(ARGS[1]/2, ARGS[1]): grdif += rand(ARGS[2] / max(1,ARGS[1]/2), ARGS[2] / max(1,ARGS[1]/4))
-				if ARGS[2] > rand(ARGS[1]/2, ARGS[1]): ltdif += rand(ARGS[2] / max(1,ARGS[1]/2), ARGS[2] / max(1,ARGS[1]/4))
-			end
-			!! lube can compensate the difference a bit, or make it worse if there is no lube at all
-			if ARGS[1] > 0:
-				grdif -= rand(ARGS[1]/2, ARGS[1])
-				ltdif -= rand(ARGS[1]/4, ARGS[1]/2)
-			else
-				grdif += max(1, rand(grdif/4, grdif/2)) / max(1,ARGS[5]+1)
-				ltdif += max(1, rand(ltdif/6, ltdif/4)) / max(1,ARGS[5]+1)
-			end
-			!! when skilled, it does not harm PC
-			if ARGS[5] > 0 and ltdif > 0: ltdif /= max(1,ARGS[5]+1)
-			!! if there is any discomfort, check intercourse duration, compensated by skill
-			if stim_time > 1:
-				if grdif > rand(stim_time): grdif += rand(stim_time / (max(1,ARGS[5])*5), stim_time / (max(1,ARGS[5])*3))
-				if ltdif > rand(stim_time): ltdif += rand(stim_time / (max(1,ARGS[5])*5), stim_time / (max(1,ARGS[5])*3))
-			end
+			killvar 'i'
+			:stim_time_loop
+			if stim_time > i:
+				!! length and girth abilities of hole are not also separated
+				!! but I suppose that they are related although it is not propable
+				!! we can estimate difference in girth and length
+				grdif[i] = (ARGS[4] - ARGS[0])/2
+				ltdif[i] = (ARGS[3] - ARGS[0])/4
+				!! painful intercourse
+				if pain_coeff > rand(0,2):
+					grdif[i] += rand(pain_coeff/2, pain_coeff)
+					ltdif[i] += rand(pain_coeff/2, pain_coeff)
+				end
+				!! in pain, compensated with lube
+				if ARGS[2] > 0:
+					if ARGS[2] > rand(ARGS[1]/2, ARGS[1]): grdif[i] += rand(ARGS[2] / max(1,ARGS[1]/2), ARGS[2] / max(1,ARGS[1]/4))
+					if ARGS[2] > rand(ARGS[1]/2, ARGS[1]): ltdif[i] += rand(ARGS[2] / max(1,ARGS[1]/2), ARGS[2] / max(1,ARGS[1]/4))
+				end
+				!! lube can compensate the difference a bit, or make it worse if there is no lube at all
+				if ARGS[1] > 0:
+					grdif[i] -= rand(ARGS[1]/2, ARGS[1])
+					ltdif[i] -= rand(ARGS[1]/4, ARGS[1]/2)
+				else
+					grdif[i] += max(1, rand(grdif[i]/4, grdif[i]/2)) / max(1,ARGS[5]+1)
+					ltdif[i] += max(1, rand(ltdif[i]/6, ltdif[i]/4)) / max(1,ARGS[5]+1)
+				end
+				!! when skilled, length does not harm PC
+				if ARGS[5] > 0 and ltdif[i] > 0: ltdif[i] /= max(1,ARGS[5]+1)
 
-			!! min\max
-			grdif = max(0, grdif / max(1, (ARGS[0]/6)))
-			ltdif = max(0, ltdif / max(1, (ARGS[0]/6)))
+				!! min\max
+				grdif[i] = max(0, grdif[i] / max(1, (ARGS[0]/6)))
+				ltdif[i] = max(0, ltdif[i] / max(1, (ARGS[0]/6)))
+
+				i += 1+ARGS[5]
+				jump 'stim_time_loop'
+			end
 		end
-		!{ 'hole size <<ARGS[0]>>; length: <<ARGS[3]>>; grange: <<ARGS[4]>>; hole slippery: <<ARGS[1]>>; current pain: <<ARGS[2]>>; stim_time: <<stim_time>>; skill: <<ARGS[5]>>; grdif: <<grdif>>; ltdif: <<ltdif>>' }
+
+        i = arrsize('ltdif')
+        :stim_time_loop2
+        if i > 1:
+            i -= 1
+			grdif += grdif[i]
+			ltdif += ltdif[i]
+            jump 'stim_time_loop2'
+        end
+
+		!{'hole size <<ARGS[0]>>; length: <<ARGS[3]>>; grange: <<ARGS[4]>>; hole slippery: <<ARGS[1]>>; current pain: <<ARGS[2]>>; stim_time: <<stim_time>>; skill: <<ARGS[5]>>; grdif: <<grdif>>; ltdif: <<ltdif>>'}
+
 	}
 	$in_vag = {
 		if arousal_overcall = 0:

+ 0 - 38
locations/cikl.qsrc

@@ -567,44 +567,6 @@ if pregchem > 240:fat += 1
 !!	Pain
 !!------------------------------------------------------------------------------------------------------------
 
-if pain['head'] > 0:     pain['head']      -= max(rand(1,3), rand(pain['head']      /2))
-if pain['hair'] > 0:     pain['hair']      -= max(rand(1,3), rand(pain['hair']      /2))
-if pain['ears'] > 0:     pain['ears']      -= max(rand(1,3), rand(pain['ears']      /2))
-if pain['eyebrows'] > 0: pain['eyebrows']  -= max(rand(1,3), rand(pain['eyebrows']  /2))
-if pain['eyes'] > 0:     pain['eyes']      -= max(rand(1,3), rand(pain['eyes']      /2))
-if pain['cheeks'] > 0:   pain['cheeks']    -= max(rand(1,3), rand(pain['cheeks']    /2))
-if pain['nose'] > 0:     pain['nose']      -= max(rand(1,3), rand(pain['nose']      /2))
-if pain['mouth'] > 0:    pain['mouth']     -= max(rand(1,3), rand(pain['mouth']     /2))
-if pain['lips'] > 0:     pain['lips']      -= max(rand(1,3), rand(pain['lips']      /2))
-if pain['tongue'] > 0:   pain['tongue']    -= max(rand(1,3), rand(pain['tongue']    /2))
-if pain['throat'] > 0:   pain['throat']    -= max(rand(1,3), rand(pain['throat']    /2))
-if pain['neck'] > 0:     pain['neck']      -= max(rand(1,3), rand(pain['neck']      /2))
-if pain['back'] > 0:     pain['back']      -= max(rand(1,3), rand(pain['back']      /2))
-if pain['asscheeks'] > 0:pain['asscheeks'] -= max(rand(1,3), rand(pain['asscheeks'] /2))
-if pain['asshole'] > 0:  pain['asshole']   -= max(rand(1,3), rand(pain['asshole']   /2))
-if pain['hips'] > 0:     pain['hips']      -= max(rand(1,3), rand(pain['hips']      /2))
-if pain['thighs'] > 0:   pain['thighs']    -= max(rand(1,3), rand(pain['thighs']    /2))
-if pain['legL'] > 0:     pain['legL']      -= max(rand(1,3), rand(pain['legL']      /2))
-if pain['legR'] > 0:     pain['legR']      -= max(rand(1,3), rand(pain['legR']      /2))
-if pain['feet'] > 0:     pain['feet']      -= max(rand(1,3), rand(pain['feet']      /2))
-if pain['toes'] > 0:     pain['toes']      -= max(rand(1,3), rand(pain['toes']      /2))
-if pain['shoulders'] > 0:pain['shoulders'] -= max(rand(1,3), rand(pain['shoulders'] /2))
-if pain['armL'] > 0:     pain['armL']      -= max(rand(1,3), rand(pain['armL']      /2))
-if pain['armR'] > 0:     pain['armR']      -= max(rand(1,3), rand(pain['armR']      /2))
-if pain['hands'] > 0:    pain['hands']     -= max(rand(1,3), rand(pain['hands']     /2))
-if pain['fingers'] > 0:  pain['fingers']   -= max(rand(1,3), rand(pain['fingers']   /2))
-if pain['chest'] > 0:    pain['chest']     -= max(rand(1,3), rand(pain['chest']     /2))
-if pain['breasts'] > 0:  pain['breasts']   -= max(rand(1,3), rand(pain['breasts']   /2))
-if pain['nipples'] > 0:  pain['nipples']   -= max(rand(1,3), rand(pain['nipples']   /2))
-if pain['ribs'] > 0:     pain['ribs']      -= max(rand(1,3), rand(pain['ribs']      /2))
-if pain['tummy'] > 0:    pain['tummy']     -= max(rand(1,3), rand(pain['tummy']     /2))
-if pain['pubic'] > 0:    pain['pubic']     -= max(rand(1,3), rand(pain['pubic']     /2))
-if pain['vaginal'] > 0:  pain['vaginal']   -= max(rand(1,3), rand(pain['vaginal']   /2))
-if pain['labia'] > 0:    pain['labia']     -= max(rand(1,3), rand(pain['labia']     /2))
-if pain['clitoris'] > 0: pain['clitoris']  -= max(rand(1,3), rand(pain['clitoris']  /2))
-if pain['urethra'] > 0:  pain['urethra']   -= max(rand(1,3), rand(pain['urethra']   /2))
-if pain['cervix'] > 0:   pain['cervix']    -= max(rand(1,3), rand(pain['cervix']    /2))
-
 if painpub = 2:
 	if painpubday + 5 < daystart:
 		$painpub = 'Your vulva is painfully sore.'

+ 0 - 12
locations/hourly_events.qsrc

@@ -257,18 +257,6 @@ if KGOLpers > 0:
 	if KGMana < KGManaMax: KGMana += 10
 end
 
-!! pain[0] = pain['total'] , pain[1] = pain['damage'] , pain[2] = pain['relief']
-i = arrsize('pain')
-:statpainloop
-if i > 0:
-	i -= 1
-	pain[i] -= rand(0,1)
-	if pain[i] < 0: pain[i] = 0
-
-	jump 'statpainloop'
-end
-
-
 !! Panty happiness gain
 if pcs_mood < 60 and $pantyworntype = 'cats': pcs_mood += 2
 if pcs_mood < 60 and $braworntype = 'cats': pcs_mood += 2

+ 98 - 5
locations/pain.qsrc

@@ -12,6 +12,94 @@ if $ARGS[0] = 'calc':
     if pain['total'] > 100: pain['total'] = 100
     pain['damage'] = pain['total']
 
+    pain['relief'] = 0
+    gs 'drugs', 'pain_relief'
+    if pain['relief'] ! 0:
+        if (pain['total'] / pain['relief']) > 0:
+            pain['total'] = pain['total'] / pain['relief']
+        elseif pain['total'] > 0:
+            pain['total'] = 0
+        end
+    end
+
+    if pain['total'] > 80:
+        if (pcs_health * 5)      >= healthmax: pcs_health = pcs_health * 20 / 100
+        if (pcs_mood * 5)        >= 100: pcs_mood = pcs_mood * 20 / 100
+    elseif pain['total'] > 60:
+        if (pcs_health * 5 / 2)  >= healthmax: pcs_health = pcs_health * 40 / 100
+        if (pcs_mood * 5 / 2)    >= 100: pcs_mood = pcs_mood * 40 / 100
+    elseif pain['total'] > 40:
+        if (pcs_health * 5 / 3)  >= healthmax: pcs_health = pcs_health * 60 / 100
+        if (pcs_mood * 5 / 3)    >= 100: pcs_mood = pcs_mood * 60 / 100
+    elseif pain['total'] > 20:
+        if (pcs_health * 5 / 4)  >= healthmax: pcs_health = pcs_health * 80 / 100
+        if (pcs_mood * 5 / 4)    >= 100: pcs_mood = pcs_mood * 80 / 100
+    elseif pain['total'] > 0:
+        if (pcs_health * 10 / 9) >= healthmax: pcs_health = pcs_health * 90 / 100
+        if (pcs_mood * 10 / 9)   >= 100: pcs_mood = pcs_mood * 90 / 100
+    end
+
+elseif $ARGS[0] = 'manage':
+    !! first initialization
+    if pain['timer'] <= 0 and pain['total'] > 0: pain['timer'] = totminut+10
+
+    if pain['timer'] < totminut and pain['total'] > 0:
+        tmp = max(1, (totminut - pain['timer']) / 10)
+
+        if pain['hair'] > 0:      pain['hair']      -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['hair']     ) * max(0, insleep)))
+        if pain['head'] > 0:      pain['head']      -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['head']     ) * max(0, insleep)))
+        if pain['ears'] > 0:      pain['ears']      -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['ears']     ) * max(0, insleep)))
+        if pain['eyebrows'] > 0:  pain['eyebrows']  -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['eyebrows'] ) * max(0, insleep)))
+        if pain['eyes'] > 0:      pain['eyes']      -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['eyes']     ) * max(0, insleep)))
+        if pain['cheeks'] > 0:    pain['cheeks']    -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['cheeks']   ) * max(0, insleep)))
+        if pain['nose'] > 0:      pain['nose']      -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['nose']     ) * max(0, insleep)))
+        if pain['mouth'] > 0:     pain['mouth']     -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['mouth']    ) * max(0, insleep)))
+        if pain['lips'] > 0:      pain['lips']      -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['lips']     ) * max(0, insleep)))
+        if pain['tongue'] > 0:    pain['tongue']    -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['tongue']   ) * max(0, insleep)))
+        if pain['throat'] > 0:    pain['throat']    -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['throat']   ) * max(0, insleep)))
+        if pain['neck'] > 0:      pain['neck']      -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['neck']     ) * max(0, insleep)))
+        if pain['shoulders'] > 0: pain['shoulders'] -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['shoulders']) * max(0, insleep)))
+        if pain['armL'] > 0:      pain['armL']      -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['armL']     ) * max(0, insleep)))
+        if pain['armR'] > 0:      pain['armR']      -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['armR']     ) * max(0, insleep)))
+        if pain['hands'] > 0:     pain['hands']     -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['hands']    ) * max(0, insleep)))
+        if pain['fingers'] > 0:   pain['fingers']   -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['fingers']  ) * max(0, insleep)))
+        if pain['chest'] > 0:     pain['chest']     -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['chest']    ) * max(0, insleep)))
+        if pain['ribs'] > 0:      pain['ribs']      -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['ribs']     ) * max(0, insleep)))
+        if pain['breasts'] > 0:   pain['breasts']   -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['breasts']  ) * max(0, insleep)))
+        if pain['nipples'] > 0:   pain['nipples']   -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['nipples']  ) * max(0, insleep)))
+        if pain['tummy'] > 0:     pain['tummy']     -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['tummy']    ) * max(0, insleep)))
+        if pain['back'] > 0:      pain['back']      -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['back']     ) * max(0, insleep)))
+        if pain['hips'] > 0:      pain['hips']      -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['hips']     ) * max(0, insleep)))
+        if pain['thighs'] > 0:    pain['thighs']    -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['thighs']   ) * max(0, insleep)))
+        if pain['pubic'] > 0:     pain['pubic']     -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['pubic']    ) * max(0, insleep)))
+        if pain['asscheeks'] > 0: pain['asscheeks'] -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['asscheeks']) * max(0, insleep)))
+        if pain['asshole'] > 0:   pain['asshole']   -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['asshole']  ) * max(0, insleep)))
+        if pain['vaginal'] > 0:   pain['vaginal']   -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['vaginal']  ) * max(0, insleep)))
+        if pain['labia'] > 0:     pain['labia']     -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['labia']    ) * max(0, insleep)))
+        if pain['clitoris'] > 0:  pain['clitoris']  -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['clitoris'] ) * max(0, insleep)))
+        if pain['urethra'] > 0:   pain['urethra']   -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['urethra']  ) * max(0, insleep)))
+        if pain['cervix'] > 0:    pain['cervix']    -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['cervix']   ) * max(0, insleep)))
+        if pain['legL'] > 0:      pain['legL']      -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['legL']     ) * max(0, insleep)))
+        if pain['legR'] > 0:      pain['legR']      -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['legR']     ) * max(0, insleep)))
+        if pain['feet'] > 0:      pain['feet']      -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['feet']     ) * max(0, insleep)))
+        if pain['toes'] > 0:      pain['toes']      -= max(rand(tmp/3, tmp), (rand(tmp/2, tmp) + rand(pain['toes']     ) * max(0, insleep)))
+
+        i = arrsize('pain')
+        :statpainloop
+        if i > 0:
+            i -= 1
+            if pain[i] < 0: pain[i] = 0
+            jump 'statpainloop'
+        end
+
+        gs 'pain', 'calc'
+
+        !! 10 min here, but 30 when just received pain
+        pain['timer'] = totminut+10
+
+        killvar 'tmp'
+        killvar 'i'
+    end
 else
     !For checking pain and when applicable triggering arousal.
     !ARGS[0] magnitude of pain inflicted 1 is very light, 9 is the maximum value in the given way of causing pain
@@ -100,12 +188,17 @@ else
     curpain = (pain[1] * pain[2] * pain[3]) /10
     prevpain = pain[$painPart]
 
-    !! lastpain var can be used elsewhere, do not kill it
-    $lastpain = $painPart
-    lastpain = func( 'shortgs','modul',prevpain,curpain)
+    if arrpos('$ARGS', 'get') >= 0:
+        RESULT = func('shortgs','modul',prevpain,curpain)
+    else
+        !! lastpain var can be used elsewhere, do not kill it
+        $lastpain = $painPart
+        lastpain = func('shortgs','modul',prevpain,curpain)
 
-    pain[$painPart] = lastpain
-    if pain[$painPart] > 100: pain[$painPart] = 100
+        pain[$painPart] = lastpain
+        if pain[$painPart] > 100: pain[$painPart] = 100
+        pain['timer'] = totminut+30
+    end
 
     killvar 'prevpain'
     killvar 'curpain'

+ 1 - 31
locations/stat.qsrc

@@ -938,37 +938,7 @@ stat['cuni'] += kuni & kuni = 0
 stat['anal_strap_give'] += pegging & pegging = 0
 
 !!Pain calculation
-gs 'pain', 'calc'
-pain['relief'] = 0
-
-gs 'drugs', 'pain_relief'
-
-if pain['relief'] ! 0:
-	if (pain['total'] / pain['relief']) > 0:
-		pain['total'] = pain['total'] / pain['relief']
-	elseif pain['total'] > 0:
-		pain['total'] = 0
-	end
-end
-
-if pain['total'] > 80:
-	if (pcs_health * 5) >= healthmax: pcs_health = pcs_health * 20 / 100
-	if (pcs_mood * 5) >= 100: pcs_mood = pcs_mood * 20 / 100
-elseif pain['total'] > 60:
-	if (pcs_health * 5 / 2) >= healthmax: pcs_health = pcs_health * 40 / 100
-	if (pcs_mood * 5 / 2) >= 100: pcs_mood = pcs_mood * 40 / 100
-elseif pain['total'] > 40:
-	if (pcs_health * 5 / 3) >= healthmax: pcs_health = pcs_health * 60 / 100
-	if (pcs_mood * 5 / 3) >= 100: pcs_mood = pcs_mood * 60 / 100
-elseif pain['total'] > 20:
-	if (pcs_health * 5 / 4) >= healthmax: pcs_health = pcs_health * 80 / 100
-	if (pcs_mood * 5 / 4) >= 100: pcs_mood = pcs_mood * 80 / 100
-elseif pain['total'] > 0:
-	if (pcs_health * 10 / 9) >= healthmax: pcs_health = pcs_health * 90 / 100
-	if (pcs_mood * 10 / 9) >= 100: pcs_mood = pcs_mood * 90 / 100
-end
-
-!!--------------------------pain calculation end--------------------------------
+gs 'pain', 'manage'
 
 !!update skills and attributes to pcs_ from there _lvl values plus adjustments based on condition
 gs 'stat_sklattrib_lvlset'

+ 1 - 1
locations/uni_cafe.qsrc

@@ -39,7 +39,7 @@ if $ARGS[0] = '':
 				'You see a familiar face sitting at one of the tables having lunch, your former classmate <a href="exec:gt ''uni_cafe'',''artem''">Artem.</a>'
 			end
 		end
-		elseif temp_rand = 5:
+		if temp_rand = 5:
 			if meet_kendra = 1:
 				'You see <a href="exec:gt ''uni_cafe'', ''kendra''">Kendra</a> sitting at one of the tables having lunch.'
 			elseif kendraslave >= 1: