# drugs

!! How to use:
!! Smoking:		gs 'drugs', 'smoke' (if it isn''t svetas cigarette, you have to use use  gs 'drugs', 'smoke', 1  OR add  mc_inventory['cigarettes'] += 1 or )
!! Joint/Weed:	gs 'drugs', 'joint' (if it isn''t svetas joint, you have to use  gs 'drugs', 'joint', 1  OR add  mc_inventory['joints'] += 1)
!! Heroin:		gs 'drugs', 'heroin'
!! Cocaine:		gs 'drugs', 'cocaine' (if it isn''t svetas cocaine, you have to use  gs 'drugs', 'cocaine', 1  OR add  mc_inventory['cocaine'] += 1)
!! Amphetamine:	gs 'drugs', 'amphetamine' (if it isn''t svetas amphetamine, you have to use  gs 'drugs', 'amphetamine', 1  OR add  mc_inventory['amphetamine'] += 1)
!! Neurobooster:gs 'drugs', 'mentats' (if it isn''t svetas mentats, you have to  use  gs 'drugs', 'mentats', 1  OR add  mc_inventory['mentats'] += 1)
!! Aphrodisiac:	gs 'drugs', 'aphrodisiac' (if it isn''t svetas aphrodisiac, you have to use  gs 'drugs', 'aphrodisiac', 1  OR add  mc_inventory['aphrodisiac'] += 1)
!! Steroids:	gs 'drugs', 'steroids' (if it isn''t svetas steroids, you have to use  gs 'drugs', 'steroids', 1  OR add  mc_inventory['steroids'] += 1)
!! Breast Cream:gs 'drugs', 'breastcream' (if it isn''t svetas breast cream, you have to use  gs 'drugs', 'breastcream', 1  OR add mc_inventory['breastcream'] += 1)

!! Alcohol: gs 'drugs', 'alcohol', 'type', count
!! Types: beer, champagne, moonshine, rum, scotch, vodka, wine, whiskey
!! Count: Number of drinks of the chosen type sveta drinks (if the number is 1, you don''t have add the count, but it isn''t a problem if you do)
!! Example 1: sveta drinks vodka gs 'drugs', 'alcohol', 'vodka' (or gs 'drugs', 'alcohol', 'vodka', 1)
!! Example 2: sveta drinks 2 beer gs 'drugs', 'alcohol', 'beer', 2


if $ARGS[0] = 'cikl':
	gs 'drugs', 'cocaine', 'cikl'
	gs 'drugs', 'mentats', 'cikl'
	gs 'drugs', 'aphrodisiac', 'cikl'

elseif $ARGS[0] = 'hourly_events':
	gs 'drugs', 'smoke', 'hourly_events'
	gs 'drugs', 'joint', 'hourly_events'
	gs 'drugs', 'heroin', 'hourly_events'
	gs 'drugs', 'cocaine', 'hourly_events'
	gs 'drugs', 'amphetamine', 'hourly_events'
	gs 'drugs', 'aphrodisiac', 'hourly_events'

elseif $ARGS[0] = 'stat':
	gs 'drugs', 'heroin', 'stat'
	gs 'drugs', 'alcohol', 'stat'
	gs 'drugs', 'cocaine', 'stat'
	gs 'drugs', 'amphetamine', 'stat'

elseif $ARGS[0] = 'pain_relief':
	if alko > 9:
		pain['relief'] = 70
	elseif alko > 6:
		pain['relief'] = 40
	elseif alko > 3:
		pain['relief'] = 15
	end

	if drugVars['heroin_high'] > 0:
		pain['relief'] = 90
	elseif drugVars['cocaine_system'] > 0:
		pain['relief'] = 60
	elseif pain['killer'] > 12 and alko <= 9:
		pain['relief'] = 50
	end


elseif $ARGS[0] = 'smoke':
	if $ARGS[1] = 'hourly_events':
		if drugVars['cigarettes_used'] >= 20 and drugVars['cheat_immune'] = 0: drugVars['cigarettes_need'] += 1
		if drugVars['cigarettes_need'] > 10 and InSleep = 0 and pcs_mood > 20 and drugVars['cheat_immune'] = 0: pcs_mood -= pcs_mood / 10

		if drugVars['cigarettes_need'] > 300:
			drugVars['cigarettes_need'] = 0
			drugVars['cigarettes_used'] = 0
		end
	else
		if ARGS[1] = 0 and $ARGS[1] = '':
			mc_inventory['cigarettes'] -= 1
			if mc_inventory['cigarettes'] <= 0: mc_inventory['cigarettes'] = 0 & msg 'That was your last cigarette.'
		end

		if drugVars['cheat_immune'] = 1:
			drugVars['cigarettes_used'] += 1
			if drugVars['cigarettes_used'] > 20 and drugVars['cigarettes_exp'] = 0: drugVars['cigarettes_exp'] = 1
		end
		
		stat['cigarettes_smoked'] += 1
		drugVars['cigarettes_day'] = daystart
		drugVars['cigarettes_hour'] = hour
		drugVars['cigarettes_minute'] = minut + 3
		drugVars['cigarettes_need'] = 0
		teeth['smoked'] += 1

		pcs_breath = 0
		pcs_mood += 100
		if pcs_hydra >= 100:
			pcs_hydra -= 5
		else
			pcs_hydra -= 10
		end
		if pcs_energy < 80: pcs_energy += 4

		cumspclnt = 2
		gs 'cum_cleanup'
		gs 'stat'
	end

	
elseif $ARGS[0] = 'joint':
	if $ARGS[1] = 'hourly_events':
		if drugVars['weed_high'] > 0: drugVars['weed_high'] -= 1
	else
		if ARGS[1] = 0 and $ARGS[1] = '':
			mc_inventory['joints'] -= 1
			if mc_inventory['joints'] <= 0: mc_inventory['joints'] = 0 & msg 'That was your last joint.'
		end

		if drugVars['cheat_immune'] = 0:
			drugVars['weed_used'] += 1
			if drugVars['weed_used'] > 5 and drugVars['weed_exp'] = 0: drugVars['weed_exp'] = 1
		end

		if minut > 30:
			drugVars['weed_high'] = 2
		else
			drugVars['weed_high'] = 1
		end
		drugVars['weed_day'] = daystart
		drugVars['weed_hour'] = hour
		drugVars['weed_minute'] = minut + 2

		pcs_breath = 0
		pcs_mood += 100
		if pcs_hydra >= 100:
			pcs_hydra -= 5
		else
			pcs_hydra -= 10
		end
		pcs_energy = max(0, pcs_energy - 20)

		cumspclnt = 2
		gs 'cum_cleanup'
		gs 'stat'
	end


elseif $ARGS[0] = 'heroin':
	if $ARGS[1] = 'hourly_events':
		if drugVars['heroin_high'] > 0: 
			pcs_mood -= (40 / drugVars['heroin_high'])
			drugVars['heroin_high'] -= 1
		end

		if drugVars['heroin_need'] > 0 and pcs_mood > 10: 
			drugVars['heroin_need'] += 1
			pcs_mood -= pcs_mood / 10
		end
		if drugVars['heroin_need'] > 100 and drugVars['heroin_high'] <= 0: 
			drugVars['heroin_need'] = 0
			drugVars['heroin_used'] = 0
		end
	elseif $ARGS[1] = 'stat':
		if drugVars['heroin_high'] >= 20 and alko > 0: alko = 0
		if drugVars['heroin_high'] <= 0:
			if drugVars['heroin_used'] >= 3 and drugVars['heroin_need'] = 0: drugVars['heroin_need'] = 1
		else
			if drugVars['heroin_need'] > 0: drugVars['heroin_need'] = 0
			pcs_mood = 100
		end
		if drugVars['heroin_used'] >= drugVars['heroin_penalty'] * 25:
			if drugVars['heroin_penalty'] > 0: vidage += 1
			drugVars['heroin_penalty'] += 1
		end
	else
		if drugVars['cheat_immune'] = 0:
			drugVars['heroin_used'] += 1
			if drugVars['heroin_used'] > 1 and drugVars['heroin_exp'] = 0: drugVars['heroin_exp'] = 1
		end

		drugVars['heroin_high'] += 25
		drugVars['heroin_day'] = daystart

		pcs_mood = 100
		pcs_health -= 10
		gs 'stat'
	end


elseif $ARGS[0] = 'cocaine':
	if $ARGS[1] = 'cikl':
		if drugVars['cocaine_system'] > 60:
			drugVars['cocaine_system'] = 60
		elseif drugVars['cocaine_system'] > 30:
			drugVars['cocaine_system'] -= 3
		elseif drugVars['cocaine_system'] > 0:
			drugVars['cocaine_system'] -= 1
		end
	elseif $ARGS[1] = 'hourly_events':
		if drugVars['cocaine_addict'] = 1 and drugVars['cocaine_day'] ! daystart:
			pcs_health -= 5
			
			!! Changed from pcs_mood > 40 -> pcs_mood > 45 to avoid pcs_mood becoming lower than 5. Blame Anjuna
			if pcs_mood > 45:
				pcs_mood -= 40
			else
				pcs_mood = 5
			end
		end
	elseif $ARGS[1] = 'stat':
		if drugVars['cheat_immune'] = 1:
			if drugVars['cocaine_addict'] ! 0: drugVars['cocaine_addict'] = 0
		elseif drugVars['cocaine_system'] >= 30 and drugVars['cocaine_addict'] = 0 and drugVars['cheat_immune'] = 0:
			drugVars['cocaine_addict'] = 1
		elseif drugVars['cocaine_system'] = 0 and drugVars['cocaine_addict'] = 1:
			drugVars['cocaine_addict'] = 0
		end
	else
		if ARGS[1] = 0 and $ARGS[1] = '':
			mc_inventory['cocaine'] -= 1
			if mc_inventory['cocaine'] <= 0: mc_inventory['cocaine'] = 0 & msg 'That was your last line of cocaine.'
		end
		if drugVars['cheat_immune'] = 0:
			drugVars['cocaine_used'] += 1
			if drugVars['cocaine_used'] > 3 and drugVars['cocaine_exp'] = 0: drugVars['cocaine_exp'] = 1
		end

		drugVars['cocaine_system'] += 10
		drugVars['cocaine_day'] = daystart
		if drugVars['cocaine_willday'] ! daystart: drugVars['cocaine_willday'] = daystart & pcs_willpwr += 10

		pcs_health = pcs_vital * 10 + pcs_stren * 5
		pcs_mood = 100
		pcs_horny = 100
		gs 'stat'
	end


elseif $ARGS[0] = 'amphetamine':
	if $ARGS[1] = 'hourly_events':
		if insleep = 1:
			if drugVars['amphetamine_high'] > 0:
				pcs_energy -= (4 / drugVars['amphetamine_bonus'])
				pcs_hydra  -= (8 / drugVars['amphetamine_bonus'])
			else
				pcs_energy -= (4 * drugVars['amphetamine_bonus'])
				pcs_hydra  -= (8 * drugVars['amphetamine_bonus'])
			end
		else
			if drugVars['amphetamine_high'] > 0:
				pcs_energy -= ( 8 / drugVars['amphetamine_bonus'])
				pcs_hydra  -= (16 / drugVars['amphetamine_bonus'])
			else
				pcs_energy -= ( 8 * drugVars['amphetamine_bonus'])
				pcs_hydra  -= (16 * drugVars['amphetamine_bonus'])
			end
		end

		if drugVars['amphetamine_withdrawl'] >= 5: 
			drugVars['amphetamine_withdrawl'] += 1
			pcs_mood -= (drugVars['amphetamine_withdrawl'] / 5)
		end

		if drugVars['amphetamine_high'] > 0:
			if drugVars['amphetamine_withdrawl'] < 2: drugVars['amphetamine_withdrawl'] = 2
			drugVars['amphetamine_bonus'] = 3
			drugVars['amphetamine_high'] -= 4
			pcs_mood += (2 * drugVars['amphetamine_high'])

		elseif drugVars['amphetamine_high'] <= 0 and drugVars['amphetamine_withdrawl'] = 2:
			if drugVars['amphetamine_intake'] > 0:
				drugVars['amphetamine_intake'] -= 1
			else
				drugVars['amphetamine_withdrawl'] = 0
			end

			drugVars['amphetamine_high'] = 0
			drugVars['amphetamine_bonus'] = 2
			pcs_mood -= pcs_mood / 10

		elseif drugVars['amphetamine_intake'] > 0:
			drugVars['amphetamine_withdrawl'] += 1

		elseif drugVars['amphetamine_high'] = 0 and drugVars['amphetamine_withdrawl'] = 0:
			drugVars['amphetamine_bonus'] = 1
		end

		if drugVars['amphetamine_withdrawl'] > 169: 
			drugVars['amphetamine_withdrawl'] = 1
			drugVars['amphetamine_bonus'] = 1
			drugVars['amphetamine_used'] = 0
		end

	elseif $ARGS[1] = 'stat':
		if drugVars['amphetamine_used'] > 3 and drugVars['amphetamine_high'] <= 0:
			temp_addictChance = rand(1,10)
			if temp_addictChance > 8:
				drugVars['amphetamine_withdrawl'] = 2
			end
			killvar 'temp_addictChance'
		end
	else
		if drugVars['amphetamine_intake'] >= 2:
			'Your heart is already beating uncontrollably in your chest, you should avoid taking anymore pills.'
		else
			'<font color= blue>You swallow the white pill.</font>'

			if ARGS[1] = 0 and $ARGS[1] = '':
				mc_inventory['amphetamine'] -= 1
				if mc_inventory['amphetamine'] <= 0: mc_inventory['amphetamine'] = 0 & msg 'That was your last amphetamine pill.'
			end
			if drugVars['cheat_immune'] = 0: 
				drugVars['amphetamine_used'] += 1
				if drugVars['amphetamine_used'] > 5 and drugVars['amphetamine_exp'] = 0: drugVars['amphetamine_exp'] = 1
			end

			drugVars['amphetamine_intake'] += 1
			drugVars['amphetamine_high'] = 12
		end
		gs 'stat'
	end


elseif $ARGS[0] = 'mentats':
	if $ARGS[1] = 'cikl':
		if drugVars['mentats_dose'] = 1:
			drugVars['mentats_dose'] = 0
		elseif drugVars['mentats_dose'] > 1:
			pain['head'] += 20 * drugVars['mentats_dose']
			drugVars['mentats_dose'] = 0
		end
	else
		if ARGS[1] = 0 and $ARGS[1] = '':
			mc_inventory['mentats'] -= 1
			if mc_inventory['mentats'] <= 0: mc_inventory['mentats'] = 0 & msg 'That was your last neurobooster pill.'
		end
		drugVars['mentats_used'] += 1
		drugVars['mentats_dose'] += 1
		gs 'stat'
	end

elseif $ARGS[0] = 'steroids':
	if $ARGS[1] = 'cikl':
		if drugVars['steroids_dose'] >= 1:
			if lashair < 1:
				pcs_pubes += drugVars['steroids_dose']
				pcs_leghair += drugVars['steroids_dose']
			end
			drugVars['steroids_dose'] = 0
		end
	else
		if drugVars['steroids_dose'] < 3:
			'<font color = blue>You swallow the orange pill.</font>'

			if ARGS[1] = 0 and $ARGS[1] = '':
				mc_inventory['steroids'] -= 1
				if mc_inventory['steroids'] <= 0: mc_inventory['steroids'] = 0 & msg 'That was your last steroid pill.'
			end

			drugVars['steroids_used'] += 1
			drugVars['steroids_dose'] += 1
		else
			'You really shouldn''t take any more pills today.'
		end
		gs 'stat'
	end


elseif $ARGS[0] = 'breastcream':
	if $ARGS[1] = 'cikl':
		if drugVars['breastcream_dose'] >= 1:
			drugVars['breastcream_dose'] = 0

			temp = pcs_mass['bust'] - pcs_mass['bust_gen']
			temp = rand(0, 5 + max(0, temp)) / max(1, temp)

			if temp > 0:
				bodyVars['bust_other'] += 1
				'Feels like your breasts have grown slightly.'
			end
			killvar 'temp'
		end
	else
		if drugVars['breastcream_dose'] < 1:
			'<font color = #DB7093>You smear the cream onto your breasts and rub it in.</font>'

			if ARGS[1] = 0 and $ARGS[1] = '':
				mc_inventory['breastcream'] -= 1
				if mc_inventory['breastcream'] <= 0: mc_inventory['breastcream'] = 0 & msg 'That was your last bit of breast cream.'
			end

			drugVars['breastcream_used'] += 1
			drugVars['breastcream_dose'] = 1
		else
			'Using any more cream won''t have any effect.'
		end
		gs 'stat'
	end

elseif $ARGS[0] = 'painkiller':
	if ARGS[1] = 0 and $ARGS[1] = '':
		mc_inventory['painkillers'] -= 1
		if mc_inventory['painkillers'] <= 0: mc_inventory['painkillers'] = 0 & msg 'That was your last painkiller.'
	end

	drugVars['painkillers_used'] += 1
	pain['killer'] += 1
	gs 'stat'

elseif $ARGS[0] = 'alcohol':
	if $ARGS[1] = 'stat':
		if alko > 9:
			pain['relief'] = 70
		elseif alko > 6:
			pain['relief'] = 40
		elseif alko > 3:
			pain['relief'] = 15
		end
	else
		if drugVars['cheat_immune'] = 0: 
			drugVars['alcohol_used'] += 1
			if drugVars['alcohol_used'] > 15 and drugVars['alcohol_exp'] = 0: drugVars['alcohol_exp'] = 1
		end	

		if ARGS[2] <= 1: 
			temp_alc_count = 1
		else
			temp_alc_count = ARGS[2]
		end

		:alcohol_jump
			temp_alc_count -= 1
			pcs_health -= 5
			pcs_energy -= 5

			if $ARGS[1] = 'beer':
				if pcs_traits['alko_status'] = -1:
					alko += rand(1,2)
				elseif pcs_traits['alko_status'] = 1:
					alko += rand(0,1)
				else
					alko += 1
				end
				pcs_traits['alko_day'] += 1

				fat += 3
				pcs_mood += 10
				if pcs_hydra >= 100:
					pcs_hydra += 5
				else
					pcs_hydra += 10
				end

			elseif $ARGS[1] = 'wine' or $ARGS[1] = 'champagne':
				if pcs_traits['alko_status'] = -1:
					alko += 3
				elseif pcs_traits['alko_status'] = 1:
					alko += 1
				else
					alko += 2
				end
				pcs_traits['alko_day'] += 2

				fat += 4
				pcs_mood += 20
				if pcs_hydra >= 100:
					pcs_hydra += 5
				else
					pcs_hydra += 10
				end

			elseif $ARGS[1] = 'vodka' or $ARGS[1] = 'whiskey' or $ARGS[1] = 'scotch' or $ARGS[1] = 'rum':
				pcs_traits['alko_day'] += 3
				if pcs_traits['alko_status'] = -1:
					alko += rand(4,5)
				elseif pcs_traits['alko_status'] = 1:
					alko += rand(1,2)
				else
					alko += 3
				end

				fat += 6
				if pcs_hydra >= 100:
					pcs_hydra -= 5
				else
					pcs_hydra -= 10
				end

			elseif $ARGS[1] = 'moonshine':
				if pcs_traits['alko_status'] = -1:
					alko += rand(7,8)
				elseif pcs_traits['alko_status'] = 1:
					alko += rand(2,3)
				else
					alko += 5
				end
				pcs_traits['alko_day'] += 5

				fat += 6
				if pcs_hydra >= 100:
					pcs_hydra -= 5
				else
					pcs_hydra -= 10
				end

			else
				'<br><font color = red>Developer note: The type of alcohol: (<<$ARGS[1]>>) is missing in this scene. Please report this and a small part of the text of the current scene as a bug.</font>'
			end
		if temp_alc_count > 0: jump 'alcohol_jump'
		killvar 'temp_alc_count'

		frost = 0
		pcs_breath = 0
		cumspclnt = 2
		gs 'cum_cleanup'
		gs 'stat'
	end

elseif $ARGS[0] = 'aphrodisiac':
	if $ARGS[1] = 'cikl':
		if drugVars['aphrodisiac_overdose'] = 1: drugVars['aphrodisiac_overdose'] = 0
		if drugVars['aphrodisiac_timer'] ! 0: drugVars['aphrodisiac_timer']	= 0
	elseif $ARGS[1] = 'hourly_events':
		if drugVars['aphrodisiac_timer'] >= 1:
			!! Changed from pcs_horny < 80 -> pcs_horny < 70 to ensure a minimum increase of +10. Blame Anjuna
			if pcs_horny < 70:
				pcs_horny = 80
			else
				pcs_horny += 10
			end
			drugVars['aphrodisiac_timer'] -= 1
		end
	else
		if drugVars['aphrodisiac_overdose'] = 1:
			$drugVars['aphrodisiac_msg'] = '<br>You''ve had enough aphrodisiac for today.'
		else
			if ARGS[1] = 0 and $ARGS[1] = '':
				mc_inventory['aphrodisiac'] -= 1
				if mc_inventory['aphrodisiac'] <= 0: mc_inventory['aphrodisiac'] = 0 & msg 'That was your last aphrodisiac pill.'
			end

			drugVars['aphrodisiac_used'] += 1

			if drugVars['aphrodisiac_timer'] = 0:
				$drugVars['aphrodisiac_msg'] = '<font color = #DB7093><br>You take a gum and chew it. It tastes like strawberry, but is also kind of spicy.</font>'
				drugVars['aphrodisiac_timer'] += 8
				pcs_horny = 80
			elseif drugVars['aphrodisiac_timer'] > 0 and drugVars['aphrodisiac_timer'] <= 8:
				$drugVars['aphrodisiac_msg'] = '<font color = #DB7093><br>You take another gum and chew it. It makes your mouth feel kinda tingly.</font>'
				drugVars['aphrodisiac_timer'] += 8
				pcs_horny = 100
			elseif drugVars['aphrodisiac_timer'] > 8 and min_arousal < 60:
				$drugVars['aphrodisiac_msg'] = '<font color = red><b><br>You take yet another gum and start chewing it. Suddenly you find yourself in grip of an intense orgasm!<br>It goes on and on and you sink to the ground and do your best to endure it.</b></font>'
				drugVars['aphrodisiac_overdose'] = 1
				pcs_horny = min_arousal

				orgasm += 1
				pcs_mood = 100
				min_arousal += 10

				if min_arousal <= 10:
					$min_arousal_msg = '<font color = #DB7093>That was intense! You can still feel the tingles.</font>'
				elseif min_arousal <= 20:
					$min_arousal_msg = '<font color = #DB7093>You are really starting to enjoy these! Your crotch still feels kinda hot though.</font>'
				elseif min_arousal <= 30:
					$min_arousal_msg = '<font color = #DB7093>As you are trying to get back to your feet you notice that you are still horny. What is happening to you?</font>'
				elseif min_arousal <= 40:
					$min_arousal_msg = '<font color = #DB7093>You are certain of it. Every time those gums give you an orgasm they also increase your libido.</font>'
				elseif min_arousal <= 50:
					$min_arousal_msg = '<font color = #DB7093>You run a finger across your slit and shudder. You really should stop chewing these gums while you can still think of something other than sex.</font>'
				else
					$min_arousal_msg = '<font color = #DB7093>You are burning up. You feel like you could fuck anything and everything all day long.</font>'
				end
			else
				$drugVars['aphrodisiac_msg'] = '<font color = #DB7093>You chew another gum with trepidation, looking forward to more orgasms but nothing happens. Huh. Have you become immune?</font>'
			end
		end
		gs 'stat'
	end
else
	'<br><font color = red>Developer note: The type of drug is wrong or missing in this scene. Please report this and a small part of the text of the current scene as a bug.</font>'
end




gs 'traits', 'addictive_personality'

--- drugs ---------------------------------
