Ver código fonte

[fixed] Check for hunger/fatigue added to kickboxing gym to prevent being able to keep using it when too hunger or fatigued

Kevin_Smarts 11 meses atrás
pai
commit
9745c917c3
1 arquivos alterados com 197 adições e 192 exclusões
  1. 197 192
      locations/fit.qsrc

+ 197 - 192
locations/fit.qsrc

@@ -638,106 +638,70 @@ if $ARGS[0] = 'kickboxing':
 
 	act 'Return to dressing room': gt 'fit', 'dressing_room'
 
-	act 'Work on your jabs':
-		cla
-		*clr
-		abonement -= 1
-		gs 'exercise', 'tier3', 30, 'jab', 'react'
-		if pcs_inhib < 30:inhib_exp += rand(1,2)
-		'<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/kickboxing/kik1.jpg"></center>'
-		'You practice your jabs on the speed bag and double-end bag, straight punches with a step forward. These strikes are not so powerful, but they are fast.'
-
-		act 'Leave':gt 'fit', 'kickboxing'
-	end
+	if pcs_energy >= 15 and pcs_stam >= stammax / 5:
+		act 'Work on your jabs':
+			cla
+			*clr
+			abonement -= 1
+			gs 'exercise', 'tier3', 30, 'jab', 'react'
+			if pcs_inhib < 30:inhib_exp += rand(1,2)
+			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/kickboxing/kik1.jpg"></center>'
+			'You practice your jabs on the speed bag and double-end bag, straight punches with a step forward. These strikes are not so powerful, but they are fast.'
 
-	act 'Work on your heavy punches':
-		cla
-		*clr
-		abonement -= 1
-		gs 'exercise', 'tier3', 30, 'stren', 'punch'
-		if pcs_inhib < 30:inhib_exp += rand(1,2)
-		'<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/kickboxing/kik1.jpg"></center>'
-		'You practice your power punches on the heavy bag. These are high impact and powerful, but they are hard to get to their target.'
-
-		act 'Leave':gt 'fit', 'kickboxing'
-	end
+			act 'Leave':gt 'fit', 'kickboxing'
+		end
 
-	act 'Work on your kicking':
-		cla
-		*clr
-		abonement -= 1
-		gs 'exercise', 'tier3', 30, 'stren', 'kick'
-		if pcs_inhib < 30:inhib_exp += rand(1,2)
-		'<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/kickboxing/kik1.jpg"></center>'
-		'You practice your powerful kicks on a kickboxing bag. These impacts are very powerful and able to cut down an opponant, but are very difficult to hit with.'
-
-		act 'Leave':gt 'fit', 'kickboxing'
-	end
+		act 'Work on your heavy punches':
+			cla
+			*clr
+			abonement -= 1
+			gs 'exercise', 'tier3', 30, 'stren', 'punch'
+			if pcs_inhib < 30:inhib_exp += rand(1,2)
+			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/kickboxing/kik1.jpg"></center>'
+			'You practice your power punches on the heavy bag. These are high impact and powerful, but they are hard to get to their target.'
 
-	act 'Work on defence':
-		cla
-		*clr
-		abonement -= 1
-		gs 'exercise', 'tier3', 30, 'def', 'agil'
-		if pcs_inhib < 30:inhib_exp += rand(1,2)
-		'<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/kickboxing/kik1.jpg"></center>'
-		'You practice your defense movements.'
-
-		act 'Leave':gt 'fit', 'kickboxing'
-	end
+			act 'Leave':gt 'fit', 'kickboxing'
+		end
 
-	act 'Sparring (training bout in the ring)':
-		cla
-		*clr
-		'You need to choose a partner for sparring'
-		if pcs_inhib < 30:inhib_exp += rand(1,2)
-		act 'Pick a random partner':
+		act 'Work on your kicking':
+			cla
+			*clr
 			abonement -= 1
-			pcs_mood += 2
-			gs 'exercise', 'tier3', 30, 'jab', 'punch', 'kick', 'def'
-			pointKik = 0
-			pointKikV = 0
-			round = 1
-			minround = 0
-
-			gs 'npcgeneratec', 0, 'sparring partner', rand(19,45)
-			gs 'boyStat', $npclastgenerated
-			strenV = rand(10, 20)
-			speedV = rand(10, 20)
-			agilV = rand(10, 20)
-			reactV = rand(10, 20)
-			vitalV = rand(10, 20)
-			intelV = 10
-			willV = 10
-			!!skills
-			JabV = rand(5, 20)
-			PunchV = rand(5, 20)
-			KikV = rand(5, 20)
-			KikDefV = rand(5, 20)
-			!!parameters
-			healthV = vitalV * 10 + strenV * 5
-			formula = 3
-			sparing = 1
-			gt 'kikbox', 'start'
-		end
-	end
+			gs 'exercise', 'tier3', 30, 'stren', 'kick'
+			if pcs_inhib < 30:inhib_exp += rand(1,2)
+			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/kickboxing/kik1.jpg"></center>'
+			'You practice your powerful kicks on a kickboxing bag. These impacts are very powerful and able to cut down an opponant, but are very difficult to hit with.'
 
-	if week = 6 and kickbox['amateur_fight_day'] ! daystart:
-		'You can take part in an amateur fight.'
+			act 'Leave':gt 'fit', 'kickboxing'
+		end
 
-		act 'Amateur fight':
-			kickbox['amateur_fight_day'] = daystart
-			pcs_mood += 2
-			gs 'exercise', 'tier3', 30, 'jab', 'punch', 'kick', 'def'
-			pointKik = 0
-			pointKikV = 0
-			round = 1
-			minround = 0
+		act 'Work on defence':
+			cla
+			*clr
+			abonement -= 1
+			gs 'exercise', 'tier3', 30, 'def', 'agil'
+			if pcs_inhib < 30:inhib_exp += rand(1,2)
+			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/kickboxing/kik1.jpg"></center>'
+			'You practice your defense movements.'
 
-			kickbox['opponent'] = kickbox['sash'] + rand(0, 1)
+			act 'Leave':gt 'fit', 'kickboxing'
+		end
 
-			if kickbox['opponent'] = 0:
-				gs 'npcgeneratec', 0, 'Useless rival', rand(19,45)
+		act 'Sparring (training bout in the ring)':
+			cla
+			*clr
+			'You need to choose a partner for sparring'
+			if pcs_inhib < 30:inhib_exp += rand(1,2)
+			act 'Pick a random partner':
+				abonement -= 1
+				pcs_mood += 2
+				gs 'exercise', 'tier3', 30, 'jab', 'punch', 'kick', 'def'
+				pointKik = 0
+				pointKikV = 0
+				round = 1
+				minround = 0
+
+				gs 'npcgeneratec', 0, 'sparring partner', rand(19,45)
 				gs 'boyStat', $npclastgenerated
 				strenV = rand(10, 20)
 				speedV = rand(10, 20)
@@ -747,113 +711,154 @@ if $ARGS[0] = 'kickboxing':
 				intelV = 10
 				willV = 10
 				!!skills
-				JabV = rand(10, 30)
-				PunchV = rand(10, 30)
-				KikV = rand(10, 30)
-				KikDefV = rand(10, 30)
-				!!parameters
-				healthV = vitalV * 10 + strenV * 5
-				formula = 3
-				kickbox['amateur'] = 1
-			elseif kickbox['opponent'] = 1:
-				gs 'npcgeneratec', 0, '3rd class rival', rand(19,45)
-				gs 'boyStat', $npclastgenerated
-				strenV = rand(15, 25)
-				speedV = rand(15, 25)
-				agilV = rand(15, 25)
-				reactV = rand(15, 25)
-				vitalV = rand(15, 25)
-				intelV = 10
-				willV = 10
-				!!skills
-				JabV = rand(15, 35)
-				PunchV = rand(15, 35)
-				KikV = rand(15, 35)
-				KikDefV = rand(15, 35)
+				JabV = rand(5, 20)
+				PunchV = rand(5, 20)
+				KikV = rand(5, 20)
+				KikDefV = rand(5, 20)
 				!!parameters
 				healthV = vitalV * 10 + strenV * 5
 				formula = 3
-				kickbox['amateur'] = 1
-			elseif kickbox['opponent'] = 2:
-				gs 'npcgeneratec', 0, '2rd class rival', rand(19,45)
-				gs 'boyStat', $npclastgenerated
-				strenV = rand(20, 30)
-				speedV = rand(20, 30)
-				agilV = rand(20, 30)
-				reactV = rand(20, 30)
-				vitalV = rand(20, 30)
-				intelV = 10
-				willV = 10
-				!!skills
-				JabV = rand(30, 50)
-				PunchV = rand(30, 50)
-				KikV = rand(30, 50)
-				KikDefV = rand(30, 50)
-				!!parameters
-				healthV = vitalV * 10 + strenV * 5
-				formula = 3
-				kickbox['amateur'] = 1
-			elseif kickbox['opponent'] = 3:
-				gs 'npcgeneratec', 0, '1st class rival', rand(19,45)
-				gs 'boyStat', $npclastgenerated
-				strenV = rand(30, 40)
-				speedV = rand(30, 40)
-				agilV = rand(30, 40)
-				reactV = rand(30, 40)
-				vitalV = rand(30, 40)
-				intelV = 10
-				willV = 10
-				!!skills
-				JabV = rand(40, 60)
-				PunchV = rand(40, 60)
-				KikV = rand(40, 60)
-				KikDefV = rand(40, 60)
-				!!parameters
-				healthV = vitalV * 10 + strenV * 5
-				formula = 3
-				kickbox['amateur'] = 1
-			elseif kickbox['opponent'] = 4:
-				gs 'npcgeneratec', 0, 'Excellent rival', rand(19,45)
-				gs 'boyStat', $npclastgenerated
-				strenV = rand(40, 60)
-				speedV = rand(40, 60)
-				agilV = rand(40, 60)
-				reactV = rand(40, 60)
-				vitalV = rand(40, 60)
-				intelV = 10
-				willV = 10
-				!!skills
-				JabV = rand(60, 80)
-				PunchV = rand(60, 80)
-				KikV = rand(60, 80)
-				KikDefV = rand(60, 80)
-				!!parameters
-				healthV = vitalV * 10 + strenV * 5
-				formula = 3
-				kickbox['amateur'] = 1
-			elseif kickbox['opponent'] >= 5:
-				gs 'npcgeneratec', 0, 'Best rival in the gym', rand(19,45)
-				gs 'boyStat', $npclastgenerated
-				strenV = rand(60, 100)
-				speedV = rand(60, 100)
-				agilV = rand(60, 100)
-				reactV = rand(60, 100)
-				vitalV = rand(60, 100)
-				intelV = 10
-				willV = 10
-				!!skills
-				JabV = rand(80, 110)
-				PunchV = rand(80, 110)
-				KikV = rand(80, 110)
-				KikDefV = rand(80, 110)
-				!!parameters
-				healthV = vitalV * 10 + strenV * 5
-				formula = 3
-				kickbox['amateur'] = 1
+				sparing = 1
+				gt 'kikbox', 'start'
 			end
+		end
+
+		if week = 6 and kickbox['amateur_fight_day'] ! daystart:
+			'You can take part in an amateur fight.'
+
+			act 'Amateur fight':
+				kickbox['amateur_fight_day'] = daystart
+				pcs_mood += 2
+				gs 'exercise', 'tier3', 30, 'jab', 'punch', 'kick', 'def'
+				pointKik = 0
+				pointKikV = 0
+				round = 1
+				minround = 0
+
+				kickbox['opponent'] = kickbox['sash'] + rand(0, 1)
 
-			gt 'kikbox', 'start'
+				if kickbox['opponent'] = 0:
+					gs 'npcgeneratec', 0, 'Useless rival', rand(19,45)
+					gs 'boyStat', $npclastgenerated
+					strenV = rand(10, 20)
+					speedV = rand(10, 20)
+					agilV = rand(10, 20)
+					reactV = rand(10, 20)
+					vitalV = rand(10, 20)
+					intelV = 10
+					willV = 10
+					!!skills
+					JabV = rand(10, 30)
+					PunchV = rand(10, 30)
+					KikV = rand(10, 30)
+					KikDefV = rand(10, 30)
+					!!parameters
+					healthV = vitalV * 10 + strenV * 5
+					formula = 3
+					kickbox['amateur'] = 1
+				elseif kickbox['opponent'] = 1:
+					gs 'npcgeneratec', 0, '3rd class rival', rand(19,45)
+					gs 'boyStat', $npclastgenerated
+					strenV = rand(15, 25)
+					speedV = rand(15, 25)
+					agilV = rand(15, 25)
+					reactV = rand(15, 25)
+					vitalV = rand(15, 25)
+					intelV = 10
+					willV = 10
+					!!skills
+					JabV = rand(15, 35)
+					PunchV = rand(15, 35)
+					KikV = rand(15, 35)
+					KikDefV = rand(15, 35)
+					!!parameters
+					healthV = vitalV * 10 + strenV * 5
+					formula = 3
+					kickbox['amateur'] = 1
+				elseif kickbox['opponent'] = 2:
+					gs 'npcgeneratec', 0, '2rd class rival', rand(19,45)
+					gs 'boyStat', $npclastgenerated
+					strenV = rand(20, 30)
+					speedV = rand(20, 30)
+					agilV = rand(20, 30)
+					reactV = rand(20, 30)
+					vitalV = rand(20, 30)
+					intelV = 10
+					willV = 10
+					!!skills
+					JabV = rand(30, 50)
+					PunchV = rand(30, 50)
+					KikV = rand(30, 50)
+					KikDefV = rand(30, 50)
+					!!parameters
+					healthV = vitalV * 10 + strenV * 5
+					formula = 3
+					kickbox['amateur'] = 1
+				elseif kickbox['opponent'] = 3:
+					gs 'npcgeneratec', 0, '1st class rival', rand(19,45)
+					gs 'boyStat', $npclastgenerated
+					strenV = rand(30, 40)
+					speedV = rand(30, 40)
+					agilV = rand(30, 40)
+					reactV = rand(30, 40)
+					vitalV = rand(30, 40)
+					intelV = 10
+					willV = 10
+					!!skills
+					JabV = rand(40, 60)
+					PunchV = rand(40, 60)
+					KikV = rand(40, 60)
+					KikDefV = rand(40, 60)
+					!!parameters
+					healthV = vitalV * 10 + strenV * 5
+					formula = 3
+					kickbox['amateur'] = 1
+				elseif kickbox['opponent'] = 4:
+					gs 'npcgeneratec', 0, 'Excellent rival', rand(19,45)
+					gs 'boyStat', $npclastgenerated
+					strenV = rand(40, 60)
+					speedV = rand(40, 60)
+					agilV = rand(40, 60)
+					reactV = rand(40, 60)
+					vitalV = rand(40, 60)
+					intelV = 10
+					willV = 10
+					!!skills
+					JabV = rand(60, 80)
+					PunchV = rand(60, 80)
+					KikV = rand(60, 80)
+					KikDefV = rand(60, 80)
+					!!parameters
+					healthV = vitalV * 10 + strenV * 5
+					formula = 3
+					kickbox['amateur'] = 1
+				elseif kickbox['opponent'] >= 5:
+					gs 'npcgeneratec', 0, 'Best rival in the gym', rand(19,45)
+					gs 'boyStat', $npclastgenerated
+					strenV = rand(60, 100)
+					speedV = rand(60, 100)
+					agilV = rand(60, 100)
+					reactV = rand(60, 100)
+					vitalV = rand(60, 100)
+					intelV = 10
+					willV = 10
+					!!skills
+					JabV = rand(80, 110)
+					PunchV = rand(80, 110)
+					KikV = rand(80, 110)
+					KikDefV = rand(80, 110)
+					!!parameters
+					healthV = vitalV * 10 + strenV * 5
+					formula = 3
+					kickbox['amateur'] = 1
+				end
+
+				gt 'kikbox', 'start'
+			end
 		end
+	else
+		*nl
+		'You are too hunger or fatigued to do anymore exercises now.'
 	end
 end