# medical_din
!2021/05/02

if $ARGS[0] = 'birth_control':
	if tabletkishot < 5 and money >= 2750 and knowpreg = 0 and birth_control['implant_status'] = 0:
		act 'Get a birth control shot for 2750 <b>₽</b> (0:15)':
			*clr & cla
			menu_off = 1
			minut += 15
			'<center><img <<$set_imgh>> src="images/locations/shared/clinic/poli.jpg"></center>'
			'You are escorted into an examination room, where you are told that say have to do a small test before giving you the shot. You wait for fifteen minutes before the nurse comes back in.'
			if preg = 0:
				money -= 2750
				gs 'medical_din','birthControlShot'
				'"Everything looks great." She says and gives you a reassuring smile as she sticks a needle in your arm, and depresses the plunger. Seconds later she explains: "All done! You should be good to go for three months, give or take. It depends a bit from person to person: Body type, hormone levels, and so on. If you want to be perfectly safe, we recommend you come back for another treatment one week before the three months are over. Have a nice day, miss!"'
				'You thank her and wish her the same, while you gather your things. You silently mutter to yourself: "If it is that simple, why did they make me wait 15 minutes..."'
			else
				money -= 650
				'"I''m sorry, but we can''t give you the shot, because you''re pregnant."'
				'After the initial shock subsides you pay the 650 <b>₽</b> for the test and leave.'
				thinkpreg = 1
				knowpreg = 1
			end
			gs 'stat'
			act 'Leave': gt $loc, $loc_arg
		end
	elseif tabletkishot < 5 and money < 2750 and knowpreg = 0 and birth_control['implant_status'] = 0:
		act 'Get a birth control shot for <font color="red">3,900 <b>₽</b></font> (0:15)': '<br><font color="red">You don''t have enough money to get a birth control shot.</font>'
	end

	if birth_control['implant_status'] = 0 and money >= 19650 and knowpreg = 0:
		act 'Get a birth control implant for 19,650 <b>₽</b> (0:35)':
			*clr & cla
			menu_off = 1
			minut += 15
			'<center><img <<$set_imgh>> src="images/locations/shared/clinic/poli.jpg"></center>'
			'You are escorted into an examination room, where you are told that say have to do a small test before inserting the implant into your left arm. You wait for fifteen minutes before the nurse comes back in.'
			if preg = 0:
				minut += 20
				money -= 19650
				birth_control['implant_status'] = 3
				birth_control['implant_timer'] = 1095
				pillcon += ((pillcon + 15000) / 25) + 4000
				pillcon2 += ((pillcon2 + 15000) / 25) + 4000
				'"Everything looks great." She says and gives you a reassuring smile. "Please lie down, the procedure won''t take long."'
				'She numbs part of your upper arm with a local anesthetic. You have to wait for a few minutes for it to take a effect, before she makes a tiny incision and pushes a small tube inside your arm. It isn''t bigger than a matchstick.'
				'"All done! You should be good to go for three years."'
			else
				money -= 650
				'"I''m sorry, but we can''t give you the implant, because you''re pregnant."'
				'After the initial shock subsides you pay the 650 <b>₽</b> for the test and leave.'
				thinkpreg = 1
				knowpreg = 1
			end
			gs 'stat'
			act 'Leave': gt $loc, $loc_arg
		end
	elseif birth_control['implant_status'] = 0 and money < 19650 and knowpreg = 0:
		act 'Get a birth control implant for <font color="red">19,650 <b>₽</b></font> (0:35)': '<br><font color="red">You don''t have enough money to get a birth control implant.</font>'
	elseif birth_control['implant_status'] > 0:
		if money >= 1000:
			act 'Remove your birth control implant for 1,000 <b>₽</b> (0:20)':
				*clr & cla
				menu_off = 1
				minut += 20
				money -= 1000
				birth_control['implant_status'] = 0
				birth_control['implant_timer'] = 0
				'<center><img <<$set_imgh>> src="images/locations/shared/clinic/poli.jpg"></center>'
				'"Everything looks great." She says and gives you a reassuring smile. "Please lie down, the procedure won''t take long."'
				'She numbs part of your upper arm with a local anesthetic. You have to wait for a few minutes for it to take a effect, before she makes a tiny incision and takes out your old implant. "All done!"'
					
				act 'Leave': gt $loc, $loc_arg			
			end
		else
			act 'Remove your birth control implant for <font color="red">1,000 <b>₽</b></font> (0:35)': '<br><font color="red">You don''t have enough money to remove your birth control implant.</font>'
		end
			
		if birth_control['implant_status'] < 3 and money >= 19650:
			act 'Renew your birth control implant for 19,650 <b>₽</b> (0:35)':
				*clr & cla
				menu_off = 1
				minut += 15
				'<center><img <<$set_imgh>> src="images/locations/shared/clinic/poli.jpg"></center>'
				'You are escorted into an examination room, where you are told that say have to do a small test before inserting the implant into your left arm. You wait for fifteen minutes before the nurse comes back in.'
				if preg = 0:
					minut += 20
					money -= 19650
					birth_control['implant_status'] = 3
					birth_control['implant_timer'] = 1095
					pillcon += ((pillcon + 15000) / 25) + 4000
					pillcon2 += ((pillcon2 + 15000) / 25) + 4000
					'"Everything looks great." She says and gives you a reassuring smile. "Please lie down, the procedure won''t take long."'
					'She numbs part of your upper arm with a local anesthetic. You have to wait for a few minutes for it to take a effect, before she makes a tiny incision, takes out your old implant and pushes in a new one.'
					'"All done! You should be good to go for three years."'
				else
					birth_control['implant_status'] = 0
					birth_control['implant_timer'] = 0
					money -= 1650
					'"I''m sorry, but we can''t give you the implant again, because you''re pregnant."'
					'After the initial shock subsides you pay the 1650 <b>₽</b> for the test and the removal of your old implant leave.'
					thinkpreg = 1
					knowpreg = 1
				end
			end
		elseif birth_control['implant_status'] < 3 and money < 19650:
			act 'Renew your control implant for <font color="red">19,650 <b>₽</b></font> (0:35)': '<br><font color="red">You don''t have enough money to renew your birth control implant.</font>'
		end
	end
end

if $ARGS[0] = 'abortion':
	!! Aborts pregnency. Usage: gs 'medical_din','abortion'
	vidage += 1
	abort += 1
	abortionbirthdate = daystart

	gs 'medical_din', 'remove_preg'
	knowpregloss = 2

	abortrand = rand(0, 10)
	if age > 18:
		if abortrand < 10:sterilewb += 1
		if abortrand = 10:sterilewb += 10
	else
		if abortrand < 7:sterilewb += 2
		if abortrand >= 7:sterilewb += 10
	end
	killvar 'abortrand'
	
	!! I am not sure, why is it here this cycle, but I leave it so (rachels)
	pcs_hydra += 20
	
	if broodcurse > 0: over = 13 & gt'gameover'
elseif $ARGS[0] = 'remove_preg':
	pregtime = 0
	pregtalk = 0
	pcs_pregtalk = 0
	npc_pregtalk['A16'] = 0
	npc_pregtalk['A34'] = 0
	preg = 0
	thinkpreg = 0
	knowpreg = 0
	pregchem = 0
	cycle = 4
	!! RecovH has a decay of 1.1/hour or ~ 27/day, the recovery period is ~2-3 weeks
	RecovH = rand(375,575) 

	nextbaby = arrsize('yearkid')
	:poliabortloop
		!!Changed to check if baby has a birth year instead, if it doesn''t, do abortion
		if yearkid[nextbaby-1] = 0:
			KILLVAR 'polkid',nextbaby-1
			KILLVAR '$kidname',nextbaby-1
			KILLVAR 'kidage',nextbaby-1
			KILLVAR 'daykid',nextbaby-1
			KILLVAR 'monthkid',nextbaby-1
			KILLVAR 'yearkid',nextbaby-1
			KILLVAR 'Babyptype',nextbaby-1
			KILLVAR '$ChildFath',nextbaby-1
			KILLVAR '$ChildThFath',nextbaby-1
			KILLVAR 'hairkid',nextbaby-1
			KILLVAR 'eyeskid',nextbaby-1
			KILLVAR 'cumarrcon',nextbaby-1
			KILLVAR '$wombpotfath'
			BabyEmbryo -= 1
		end
		nextbaby -= 1
	if nextbaby > 0: jump 'poliabortloop'

	killvar 'nextbaby'
elseif $ARGS[0] = 'birthControlShot':
	!! Gives Sveta the effects of a birth control shot. Usage: gs 'medical_din','birthControlShot'
	!! Note: You have to make sure that she is not pregnant beforehead.
	!!length of shot
	tabletkishot = rand(84,91)
	!!How long before you can get next shot
	shotdays = 84
	!!Flag for protection type - shot
	tabletkicheck = 2
	!!Sets the actual drug in your system
	pillcon = 40000
	!!How much of the drug Sveta things is in her system
	pillcon2 = 40000
elseif $ARGS[0] = 'healthTreatment':
	!! Gives Sveta an health treatment (like the doctors in the clinic do). Usage: gs 'medical_din','healthTreatment'
	if pain['head'] > 0:pain['head'] -= rand(7,13)
	if pain['hair'] > 0:pain['hair'] -= rand(7,13)
	if pain['ears'] > 0:pain['ears'] -= rand(7,13)
	if pain['eyebrows'] > 0:pain['eyebrows'] -= rand(7,13)
	if pain['eyes'] > 0:pain['eyes'] -= rand(7,13)
	if pain['cheeks'] > 0:pain['cheeks'] -= rand(7,13)
	if pain['nose'] > 0:pain['nose'] -= rand(7,13)
	if pain['mouth'] > 0:pain['mouth'] -= rand(7,13)
	if pain['lips'] > 0:pain['lips'] -= rand(7,13)
	if pain['tongue'] > 0:pain['tongue'] -= rand(7,13)
	if pain['throat'] > 0:pain['throat'] -= rand(7,13)
	if pain['neck'] > 0:pain['neck'] -= rand(7,13)
	if pain['back'] > 0:pain['back'] -= rand(7,13)
	if pain['asscheeks'] > 0:pain['asscheeks'] -= rand(7,13)
	if pain['asshole'] > 0:pain['asshole'] -= rand(7,13)
	if pain['hips'] > 0:pain['hips'] -= rand(7,13)
	if pain['thighs'] > 0:pain['thighs'] -= rand(7,13)
	if pain['legL'] > 0:pain['legL'] -= rand(7,13)
	if pain['legR'] > 0:pain['legR'] -= rand(7,13)
	if pain['feet'] > 0:pain['feet'] -= rand(7,13)
	if pain['toes'] > 0:pain['toes'] -= rand(7,13)
	if pain['shoulders'] > 0:pain['shoulders'] -= rand(7,13)
	if pain['armL'] > 0:pain['armL'] -= rand(7,13)
	if pain['armR'] > 0:pain['armR'] -= rand(7,13)
	if pain['hands'] > 0:pain['hands'] -= rand(7,13)
	if pain['fingers'] > 0:pain['fingers'] -= rand(7,13)
	if pain['chest'] > 0:pain['chest'] -= rand(7,13)
	if pain['breasts'] > 0:pain['breasts'] -= rand(7,13)
	if pain['nipples'] > 0:pain['nipples'] -= rand(7,13)
	if pain['ribs'] > 0:pain['ribs'] -= rand(7,13)
	if pain['tummy'] > 0:pain['tummy'] -= rand(7,13)
	if pain['pubic'] > 0:pain['pubic'] -= rand(7,13)
	if pain['vaginal'] > 0:pain['vaginal'] -= rand(7,13)
	if pain['labia'] > 0:pain['labia'] -= rand(7,13)
	if pain['clitoris'] > 0:pain['clitoris'] -= rand(7,13)
	if pain['urethra'] > 0:pain['urethra'] -= rand(7,13)
	if pain['cervix'] > 0:pain['cervix'] -= rand(7,13)
	pcs_health = pcs_vital * 10 + pcs_stren * 5 + 1000
	if pillcon > 0 and rand(0,4) = 0:pillcon -= 2500
elseif $ARGS[0] = 'healSTDs':
	!! Heals all STDs. Usage: gs 'medical_din','healSTDs'
	venera = 0
	GerpesOnce = 0
	Gerpes = 0
	SifacOnce = 0
	Sifilis = 0
	TriperOnce = 0
	Triper = 0
	TriperOral = 0
	KandidozOnce = 0
	Kandidoz = 0
end

if $ARGS[0] = 'morning_after_pill':
	morning_after_pill -= 1
	if arrsize('cumarrcpt') > 0:
		temp_ID = arrsize('cumarrcpt')
		:morning_after_womb_cleanup
		if cumarrcpt[temp_ID] > 0 and sparrloc[temp_ID] = 0:
			!'Removed <<cumarrcpt[temp_ID]>> sperm at <<cumarrppt[temp_ID]>> potency from <<$npc_usedname[$cumarrnam[temp_ID]]>>.'
			gs 'cum_cleanup', 'cleanwomb', temp_ID
		end
		if temp_ID > 0: temp_ID -= 1 & jump 'morning_after_womb_cleanup'
		killvar 'temp_ID'
	end
	*clr
	'<center><img <<$set_imgh>> src="images/pc/items/accessories/birthcontrol/pill.jpg"></center>'
	'You put the pill in your mouth and swallow it down.'
	'<i>Well, that''s that,</i> you think to yourself. <i>Hopefully I won''t get pregnant now. I need to be more careful in the future.</i>'
	gs 'stat'
end

--- medical_din ---------------------------------
