浏览代码

[added] refillable bottle, sandwich and kit_din dynamics to gadhouse
[added] light meal to kuhrpar
[changed] moved sandwich action to kit_din

julzor 5 年之前
父节点
当前提交
de9c834c1c
共有 3 个文件被更改,包括 59 次插入202 次删除
  1. 42 193
      locations/Gadhouse.qsrc
  2. 10 0
      locations/kit_din.qsrc
  3. 7 9
      locations/kuhrPar.qsrc

+ 42 - 193
locations/Gadhouse.qsrc

@@ -1,6 +1,7 @@
 # Gadhouse
 
 if $ARGS[0]='' or $ARGS[0] = 'Start':
+	CLOSE ALL
 	$location_type = 'indoors'
 	$metka = ''
 	$loc = 'Gadhouse'
@@ -9,10 +10,8 @@ if $ARGS[0]='' or $ARGS[0] = 'Start':
 	menu_off = 0
 	$locclass = 'singleroom'
 	curr_home = 2
-	cla
-	*clr
+	*clr & cla
 	frost = 0
-	CLOSE ALL
 	mira_temp = rand(1,5)
 	!125s
 	!execute before everything
@@ -46,8 +45,7 @@ if $ARGS[0]='' or $ARGS[0] = 'Start':
 		act 'Further': gt 'Gadhouse', 'Start'
 
 	elseif go_in_boletus = 1 and boletus >= grandpa_boletus and hour >= 6 and hour < 22:
-		cla
-		*clr
+		*clr & cla
 		grandmahelp += 1
 		boletus -= grandpa_boletus
 		minut += 5
@@ -65,8 +63,7 @@ if $ARGS[0]='' or $ARGS[0] = 'Start':
 		act 'Further': grandpa_boletus = 0 & gt 'Gadhouse', 'Start'
 
 	elseif go_in_boletus_bilberry = 1 and boletus >= grandpa_boletus and bilberry >= grandpa_bilberry and hour >= 6 and hour < 22:
-		cla
-		*clr
+		*clr & cla
 		grandmahelp += 1
 		boletus -= grandpa_boletus
 		bilberry -= grandpa_bilberry
@@ -85,8 +82,7 @@ if $ARGS[0]='' or $ARGS[0] = 'Start':
 		act 'Further': grandpa_boletus = 0 & grandpa_bilberry = 0 & gt 'Gadhouse', 'Start'
 
 	elseif go_in_bilberry = 1 and bilberry >= grandpa_bilberry and hour >= 6 and hour < 22:
-		cla
-		*clr
+		*clr & cla
 		grandmahelp += 1
 		bilberry -= grandpa_bilberry
 		minut += 5
@@ -104,8 +100,7 @@ if $ARGS[0]='' or $ARGS[0] = 'Start':
 		act 'Further': grandpa_bilberry = 0 & gt 'Gadhouse', 'Start'
 
 	elseif mira_temp = 1 and hour >= 9 and hour <= 19 and npc_rel['A60'] >= 15 and Mira_no = 0 and sunWeather = 0 and mira_guestday ! daystart and (npc_QW['A63'] < 13 or miragopQW >= 10 or mirasex > 1):
-		cla
-		*clr
+		*clr & cla
 		mira_guestday = daystart
 		minut += 5
 		mira_guest = 1
@@ -129,8 +124,7 @@ if $ARGS[0] = 'Main':
 	$menu_loc = 'Gadhouse'
 	$menu_arg = 'Main'
 	menu_off = 0
-	*clr
-	cla
+	*clr & cla
 	gs 'stat'
 	'<center><H4>Your Grandparents'' Cottage</H4></center>'
 	'<center><img <<$set_imgh>> src="images/locations/gadukino/village/izba.jpg"></center>'
@@ -139,10 +133,10 @@ if $ARGS[0] = 'Main':
 	'You can check your weight on your grandma''s old mechanical <a href="exec:msg ''<center>Your weight is <<pcs_weight>> kg<br>Your body mass index (BMI) is <<bmi_calc>>.<br><<$bmi_desc>></center>''">scales</a>.'
 
 	if hour < 8:
-		temp = RAND(0,9)
+		temp = rand(0,9)
 		if temp = 0:'In a box filled with scraps of cloth, <a href="exec: gt ''Gadhouse'',''villagecat''">Boniface</a> is curled up sleeping peacefully.'
 	elseif hour >= 8 and hour < 12 and sunWeather = 1:
-		temp = RAND(0,2)
+		temp = rand(0,2)
 		if temp = 1:'On the table by the window <a href="exec: gt ''Gadhouse'',''villagecat''">Boniface</a> is busy cleaning himself with his tongue.'
 		if temp = 2:'On the table by the window <a href="exec: gt ''Gadhouse'',''villagecat''">Boniface</a> lies lazily, soaking up some sunshine rays.'
 	elseif hour >= 8 and hour < 12 and sunWeather = 0:
@@ -150,16 +144,16 @@ if $ARGS[0] = 'Main':
 		if temp = 0: 'In a box filled with scraps of cloth, <a href="exec: gt ''Gadhouse'',''villagecat''">Boniface</a> is curled up sleeping peacefully.'
 		if temp = 1: 'On the table by the window <a href="exec: gt ''Gadhouse'',''villagecat''">Boniface</a> is staring in disgust at the rain outside.'
 	elseif hour >= 12 and hour < 18:
-		temp = RAND(0,5)
+		temp = rand(0,5)
 		if temp = 3:'Next to the table by the window <a href="exec:feedcat = 1 & gt ''Gadhouse'',''villagecat''">Boniface</a> stretches and meows loudly, it''s time for dinner.'
 		if temp = 4 and sunWeather = 1: 'On the table by the window <a href="exec: gt ''Gadhouse'',''villagecat''">Boniface</a> lies lazily, soaking up some sunshine rays.'
 		if temp = 4 and sunWeather = 0: 'In a box filled with scraps of cloth, <a href="exec: gt ''Gadhouse'',''villagecat''">Boniface</a> is curled up sleeping peacefully.'
 	elseif hour >= 18 and hour < 22 and catout ! 2:
-		temp = RAND(0,3)
+		temp = rand(0,3)
 		if temp = 0:'<a href="exec: gt ''Gadhouse'',''villagecat''">Boniface</a> is stalking around the main floor, looking for a nice juicy mouse to play with.'
 		if temp = 1 and catout = 0: catout = 1 &'<a href="exec: gt ''Gadhouse'',''villagecat''">Boniface</a> twines around your ankles then goes to the door meowing pitifully.'
 	elseif hour >= 22:
-		temp = RAND(0,2)
+		temp = rand(0,2)
 		if temp = 1:'In a box filled with scraps of cloth, <a href="exec: gt ''Gadhouse'',''villagecat''">Boniface</a> is curled up sleeping peacefully.'
 	end
 
@@ -173,9 +167,9 @@ if $ARGS[0] = 'Main':
 
 	if mira_guest = 1: MiraLoc = 6 & '<a href="exec: gt ''Miroslava'', ''Start''">Mira</a> is sitting next to you.'
 
-	clr
 	gs 'stat'
 	gs 'themes', 'indoors'
+	gs 'kit_din'
 
 	!125s
 	!{
@@ -231,148 +225,15 @@ if $ARGS[0] = 'Main':
 
 	act 'Have a snack (0:15)':gs 'food', 'snack'
 
-	act 'Drink some water (0:05)':gs 'beverage', 'bev_wat'
-
-	act 'Have a cup of tea (0:05)':
-		*clr & cla
-		minut += 5
-		if pcs_hydra >= 100:
-			'There is no need for tea. You''re not thirsty.'
-		else
-			pcs_hydra += 80
-			cumspclnt = 2
-			gs 'cum_cleanup'
-			pcs_breath = 0
-			'You make a cup of tea, quenching your thirst.'
-		end
-
-		gs 'stat'
-
-		act 'Get up from the table':gt 'Gadhouse', 'Main'
-	end
-
-	if pranik > 0:
-		'You have <<pranik>> tea biscuits on the plate.'
-
-		act 'Drink tea with biscuits (0:05)':
-			cla
-			*clr
-			menu_off = 1
-			minut += 5
-			pranik -= 1
-			pcs_health += 30
-			pcs_mood += 20
-			pcs_energy += 80
-			if pcs_hydra >= 100:
-				pcs_hydra += 30
-			else
-				pcs_hydra += 60
-			end
-			cumspclnt = 2
-			gs 'cum_cleanup'
-			pcs_breath = 0
-			fat += 4
-			frost = 0
-			gs 'stat'
-			'<center><img <<$set_imgh>> src="images/shared/food/food.jpg"></center>'
-			'You enjoy a cup of tea while you eat some of the tea biscuits. They''re too sweet and can''t be good for your figure, but they taste so good!'
-
-			act 'Get up from the table':gt 'Gadhouse', 'Main'
-		end
-	end
-
-	if edaD > 0:
-		act 'Prepare a diet meal (0:30)':
-			cla
-			*clr
-			menu_off = 1
-			frost = 0
-			minut += 30
-			pcs_health += 10
-			pcs_mood += 20
-			edaD -= 1
-			'<center><img <<$set_imgh>> src="images/shared/food/food.jpg"></center>'
-			if pcs_energy >= 100:
-				'You prepare a diet meal and try to eat it, but you''re full. You don''t even take a bite.'
-			elseif pcs_energy >= 80:
-				pcs_energy += 40
-				'You try to enjoy the meal, but half-way you realize you weren''t all that hungry. You manage to finish the meal, but feel like it was kind of a waste to prepare it.'
-			else
-				pcs_energy += 80
-				'The diet meal is tasty, and you enjoy eating it.'
-			end
-
-			if pcs_hydra >= 100:
-				'You''re not thirsty.'
-			else
-				pcs_hydra += 100
-				cumspclnt = 2
-				gs 'cum_cleanup'
-				pcs_breath = 0
-				'You make a cup of tea, quenching your thirst.'
-			end
-
-			act 'Get up from the table':gt 'Gadhouse', 'Main'
-		end
-	end
-
+	dynamic $sandwich
+	dynamic $driwater
+	dynamic $dritea
+	dynamic $fill_bottle
+	dynamic $edaD
+	dynamic $pranik
 	dynamic $fatdel
-
-	if lekarstvo > 0:
-		'You have <<lekarstvo>> tablet(s).'
-
-		if sick > 0 and lekarday ! daystart:
-			act 'Take a pill (0:05)':
-				cla
-				*clr
-				menu_off = 1
-				minut += 5
-				lekarday = daystart
-				lekarstvo -= 1
-				sick -= sick * 20 / 100
-				if pcs_hydra >= 100:
-					pcs_hydra += 25
-				else
-					pcs_hydra += 50
-				end
-				'<center><img <<$set_imgh>> src="images/locations/shared/apartment/event/sick/lekr<<picrand>>.jpg"></center>'
-				'You swallow the pill, and shortly after you feel a bit better.'
-
-				act 'Continue':gt 'Gadhouse', 'Main'
-			end
-		end
-	end
-
-	if vitamin > 0:
-		'You have <<vitamin>> vitamin pills.'
-
-		if vitaminday ! daystart:
-			act 'Take vitamins (0:05)':
-				cla
-				*clr
-				menu_off = 1
-
-				minut += 5
-				vitaminday = daystart
-				vitamin -= 1
-				frost = 0
-				if pcs_hydra >= 100:
-					pcs_hydra += 25
-				else
-					pcs_hydra += 50
-				end
-				if KandidozOnce = 1:Kandidoz -= 2
-				if GerpesOnce = 1:Gerpes -= 2
-				if SifacOnce = 1 and Sifilis >= 10:Sifilis -= rand(0, 1)
-
-				pcs_skin += 1
-
-				'You swallow a vitamin pill to stay healthy.'
-
-				act 'Continue':gt 'Gadhouse', 'Main'
-			end
-		end
-	end
+	dynamic $lekarstvo
+	dynamic $vitamin
 
 	gs 'events', 'read'
 	gs 'subkid'
@@ -415,11 +276,11 @@ if $ARGS[0] = 'Main':
 		end
 	end
 
-	if rand (0,2) ! 0:gs 'din_bad' & dynamic $mobile_check
+	if rand(0,2) ! 0: gs 'din_bad' & dynamic $mobile_check
 	act 'Relax on your bed': gt 'bed', 'start'
 end
 
-if $ARGS[0]='grandma':
+if $ARGS[0] = 'grandma':
 	*clr & cla
 	menu_off = 1
 	minut += 2
@@ -434,17 +295,13 @@ if $ARGS[0]='grandma':
 
 		act 'Maybe you should get dressed before talking to her':gt 'Gadhouse', 'Start'
 	else
-		if grigory_flower > 0 and grigory_flower < 10:
-			act 'Talk to her about the flowers': gt 'grigory', 'flower4'
-		end
-		if grandmahelpday ! daystart:
-			act 'Offer to help out': grandmahelpday = daystart & gt'grandmahelp'
-		end
-		!125s
+		if grigory_flower > 0 and grigory_flower < 10: act 'Talk to her about the flowers': gt 'grigory', 'flower4'
+		
+		if grandmahelpday ! daystart: act 'Offer to help out': grandmahelpday = daystart & gt'grandmahelp'
+
 		if grandmatalkgad = 0:
 			act 'Ask about the village (0:10)':
-				cla
-				*clr
+				*clr & cla
 				grandmatalkgad = 1
 				minut += 10
 				pcs_mood += 5
@@ -468,8 +325,7 @@ if $ARGS[0]='grandma':
 		!125e
 		if hour >= grandmatalk + 3:
 			act 'Chat with your grandmother (0:10)':
-				cla
-				*clr
+				*clr & cla
 				grandmatalk = hour
 				grandmatalkday = daystart
 				minut += 10
@@ -485,17 +341,16 @@ if $ARGS[0]='grandma':
 
 		if grandmastory ! daystart:
 			act 'Ask her to tell you a story (0:20)':
-				cla
-				*clr
+				*clr & cla
 				grandmastory = daystart
 				minut += 20
-				pcs_mood += RAND(10,15)
+				pcs_mood += rand(10,15)
 				gs 'stat'
 
 				'<center><img <<$set_imgh>> src="images/locations/gadukino/grandparents/babushka.jpg"></center>'
 				'When you ask your grandmother to tell you a story, she mumbles something. Nevertheless, after a brief second or two, she decides on a story to share with you today, she begins to talk slowly.'
 
-				temp = RAND(0,7)
+				temp = rand(0,7)
 
 				if temp = 0:
 					'"There was this one time my parents allowed me to stay at my friend''s home for the night. During the night, a lot of snow fell... and we heard a soft knock on the door!" she says in an ominous voice.'
@@ -571,18 +426,16 @@ if $ARGS[0]='grandpa':
 		act 'Maybe you should get dressed before talking to him':gt 'Gadhouse', 'Start'
 	else
 
-		if grigory_flower > 0 and grigory_flower < 10:
-			act 'Talk to him about the flowers': gt 'grigory', 'flower3'
-		end
+		if grigory_flower > 0 and grigory_flower < 10: act 'Talk to him about the flowers': gt 'grigory', 'flower3'
+		
 		if go_in_boletus = 1:'You promise to bring grandpa <<grandpa_boletus>> kg of mushrooms.'
 		if go_in_bilberry = 1:'You promise to bring grandpa <<grandpa_bilberry>> kg of berries.'
 		if go_in_boletus_bilberry = 1:'You promise to bring grandpa <<grandpa_boletus>> kg mushrooms and <<grandpa_bilberry>> kg of berries.'
-		!125s
+
 		if grandpahelpday ! daystart:act 'Offer to help':grandpahelpday = daystart & gt'grandpahelp'
 		if grandpatalkforest = 0:
 			act 'Ask about the forest (0:10)':
-				cla
-				*clr
+				*clr & cla
 				grandpatalkforest = 1
 				minut += 10
 				pcs_mood += 5
@@ -601,8 +454,7 @@ if $ARGS[0]='grandpa':
 		!125e
 		if hour >= grandpatalk + 3:
 			act 'Chat with your grandfather (0:10)':
-				cla
-				*clr
+				*clr & cla
 				grandpatalk = hour
 				grandpatalkday = daystart
 				minut += 10
@@ -630,8 +482,7 @@ if $ARGS[0]='villagecat':
 	'Your grandparents'' fat tomcat, Boniface, is aware of you approaching him, even though his eyes are closed. He tracks you with his ears and simply ignores you.'
 
 	act 'Pet Boniface':
-		cla
-		*clr
+		*clr & cla
 		minut += 5
 		pcs_mood += RAND(1,4)
 		gs 'stat'
@@ -644,8 +495,7 @@ if $ARGS[0]='villagecat':
 
 	if feedcat = 1:
 		act 'Feed Boniface':
-			cla
-			*clr
+			*clr & cla
 			minut +=5
 			gs 'stat'
 			feedcat = 2
@@ -658,15 +508,13 @@ if $ARGS[0]='villagecat':
 	if catout = 1:
 		act 'Let Boniface Out':
 			if sunWeather = 0:
-				cla
-				*clr
+				*clr & cla
 				minut += 10
 				gs 'stat'
 				'You open the door for Boniface who saunters around you only to stop in the doorway as he becomes aware that it is raining out. He glares up at you as if the rain was your fault. He stares out into the wet for another moment then sedately turns around and goes back to his box.'
 				act 'Continue': gt 'Gadhouse', 'Start'
 			else
-				cla
-				*clr
+				*clr & cla
 				minut +=10
 				gs 'stat'
 				catout = 2
@@ -750,5 +598,6 @@ if $ARGS[0] = 'intro':
 		end
 	end
 end
+
 --- Gadhouse ---------------------------------
 

+ 10 - 0
locations/kit_din.qsrc

@@ -546,6 +546,16 @@ $fill_bottle = {
 	end
 }
 
+$sandwich = {
+	if bag > 0 and buterbrod = 0: 
+		act 'Make a sandwich to go (0:05)': 
+			minut += 5
+			buterbrod = 1
+			gt $loc, $metka
+		end
+	end
+}
+
 $lekarstvo = {
 	if lekarstvo > 0:
 		'You have <b><<lekarstvo>></b> tablets.'

+ 7 - 9
locations/kuhrPar.qsrc

@@ -36,15 +36,13 @@ else
 end
 gs 'family'
 
-act 'Eat a meal (0:30)': dynamic $edahotd
-dynamic $edasnack
-if bag > 0 and buterbrod = 0: 
-	act 'Make a sandwich to go (0:05)': 
-		minut += 5
-		buterbrod = 1
-		gt $loc, $metka
-	end
-end
+act 'Eat a full meal (0:30)':gs 'food', 'm_meal'
+
+act 'Eat a light meal (0:25)':gs 'food', 's_meal'
+
+act 'Have a snack (0:15)':gs 'food', 'snack'
+
+dynamic $sandwich
 dynamic $driwater
 dynamic $dritea
 dynamic $fill_bottle