# traits

if $ARGS[0] = 'menu':
	*clr & cla
	gs 'obj_din', 'chartabs'
	'<center><h1>Traits</h1></center>'
	'<center><table cellspacing="0" cellpadding="20" valign="top"><tr>'
	'<td>'
	'<center><b>Bimbo</b></center>'
	if bimbolevel = 0:
		'You do not have this trait.'
		'To gain this trait, you must wear bimbo clothing / shoes for a few days.'
		'You have <<bimbo>> out of 10 points towards level 1.'
	elseif bimbolevel = 1:
		'You have this trait at level 1.'
		'To maintain this trait, you must wear bimbo clothing / shoes and/or have regular sex.'
		'Due to this trait, you gain a very small bonus to appearance and a very small penalty to intelligence.'
		'You have <<bimbo>> out of 20 points towards level 2.'
		if bimbowithdrawal = 0:
			'You are not in withdrawal.'
		else
			'You have <<bimbowithdrawal>> out of 30 points towards losing this trait.'
		end
	elseif bimbolevel = 2:
		'You have this trait at level 2.'
		'To maintain this trait, you must wear bimbo clothing / shoes and/or have regular sex.'
		'Due to this trait, you gain a small bonus to appearance and a small penalty to intelligence.'
		'You have <<bimbo>> out of 30 points towards level 3.'
		if bimbowithdrawal = 0:
			'You are not in withdrawal.'
		else
			'You have <<bimbowithdrawal>> out of 30 points towards losing this trait.'
		end
	else
		'You have this trait at level 3.'
		'To maintain this trait, you must wear bimbo clothing / shoes and/or have regular sex.'
		'Due to this trait, you gain a moderate bonus to appearance and a moderate penalty to intelligence.'
		if bimbowithdrawal = 0:
			'You are not in withdrawal.'
		else
			'You have <<bimbowithdrawal>> out of 30 points towards losing this trait.'
		end
	end
	
	*nl
	
	'<center><b>Exhibitionist</b></center>'
	if Exhibitionist_lvl = 0 and exhib_cheat = 0:
		'You do not have this trait.'
		'To gain this trait, you must have low enough inhibition and choose to expose your breasts in public.'
		'You have <<pcs_exhib>> out of 10 points towards level 1. This will slowly decrease each day unless you expose yourself.'
	elseif Exhibitionist_lvl = 1:
		'You have this trait at level 1.'
		'To increase this trait, you must choose to expose your breasts and/or bare bottom in public.'
		'This trait grants you a small amount of excitement from exposing yourself.'
		'You have <<pcs_exhib>> out of 50 points towards level 2.'
	elseif Exhibitionist_lvl = 2:
		'You have this trait at level 2.'
		'To increase this trait, you must choose to expose your breasts, bare bottom and/or pussy in public.'
		'This trait grants you a moderate amount of excitement from exposing yourself.'
		if pcs_exhib < 100:
			'You have <<pcs_exhib>> out of 100 points towards level 3.'
		elseif pcs_exhib >= 100 and exhibitionQW < 3:
			'You must trigger an event in the park to gain level 3.'
		elseif pcs_exhib >= 100 and exhibitionQW > 2:
			'You will have to wait until the end of the day for the trait level to update.'
		end
	else
		'You have this trait at level 3.'
		'This is the highest level of this trait.'
		'This trait grants you a large amount of excitement from exposing yourself.'
	end
	
	*nl
	
	if traits['nerd_status'] = 0:
		'<center><b>Likes learning</b></center>'
		'You don''t have this trait but have <<traits[''nerd_points'']>> points. You need to earn <<40 - traits[''nerd_points'']>> more points to get level 1 of this trait.'
	elseif traits['nerd_status'] = 1:
		'<center><b>Likes learning</b></center>'
		'You have level 1 of this trait and <<traits[''nerd_points'']>> points. You need to earn <<60 - traits[''nerd_points'']>> more points to get level 2 of this trait. If you fall below 20 points, you''ll lose this trait.'
	elseif traits['nerd_status'] = 2:
		'<center><b>Loves to learn</b></center>'
		'You have level 2 of this trait and <<traits[''nerd_points'']>> points. You need to earn <<80 - traits[''nerd_points'']>> more points to get level 3 of this trait. If you fall below 40 points, you''ll fall back to level 1.'		
	elseif traits['nerd_status'] = 3:
		'<center><b>Teacher''s pet</b></center>'
		'You have level 3 of this trait and <<traits[''nerd_points'']>> points. If you fall below 60 points, you''ll fall back to level 2.'		
	end
	'Listening to more than 80% of lessons and doing your homework regularly earns you points for this trait, but you''ll lose points if you listen to less than 60% of lessons or if you don''t do your homework.'
	
	*nl
	
	'<center><b>Addictive Personality</b></center>'
	if addictive_trait_lvl = 0 and addictive_cheat = 0:
		'You do not have this trait.'
		'To gain this trait, you have to use 2 different types of drugs several times. At the moment, you have <<addictive_exp>> out of 2 points towards level 1.'
	elseif addictive_trait_lvl = 1:
		'You have this trait at level 1.'
		'You have some experience with taking drugs, and it becomes harder for you to refuse to take them.'
		'To increase this trait, you have to use 3 different types of drugs several times. At the moment, you have <<addictive_exp>> out of 3 points towards level 2.'
	elseif addictive_trait_lvl = 2:
		'You have this trait at level 2.'
		'Taking drugs has become something normal, and that makes it even harder for you to refuse to take them.'
		'To increase this trait, you have to use 4 different types of drugs several times. At the moment, you have <<addictive_exp>> out of 4 points towards level 3.'
	elseif addictive_trait_lvl = 3:
		'You have this trait at level 3.'
		'Taking drugs is a normal part of your life, which makes it difficult for you to refuse to take them.'
		'This is the highest level of this trait.'
	end
	
	*nl
	
	'<center><b>Cumeater</b></center>'
	if trt_cumeater = 0 and cumeater_cheat = 0:
		'You do not have this trait.'
		'To gain this trait, you must swallow cum 10 times.'
		'You have swallowed cum <<swallow>> times.'
	elseif trt_cumeater = 0 and cumeater_cheat = 1:
		'You do not have this trait.'
	else
		'You have this trait.'
		'It allows you to remove cum from certain locations and eat it'
		'This trait cannot be lost.'
	end
	
	*nl
	
	if traits['alko_status'] = -1:
		'<center><b>Lightweight</b></center>'
		'It doesn''t take much for you to get drunk. You don''t have to drink as much to feel the effects of alcohol.'
	elseif traits['alko_status'] = 1:
		'<center><b>Heavyweight</b></center>'
		'You''ve built up a tolerance, making it harder for you to feel the effects of alcohol.'
	end

	act 'Exit the menu': gt $loc, $loc_arg
	'</td></tr></table></center>'
end

if $ARGS[0] = 'hourly':
	if swallow >= 10 and trt_cumeater = 0 and cumeater_cheat = 0:
		trt_cumeater = 1
		msg 'You have gained the trait "Cumeater"'
	end
end

if $ARGS[0] = 'overnight':
	!!traits['alko_status']: light weight (-1), normal (0), heavy weight (+1)
	!!traits['alko_points']: between -100 and 100, tracks if sveta is a light or heavy wight
	!!traits['alko_day']: amount of alko sveta has drunk today
	
	!!Gains/Decay
	if traits['alko_day'] > 0:
		if traits['alko_day'] > 9:
			traits['alko_points'] += 9
		else
			traits['alko_points'] += traits['alko_day']
		end
	elseif traits['alko_day'] = 0:
		traits['alko_points'] -= 2
	end
	
	if kanikuli = 0 and week < 6:
		if lernHome > 0:
			traits['nerd_lernHome'] = 0
			traits['nerd_points'] -= 1
		elseif lernHome = 0 and traits['nerd_lernHome'] < 5:
			traits['nerd_lernHome'] += 1
		elseif traits['nerd_lernHome'] = 5:
			traits['nerd_points'] += 1
		end
	elseif kanikuli = 0 and week = 6:
		!!This check has to be changed if the number of non-sport lessons ever changes (27 right now)
		if traits['nerd_lessons'] > 20:
			traits['nerd_points'] += traits['nerd_lessons'] - 17
		elseif traits['nerd_lessons'] < 14:
			traits['nerd_points'] -= iif(traits['nerd_status'] > 0, 5, 10)
		end
		traits['nerd_lessons'] = 0
	end	
	
	!!Trait selection
	if traits['alko_points'] > 50 and traits['alko_status'] < 1:
		traits['alko_status'] = 1
		msg 'You have gained the trait ''Heavyweight''.'
	elseif traits['alko_points'] < -50 and traits['alko_status'] > -1:
		traits['alko_status'] = -1	
		msg 'You have gained the trait ''Lightweight''.'
	elseif traits['alko_status'] = -1 and traits['alko_points'] > 0:
		traits['alko_status'] = 0
		msg 'You have lost the trait ''Lightweight''.'
	elseif traits['alko_status'] = 1 and traits['alko_points'] < 0:
		traits['alko_status'] = 0
		msg 'You have lost the trait ''Heavyweight''.'
	end
	
	if traits['nerd_points'] > 80 and traits['nerd_status'] < 3:
		traits['nerd_status'] = 3
		msg 'You have gained the trait ''Teacher''s pet''.'
	elseif traits['nerd_points'] > 60 and traits['nerd_status'] < 2:
		traits['nerd_status'] = 2
		msg 'You have gained the trait ''Loves to learn''.'		
	elseif traits['nerd_points'] > 40 and traits['nerd_status'] < 1:
		traits['nerd_status'] = 1
		msg 'You have gained the trait ''Likes learning''.'
	elseif traits['nerd_points'] < 60 and traits['nerd_status'] = 3:
		traits['nerd_status'] = 2
		msg 'You have lost the trait ''Teacher''s pet''.'
	elseif traits['nerd_points'] < 40 and traits['nerd_status'] = 2:
		traits['nerd_status'] = 1
		msg 'You have lost the trait ''Loves to learn''.'	
	elseif traits['nerd_points'] < 20 and traits['nerd_status'] = 1:
		traits['nerd_status'] = 0
		msg 'You have lost the trait ''Likes learning''.'		
	end
	
	!!Trait effects
	if traits['nerd_status'] = 3:
		grupvalue[1] -= 1
		grupvalue[3] += rand(1,2)
		grupvalue[4] -= rand(1,2)		
	elseif traits['nerd_status'] = 2:
		grupvalue[3] += 1
		grupvalue[4] -= 1
	elseif traits['nerd_status'] = 1:
		grupvalue[3] += rand(0,1)
	end

	!!Cleanup
	traits['alko_day'] = 0
	if traits['alko_points'] > 100: 
		traits['alko_points'] = 100
	elseif traits['alko_points'] < -100: 
		traits['alko_points'] = -100
	end
	
	if traits['nerd_points'] > 100:
		traits['nerd_points'] = 100
	elseif traits['nerd_points'] < -100:
		traits['nerd_points'] = -100
	end
end

if $ARGS[0] = 'addictive_personality':
	!!Addictive Personality Trait
	if addictive_cheat = 0:
		addictive_exp = smoke_exp + joint_exp + heroin_exp + cocaine_exp + alcohol_exp + amphetamine_exp

		if addictive_exp = 2 and addictive_trait_lvl < 1:
			addictive_trait_lvl = 1
			if add_trait_msg_1 = 0: add_trait_msg_1 = 1 & msg 'You have gained the trait ''Addictive Personality''.'
		elseif addictive_exp = 3 and addictive_trait_lvl < 2:
			addictive_trait_lvl = 2
			if add_trait_msg_2 = 0: add_trait_msg_2 = 1 & msg 'You have increased the level of your ''Addictive Personality'' trait to 2.'
		elseif addictive_exp >= 4 or (heroin_exp = 1 and cocaine_exp = 1) and addictive_trait_lvl < 3:
			addictive_trait_lvl = 3
			if add_trait_msg_3 = 0: add_trait_msg_3 = 1 & msg 'You have increased the level of your ''Addictive Personality'' trait to 3.'
		end
	end
end

--- traits ---------------------------------

