1
0
Преглед на файлове

Added partially skin feature (need testing)

ADCSux преди 2 години
родител
ревизия
22dcb730eb
променени са 5 файла, в които са добавени 62 реда и са изтрити 12 реда
  1. 1 1
      locations/ApperanceSystem.qsrc
  2. 1 0
      locations/bed2.qsrc
  3. 44 6
      locations/body.qsrc
  4. 15 5
      locations/din_van.qsrc
  5. 1 0
      locations/shop.qsrc

+ 1 - 1
locations/ApperanceSystem.qsrc

@@ -35,7 +35,7 @@ if $args[0] = 'UpdateBaseAppearnce':
 			attributes (endurance and agility)
 	}
 	attributeBonus = func($this, 'CalcAttributeBonus')
-	skinBonus = (pcs_skin * 2 / 5)
+	skinBonus = pcs_skin / 10
 	bodyShapeBonus = func($this, 'SetBodyShapeBonus')
 
 	! Calculte base appearance

+ 1 - 0
locations/bed2.qsrc

@@ -280,6 +280,7 @@ if $ARGS[0] = 'sleep':
 	if pcs_makeup > 1 and cosmetic_tattoo = 0:
 		pcs_makeup = 0
 		vidageday -= 1
+		gs 'body', 'SkinLoss', 'MakeUpSleep'
 		*nl
 		'You went to bed wearing your makeup, which will smear your face as you sleep; your skin will age faster from this!'
 	end

+ 44 - 6
locations/body.qsrc

@@ -34,12 +34,9 @@ if $ARGS[0] = 'RegularUpdate':
 		pcs_weight = func($this, 'CalcWeight')
 		pcs_bmi = func($this, 'CalcBMI')
 	end
-
-	if pcs_skin > 100:
-		pcs_skin = 100
-	elseif pcs_skin < 0:
-		pcs_skin = 0
-	end
+	
+	!!Since "musle" is used all over the place
+	musle = strenbuf
 end
 
 if $ARGS[0] = 'DailyUpdate':
@@ -138,6 +135,23 @@ if $ARGS[0] = 'DailyUpdate':
 	end
 	
 	if age < 18 and rand (0,2) = 0 and pcs_leghair > 0: pcs_leghair -= 1
+
+	if pcs_skin <= 200:
+		pcs_skin += min(skinDailyGain * 2, 20) - skinDailyPenalty - 1
+	elseif pcs_skin <= 400:
+		pcs_skin += min(skinDailyGain, 10) - skinDailyPenalty - 1
+	elseif pcs_skin <= 600:
+		pcs_skin += min(skinDailyGain/2, 5) - skinDailyPenalty - 1
+	elseif pcs_skin <= 800:
+		pcs_skin += min(skinDailyGain/3, 3) - skinDailyPenalty - 1
+	elseif pcs_skin <= 900:
+		pcs_skin += min(skinDailyGain/5, 2) - skinDailyPenalty - 1
+	end
+
+	!skin variable reset
+	killvar 'moisturizerDailyCount'
+	killvar 'skinDailyGain'
+	killvar 'skinDailyPenalty'
 end
 
 if $ARGS[0] = '':
@@ -463,6 +477,30 @@ if $ARGS[0] = 'CalcBMI':
 	result = 10000 * (30 + salo / 2 + (pcs_hgt - 170) * 7 / 10) / (pcs_hgt * pcs_hgt)
 end
 
+if $ARGS[0] = 'SkinGain':
+	if $ARGS[1] = 'CleanSelf' and lastShowerSkinGain ! daystart:
+		lastShowerSkinGain = daystart
+		skinDailyGain += 5
+		if bathLuffa = 1: skinDailyGain += 3
+	end
+
+	if $ARGS[1] = 'Moisturizer':
+		moisturizerDailyCount += 1
+		if moisturizerDailyCount <= 2: skinDailyGain += 3
+	end
+end
+
+if $ARGS[0] = 'SkinLoss':
+	if $ARGS[1] = 'Smoke' and lastSmokeSkinPenalty ! daystart:
+		lastSmokeSkinPenalty = daystart
+		skinDailyPenalty += 1
+	end
+
+	if $ARGs[1] = 'MakeUpSleep':
+		skinDailyPenalty += 10
+	end
+end
+
 if $ARGS[0] = 'softreset':
 	!!This is for use in immediately updating shape if something has caused a large change in salo, primarily fat burners and plastic surgery
 	sftrstflag = 1

+ 15 - 5
locations/din_van.qsrc

@@ -29,6 +29,7 @@ $showerdin = {
 	else
 		killvar 'noShampoo'
 	end
+	gs 'body', 'SkinGain', 'CleanSelf'
 	if false_lashes >= 1:
 		if rand(0,4) <= 2:
 			'You''re careful enough that your false lashes make it through relatively unscathed.'
@@ -212,11 +213,7 @@ $bath = {
 		noShampoo_tmp = noShampoo
 		dynamic $showerdin
 
-		if bath_daystart ! daystart:
-			bath_daystart = daystart
-			pcs_skin += rand(1,2)
-			pcs_willpwr += 1
-		end
+		gs 'body', 'SkinGain', 'Bath'
 
 		gs 'stat'
 		'<center><img <<$set_imgh>> src="images/shared/home/bathroom/wash4.jpg"></center>'
@@ -292,6 +289,17 @@ $bath = {
 	killvar 'noShampoo_tmp'
 }
 
+$SkinCare = {
+	if item_moisturizer ! 0:
+		act 'Apply Moisturizer':
+		! Add Description here
+
+		gs 'body', 'SkinGain', 'Moisturizer'
+		gs 'stat'
+		end
+	end
+}
+
 $brit = {
 	if shave_menu = 1 and stanok > 1:
 		if pcs_leghair > 3 or (pubestyle > 0 and pcs_pubes >= shave_trigger):
@@ -1027,6 +1035,8 @@ if $ARGS[0] = 'private':
 		'<font color="red">You''ve run out of shampoo and will have to buy some more before you can wash yourself.</font>'
 	end
 
+	dynamic $SkinCare
+
 	if painkiller > 0:
 		'You have <b><<painkiller>></b> painkiller'+iif(painkiller > 1, 's.', '.')
 		if pain['total'] > 0 and pain['killer'] = 0:

+ 1 - 0
locations/shop.qsrc

@@ -392,6 +392,7 @@ if $shoplocation= 'cosmetics':
 	end
 	*pl '<center><table align="center" width=80%>'
 	*p func ('$stock_item', 50, 'Cosmetics', 1300, 'kosmetica', $curloc)
+	*p func ('$stock_item', 50, 'Moisturizer', 1300, 'item_moisturizer', $curloc)
 	*P func ('$stock_item', 30, 'Lip balm', 127, 'lipbalm', $curloc)
 	*p func ('$stock_item', 10, 'Plain false lashes', 1500, 'falselashesplain',$curloc)
 	*p func ('$stock_item', 3, 'Mink false lashes', 900, 'falselashesmink',$curloc)