Browse Source

[changed] New function to check whether a NPC realizes another character is pregnant

Christine 5 năm trước cách đây
mục cha
commit
a84c6c5b84
3 tập tin đã thay đổi với 48 bổ sung7 xóa
  1. 1 0
      glife.qproj
  2. 40 0
      locations/body_din.qsrc
  3. 7 7
      locations/brother.qsrc

+ 1 - 0
glife.qproj

@@ -65,6 +65,7 @@
 		<Location name="body_shape"/>
 		<Location name="lact_lib"/>
 		<Location name="lact_bp"/>
+		<Location name="body_din"/>
 		<Location name="medical_din"/>
 	</Folder>
 	<Folder name="Stimulus">

+ 40 - 0
locations/body_din.qsrc

@@ -0,0 +1,40 @@
+# body_din
+!! Medical procedures, such as abortions, are located at medical_din
+
+
+!! Determines whether a NPC sees that another character is pregnant.
+!! If ARGS 1-3 are not set the observed character is the player character (Sveta)
+!! Usage: visible = FUNC('body_din','pregnancyVisibility')
+!! Return values:
+!!				0: Has no reason to believe Sveta is pregnant
+!!				1: Believes Sveta is pregnant
+!! Parameters:
+!!				ARGS[1]; The current pregnancy state (default: pregchem)
+!!				$ARGS[2]: The worn clothing type (default $clothingworntype)
+!!				ARGS[3]: The worn clothing numer  (default: clothingwornnumber)
+
+if $ARGS[0] = 'pregnancyVisibility':
+	RESULT = 0
+	pregchemTemp = iif(ARGS[1] = 0,pregchem,ARGS[1])
+	$clothingworntypeTemp = iif(ARGS[2] = '',$clothingworntype,ARGS[2])
+	clothingwornnumberTemp = iif(ARGS[3] = 0,clothingwornnumber,ARGS[3])
+	
+	gs 'clothing_attributes',$clothingworntypeTemp,clothingwornnumberTemp
+	if (CloThinness >= 5 or $clothingworntypeTemp = 'nude') and pregchemTemp > 2000: 
+		RESULT = 1
+	elseif CloThinness = 4 and pregchemTemp > 3460: 
+		RESULT = 1
+	elseif CloThinness = 3 and pregchemTemp > 3990: 
+		RESULT = 1	
+	elseif CloThinness = 2 and pregchemTemp > 4200: 
+		RESULT = 1	
+	elseif pregchemTemp > 5200: 
+		RESULT = 1	
+	end
+
+	killvar 'pregchemTemp'
+	killvar '$clothingworntypeTemp'
+	killvar 'clothingwornnumberTemp'
+end
+
+--- body_din ---------------------------------

+ 7 - 7
locations/brother.qsrc

@@ -1460,22 +1460,22 @@ if $ARGS[0] = 'brother_voyeur_ev8':
 end
 
 if $ARGS[0] = 'pregreact':
-	if knowpreg = 1 and kid = 0:
-		if $clothingworntype = 'nude' and pregchem > 2000 and brotherSex < 7 and kid = 0:
+	if knowpreg = 1 and kid = 0 and FUNC('body_din','pregnancyVisibility') = 1:
+		if $clothingworntype = 'nude' and brotherSex < 7:
 			'Surprised, your brother looks at your stomach. "<<$pcs_nickname>>, are you pregnant? <<$npc_nickname[''A29'']>> and dad are going to be pissed!" After a moments pause he adds, "You do still look good, though."'
 			npc_pregtalk['A34'] = 1
 
 			act 'Continue' :gt 'sitrPar'
 		exit
 
-		elseif $clothingworntype ! 'nude' and pregchem > 3460 and brotherSex < 7 and kid = 0:
+		elseif $clothingworntype ! 'nude' and brotherSex < 7:
 			'Surprised, your brother looks at your stomach, "<<$pcs_nickname>>, why didn''t you tell me I''m going to be an uncle?"'
 			npc_pregtalk['A34'] = 1
 
 			act 'Continue' :gt 'sitrPar'
 			exit
-
-		elseif brotherSex >= 7 and kid = 0 and npc_pregtalk['A29'] = 0 and (($clothingworntype = 'nude' and pregchem > 2000) or ($clothingworntype ! 'nude' and pregchem >= 3460) or ($clothingworntype = 'nude' and pregchem < 2000) or ($clothingworntype ! 'nude' and pregchem < 3460)):
+		
+		elseif brotherSex >= 7 and npc_pregtalk['A29'] = 0:
 			cla
 			'Surprised, your brother looks at your stomach, "Are you really pregnant? It... it''s not mine, is it?"'
 			*nl
@@ -1490,7 +1490,7 @@ if $ARGS[0] = 'pregreact':
 			end
 			exit
 		end
-	elseif brotherSex < 7 and kid > 0 and (($clothingworntype = 'nude' and pregchem > 2000) or ($clothingworntype ! 'nude' and pregchem > 3460)):
+	elseif brotherSex < 7 and kid > 0 and FUNC('body_din','pregnancyVisibility') = 1:
 		'"You''re already pregnant again? This is starting to look like a new hobby," he laughs.'
 		'"You know what? Maybe it is," you joke back. "Some girls play sports, I get serially impregnated."'
 		'Kolka pokes his tongue out at you, "Well, congratulations on taking home the gold in getting knocked up."'
@@ -1500,7 +1500,7 @@ if $ARGS[0] = 'pregreact':
 		'You leave your brother to what he was doing before, glad that the two of you have the relationship that you do.'
 
 		act 'Continue' :npc_pregtalk['A34'] = 1 & gt 'sitrPar'
-	elseif brotherSex >= 7 and kid > 0 and npc_pregtalk['A29'] = 0 and (($clothingworntype = 'nude' and pregchem >= 2000) or ($clothingworntype ! 'nude' and pregchem >= 3460)):
+	elseif brotherSex >= 7 and kid > 0 and npc_pregtalk['A29'] = 0 and FUNC('body_din','pregnancyVisibility') = 1:
 		cla
 		'Kolka looks at your stomach for moment before asking, "Wow, you''re pregnant again? Is it mine?"'
 		*nl