Browse Source

add some perception code (nutluck)

rachels 2 years ago
parent
commit
644ca348d4
1 changed files with 134 additions and 105 deletions
  1. 134 105
      locations/street_event.qsrc

+ 134 - 105
locations/street_event.qsrc

@@ -248,59 +248,65 @@ if $ARGS[1] = 'main':
 	if streetrand < streetev_rape and hour <= 3 and streetev_day ! daystart and cheat_street_rapists = 0:
 		*clr & cla
 		menu_off = 1
+		prcptn_exp += rand(1,2)
 		streetev_day = daystart
+		temp = rand(1,100) + pcs_observ
 		'<<$streetev_title>>'
 		'<center><img <<$set_imgh>> src="images/locations/shared/street/rapist.jpg"></center>'
-		'As you walk down the street, a man jumps out of the shadows and suddenly grabs you. As you''re caught off-guard, he manages to drag you into a nearby alleyway. You try to scream but his strong hand covers your mouth. You attempt to get free, but his other arm wraps around your waist and lifts you off the ground as he drags you further down the alleyway.'
-		gs 'npcgeneratec', 0, 'Rapist', rand(18,45)
-		gs 'boyStat', $npclastgenerated
-		gs 'stat'
-		act 'Attempt to escape':
-!!should likely add willpower here to increase the odds of escaping but I never did understand how to add willpower to increase a skill check, but it would make sense here.
-			if pcs_run < 10:
-				peshimraperand = rand(0, 11)
-			elseif pcs_run < 30:
-				peshimraperand = rand(0, 20)
-			elseif pcs_run < 50:
-				peshimraperand = rand(0, 30)
-			elseif pcs_run < 70:
-				peshimraperand = rand(0, 40)
-			elseif pcs_run < 90:
-				peshimraperand = rand(0, 50)
-			elseif pcs_run < 110:
-				peshimraperand = rand(0, 60)
-			elseif pcs_run < 130:
-				peshimraperand = rand(0, 70)
-			elseif pcs_run < 150:
-				peshimraperand = rand(0, 80)
-			elseif pcs_run < 170:
-				peshimraperand = rand(0, 90)
-			else
-				peshimraperand = 11
-			end
+		if temp >= 100:
+			'You notice a hooded man standing in a darkened alleyway up ahead. Feeling he is up to no good you cross the street to the other side before you get to him. You see him look your direction before fading back into the darkness of the alleyway.'
+			act 'Continue':gt $loc
+		else
+			'As you walk down the street, a man jumps out of the shadows and suddenly grabs you. As you''re caught off-guard, he manages to drag you into a nearby alleyway. You try to scream but his strong hand covers your mouth. You attempt to get free, but his other arm wraps around your waist and lifts you off the ground as he drags you further down the alleyway.'
+			gs 'npcgeneratec', 0, 'Rapist', rand(18,45)
+			gs 'boyStat', $npclastgenerated
+			gs 'stat'
+			act 'Attempt to escape':
+				if pcs_run < 10:
+					peshimraperand = rand(0, 11)
+				elseif pcs_run < 30:
+					peshimraperand = rand(0, 20)
+				elseif pcs_run < 50:
+					peshimraperand = rand(0, 30)
+				elseif pcs_run < 70:
+					peshimraperand = rand(0, 40)
+				elseif pcs_run < 90:
+					peshimraperand = rand(0, 50)
+				elseif pcs_run < 110:
+					peshimraperand = rand(0, 60)
+				elseif pcs_run < 130:
+					peshimraperand = rand(0, 70)
+				elseif pcs_run < 150:
+					peshimraperand = rand(0, 80)
+				elseif pcs_run < 170:
+					peshimraperand = rand(0, 90)
+				else
+					peshimraperand = 11
+				end
 
-			if peshimraperand <= 10:
-				*clr & cla
-				'<center><img <<$set_imgh>> src="images/locations/shared/street/rapist.jpg"></center>'
-				'You try to run away, but you''re not quick enough, and he catches you before you even get close to the end of the alleyway. He places a hand over your mouth so you can''t scream and drags you back into the alley.'
-				act 'Struggle': gt 'street_event', 'rape'
-			else
-				*clr & cla
-				'<center><img <<$set_imgh>> src="images/locations/shared/street/alleynight.jpg"></center>'
-				'You manage to lose him and get to a safer well lit area.'
-				act 'Continue':gt $loc
+				if peshimraperand <= 10:
+					*clr & cla
+					'<center><img <<$set_imgh>> src="images/locations/shared/street/rapist.jpg"></center>'
+					'You try to run away, but you''re not quick enough, and he catches you before you even get close to the end of the alleyway. He places a hand over your mouth so you can''t scream and drags you back into the alley.'
+					act 'Struggle': gt 'street_event', 'rape'
+				else
+					*clr & cla
+					'<center><img <<$set_imgh>> src="images/locations/shared/street/alleynight.jpg"></center>'
+					'You manage to lose him and get to a safer well lit area.'
+					act 'Continue':gt $loc
+				end
 			end
-		end
-		if succubusQW = 5:
-			!!Used if this was a random encounter instead of active hunting
-			act 'Lure him in and feed (this can take a lot of time)':
-				cla
-				'You wait until he has dragged you into the alley before turning on him.'
-				act 'Continue': gt 'succubus', 'RapistFight'
+			if succubusQW = 5:
+				!!Used if this was a random encounter instead of active hunting
+				act 'Lure him in and feed (this can take a lot of time)':
+					cla
+					'You wait until he has dragged you into the alley before turning on him.'
+					act 'Continue': gt 'succubus', 'RapistFight'
+				end
 			end
+			act 'Struggle': gt 'street_event', 'rape'
+			exit
 		end
-		act 'Struggle': gt 'street_event', 'rape'
-		exit
 	end
 
 	streetrand = rand(0, 100)
@@ -308,67 +314,74 @@ if $ARGS[1] = 'main':
 		*clr & cla
 		menu_off = 1
 		streetev_day = daystart
+		prcptn_exp += rand(1,2)
 		gs 'stat'
+		temp = rand(1,100) + pcs_observ
 		'<<$streetev_title>>'
 		'<center><img <<$set_imgh>> src="images/locations/shared/street/mugger.jpg"></center>'
-		'Suddenly a man wearing a hoodie steps out from a darkened doorway in your path. He has one hand in his pocket, and the other he extends towards you. You can''t see his face as he says, "Give me all your money bitch, and you won''t get hurt."'
-		act 'Attempt to escape':
-			'<center><img <<$set_imgh>> src="images/locations/shared/street/alleynight.jpg"></center>'
+		if temp >= 100:
+			'You notice a hooded man standing in a darkened doorway up ahead. Feeling he is up to no good you cross the street to the other side before you get to him. You see him look your direction before fading back into the darkness of the doorway.'
+			act 'Continue':gt $loc
+		else
+			'Suddenly a man wearing a hoodie steps out from a darkened doorway in your path. He has one hand in his pocket, and the other he extends towards you. You can''t see his face as he says, "Give me all your money bitch, and you won''t get hurt."'
+			act 'Attempt to escape':
+				'<center><img <<$set_imgh>> src="images/locations/shared/street/alleynight.jpg"></center>'
 
-			if pcs_run < 10:
-				peshimraperand = rand(0, 11)
-			elseif pcs_run < 30:
-				peshimraperand = rand(0, 20)
-			elseif pcs_run < 50:
-				peshimraperand = rand(0, 30)
-			elseif pcs_run < 70:
-				peshimraperand = rand(0, 40)
-			elseif pcs_run < 90:
-				peshimraperand = rand(0, 50)
-			elseif pcs_run < 110:
-				peshimraperand = rand(0, 60)
-			elseif pcs_run < 130:
-				peshimraperand = rand(0, 70)
-			elseif pcs_run < 150:
-				peshimraperand = rand(0, 80)
-			elseif pcs_run < 170:
-				peshimraperand = rand(0, 90)
-			else
-				peshimraperand = 11
+				if pcs_run < 10:
+					peshimraperand = rand(0, 11)
+				elseif pcs_run < 30:
+					peshimraperand = rand(0, 20)
+				elseif pcs_run < 50:
+					peshimraperand = rand(0, 30)
+				elseif pcs_run < 70:
+					peshimraperand = rand(0, 40)
+				elseif pcs_run < 90:
+					peshimraperand = rand(0, 50)
+				elseif pcs_run < 110:
+					peshimraperand = rand(0, 60)
+				elseif pcs_run < 130:
+					peshimraperand = rand(0, 70)
+				elseif pcs_run < 150:
+					peshimraperand = rand(0, 80)
+				elseif pcs_run < 170:
+					peshimraperand = rand(0, 90)
+				else
+					peshimraperand = 11
+				end
+				if peshimraperand <= 10:
+					*clr & cla
+					'He drags you into an alley.'
+					money = 0
+					gs 'stat'
+					'You try to run away, but you''re not quick enough, and he catches you. He grabs your purse and rummages in it, knocking most of the contents out on the ground. Once he has your money, he throws the purse back at you and then takes off running. You try to calm yourself down as you squat to gather your stuff back up and put them back in your purse.'
+					act 'Leave':gt $loc
+				else
+					*clr & cla
+					'You manage to lose him and get to a safer well lit area.'
+					act 'Continue':gt $loc
+				end
 			end
-			if peshimraperand <= 10:
-				*clr & cla
-				'He drags you into an alley.'
+			act 'Don''t fight, just give him your money':
+				cla
 				money = 0
 				gs 'stat'
-				'You try to run away, but you''re not quick enough, and he catches you. He grabs your purse and rummages in it, knocking most of the contents out on the ground. Once he has your money, he throws the purse back at you and then takes off running. You try to calm yourself down as you squat to gather your stuff back up and put them back in your purse.'
+				'You quickly open your purse. As you do, he grabs it from you and rummages in it. Knocking most of the contents out on the ground. Once he has your money, he throws the purse back at you and then takes off running. You try to calm yourself down as you squat to gather your stuff back up and put them back in your purse.'
 				act 'Leave':gt $loc
-			else
-				*clr & cla
-				'You manage to lose him and get to a safer well lit area.'
-				act 'Continue':gt $loc
 			end
-		end
-		act 'Don''t fight, just give him your money':
-			cla
-			money = 0
-			gs 'stat'
-			'You quickly open your purse. As you do, he grabs it from you and rummages in it. Knocking most of the contents out on the ground. Once he has your money, he throws the purse back at you and then takes off running. You try to calm yourself down as you squat to gather your stuff back up and put them back in your purse.'
-			act 'Leave':gt $loc
-		end
-		act 'Fight':
-			cla
-			'You clutch your purse to your body and tell him, "Fuck you asshole!" He snarls and lunges at you.'
-			act 'Defend yourself':
+			act 'Fight':
 				cla
-				gs 'npcgeneratec', 0, 'Robber', rand(18,45)
-				gs 'boyStat', $npclastgenerated
+				'You clutch your purse to your body and tell him, "Fuck you asshole!" He snarls and lunges at you.'
+				act 'Defend yourself':
+					cla
+					gs 'npcgeneratec', 0, 'Robber', rand(18,45)
+					gs 'boyStat', $npclastgenerated
 
-				gs 'fight','initFight'
+					gs 'fight','initFight'
 
-				gs 'fight_npcdata', 'robber'
+					gs 'fight_npcdata', 'robber'
 
-				gt 'fight', 'start'
+					gt 'fight', 'start'
+				end
 			end
 		end
 		exit
@@ -750,11 +763,26 @@ if $ARGS[1] = 'main':
 			*clr & cla
 			menu_off = 1
 			minut += 5
+			prcptn_exp += rand(1,2)
 			gs 'stat'
 			'<<$streetev_title>>'
 			'<center><img <<$set_imgh>> src="images/locations/shared/street/beatup.jpg"></center>'
-			'As you walk down the street, you pass a man that is badly beaten lying unconscious on the sidewalk. You stop a moment, unsure what to do, but everyone else just ignores him. Not being sure what you could do to help, you continue on your way and wonder what happened to him.'
-			act 'Continue':gt $loc
+			'As you walk down the street, you pass a man that is badly beaten lying unconscious on the sidewalk. You stop a moment, unsure what to do, but everyone else just ignores him.'
+			act 'Ignore him':
+				'<center><img <<$set_imgh>> src="images/locations/shared/street/beatup.jpg"></center>'
+				'Not being sure what you could do to help, you continue on your way and wonder what happened to him.'
+				act 'Continue':gt $loc
+			end
+			act 'Call police':
+				*clr & cla
+				minut += 20
+				mood += 20
+				gs 'stat'
+				'<<$streetev_title>>'
+				'<center><img <<$set_imgh>> src="images/locations/shared/police/patrol.jpg"></center>'
+				'You call the police and are told to wait for the officers, it takes some time before the do. When a car finally pulls the officers get out and ask you a few questions then tell you to be on your way. You look back and they call in and start talking to the man, you continue on your way finally.'
+				act 'Continue':gt $loc
+			end
 		elseif streetrand > 84:
 			if hour >= 9:
 				menu_off = 1
@@ -914,6 +942,7 @@ if $ARGS[1] = 'main':
 				menu_off = 1
 				minut += 5
 				pcs_horny += 5
+				prcptn_exp += rand(1,2)
 				gs 'stat'
 				'<<$streetev_title>>'
 				'<center><img <<$set_imgh>> src="images/locations/shared/street/lostkey.jpg"></center>'
@@ -1013,7 +1042,7 @@ if $ARGS[1] = 'main':
 				gs 'stat'
 				'<<$streetev_title>>'
 				'<center><img <<$set_imgh>> src="images/locations/shared/street/girls1.jpg"></center>'
-				if hotcat > 5:
+				if hotcat > 6:
 					pcs_mood += 20
 					'As you walk down the street, you pass a group of girls. You hear them start talking about you as you pass by. "I love her outfit, she really knows how to dress." "I know, look at her shoes, they are just perfect." "What about her makeup? I wish I could do mine that good." They keep talking about you until they are out of earshot. You can''t help but smile and feel great after that.'
 					act 'Continue':gt $loc
@@ -1113,7 +1142,7 @@ if $ARGS[1] = 'main':
 				act 'Give her 100 <b>₽</b>':
 					*clr & cla
 					money -= 100
-					pcs_mood += 10
+					pcs_mood += 20
 					gs 'stat'
 					'<<$streetev_title>>'
 					'<center><img <<$set_imgh>> src="images/locations/shared/street/homelessg.jpg"></center>'
@@ -1125,7 +1154,7 @@ if $ARGS[1] = 'main':
 				act 'Give her 250 <b>₽</b>':
 					*clr & cla
 					money -= 250
-					pcs_mood += 10
+					pcs_mood += 30
 					gs 'stat'
 					'<<$streetev_title>>'
 					'<center><img <<$set_imgh>> src="images/locations/shared/street/homelessg.jpg"></center>'
@@ -1137,7 +1166,7 @@ if $ARGS[1] = 'main':
 				act 'Give her 500 <b>₽</b>':
 					*clr & cla
 					money -= 500
-					pcs_mood += 10
+					pcs_mood += 40
 					gs 'stat'
 					'<<$streetev_title>>'
 					'<center><img <<$set_imgh>> src="images/locations/shared/street/homelessg.jpg"></center>'
@@ -1151,7 +1180,7 @@ if $ARGS[1] = 'main':
 					money -= 1000
 					'<<$streetev_title>>'
 					'<center><img <<$set_imgh>> src="images/locations/shared/street/homelessg.jpg"></center>'
-					pcs_mood += 10
+					pcs_mood += 50
 					'You open your purse up and pull out the money you can spare and hand it to her. She thanks you profusely and gives you a heart warming smile.'
 					act 'Leave':gt $loc
 				end
@@ -1287,7 +1316,7 @@ if $ARGS[1] = 'main':
 					act 'Give her 100 <b>₽</b>':
 						*clr & cla
 						money -= 100
-						pcs_mood += 20
+						pcs_mood += 30
 						gs 'stat'
 						'<<$streetev_title>>'
 						'<center><img <<$set_imgh>> src="images/locations/shared/street/girlcat.jpg"></center>'
@@ -1311,7 +1340,7 @@ if $ARGS[1] = 'main':
 					act 'Give her 250 <b>₽</b>':
 						*clr & cla
 						money -= 250
-						pcs_mood += 20
+						pcs_mood += 40
 						gs 'stat'
 						'<<$streetev_title>>'
 						'<center><img <<$set_imgh>> src="images/locations/shared/street/girlcat.jpg"></center>'
@@ -1335,7 +1364,7 @@ if $ARGS[1] = 'main':
 					act 'Give her 500 <b>₽</b>':
 						*clr & cla
 						money -= 500
-						pcs_mood += 20
+						pcs_mood += 50
 						gs 'stat'
 						'<<$streetev_title>>'
 						'<center><img <<$set_imgh>> src="images/locations/shared/street/girlcat.jpg"></center>'
@@ -1359,7 +1388,7 @@ if $ARGS[1] = 'main':
 					act 'Give her 1000 <b>₽</b>':
 						*clr & cla
 						money -= 1000
-						pcs_mood += 20
+						pcs_mood += 50
 						gs 'stat'
 						'<<$streetev_title>>'
 						'<center><img <<$set_imgh>> src="images/locations/shared/street/girlcat.jpg"></center>'