Browse Source

[added] addictive personality trait

julzor 5 years ago
parent
commit
bf746bb1b3
3 changed files with 86 additions and 3 deletions
  1. 26 0
      locations/Cheatmenu_din.qsrc
  2. 36 3
      locations/drugs.qsrc
  3. 24 0
      locations/traits.qsrc

+ 26 - 0
locations/Cheatmenu_din.qsrc

@@ -263,6 +263,11 @@ $cheatmenu['addict'] = {
 		NarkImmune = 1
 		smoker = 0
 		smokerNeed = 0
+		joint_count = 0
+		alcohol_count = 0
+		cocaine_count = 0
+		amphetamine_count = 0
+		SNarkTimes = 0
 		dynamic $cheatmenu['permanent']
 		exit
 	elseif NarkImmune = 1:
@@ -350,6 +355,24 @@ $cheatmenu['exhib_block'] = {
 		dynamic $cheatmenu['permanent']	
 	end
 }
+ 
+$cheatmenu['addictive_block'] = {
+	if addictive_cheat = 0:
+		addictive_cheat = 1
+		smoke_exp = 0
+		joint_exp = 0
+		heroin_exp = 0
+		cocaine_exp = 0
+		amphetamine_exp = 0
+		alcohol_exp = 0
+		addictive_exp = 0
+		addictive_trait_lvl = 0
+		dynamic $cheatmenu['permanent']
+	elseif addictive_cheat = 1:
+		addictive_cheat = 0
+		dynamic $cheatmenu['permanent']	
+	end
+}
 
 $cheatmenu['cumtrait_block'] = {
 	if cumeater_cheat = 0:
@@ -432,6 +455,8 @@ $cheatmenu['permanent'] = {
 	if cumeater_cheat = 1:$cheatcumtrait = 'Disabled'
 	if exhib_cheat = 0:$cheatexhib = 'Enabled'
 	if exhib_cheat = 1:$cheatexhib = 'Disabled'
+	if addictive_cheat = 0: $cheataddictive = 'Enabled'
+	if addictive_cheat = 1: $cheataddictive = 'Disabled'
 	if cheatConsole = 0:$cheatConsole = 'Visible'
 	if cheatConsole = 1:$cheatConsole = 'Hidden'
 	if cheatTime = 0:$cheatTime = 'Disabled'
@@ -471,6 +496,7 @@ $cheatmenu['permanent'] = {
 	
 	'Bimbo trait and the effects of wearing bimbo clothes: <a href="exec:dynamic $cheatmenu[''BimboCloth'']"><<$cheatBimbo>></a>'
 	'Exhibitionist trait: <a href="exec:dynamic $cheatmenu[''exhib_block'']"><<$cheatexhib>></a>'
+	'Addictive personality trait: <a href="exec:dynamic $cheatmenu[''addictive_block'']"><<$cheataddictive>></a>'
 	'Cumeater trait: <a href="exec:dynamic $cheatmenu[''cumtrait_block'']"><<$cheatcumtrait>></a>'
 	
 	*nl

+ 36 - 3
locations/drugs.qsrc

@@ -14,7 +14,10 @@
 !! Example 2: sveta drinks 2 beer gs 'drugs', 'alcohol', 'beer', 2
 
 if $ARGS[0] = 'smoke':
-	if NarkImmune = 0: smoker += 1
+	if NarkImmune = 0: 
+		smoker += 1
+		if smoker > 20 and smoke_exp = 0: smoke_exp = 1
+	end
 	siga -= 1
 	smokeDay = daystart
 	smokeHour = hour
@@ -33,7 +36,10 @@ if $ARGS[0] = 'smoke':
 	if pcs_energy < 80: pcs_energy += 4
 	gs 'stat'
 elseif $ARGS[0] = 'joint':
-	if NarkImmune = 0: joint_smoked += 1
+	if NarkImmune = 0: 
+		joint_smoked += 1
+		if joint_smoked > 5 and joint_exp = 0: joint_exp = 1
+	end
 	joint -= 1
 	jointday = daystart
 	jointhour = hour
@@ -59,12 +65,19 @@ elseif $ARGS[0] = 'joint':
 	end
 	gs 'stat'
 elseif $ARGS[0] = 'heroin':
-	if NarkImmune = 0: SNarkTimes += 1
+	if NarkImmune = 0: 
+		SNarkTimes += 1
+		if SNarkTimes > 1 and heroin_exp = 0: heroin_exp = 1
+	end
 	StrongNarkota += 25
 	pcs_mood = 100
 	pcs_health -= 10
 	gs 'stat'
 elseif $ARGS[0] = 'cocaine':
+	if NarkImmune = 0: 
+		cocaine_count += 1
+		if cocaine_count > 3 and cocaine_exp = 0: cocaine_exp = 1
+	end
 	dur -= 1
 	pcs_health = pcs_vital * 10 + pcs_stren * 5
 	pcs_willpwr = pcs_intel * 5 + pcs_sprt * 5
@@ -73,6 +86,10 @@ elseif $ARGS[0] = 'cocaine':
 	nark += 10
 	gs 'stat'
 elseif $ARGS[0] = 'amphetamine':
+	if NarkImmune = 0: 
+		amphetamine_count += 1
+		if amphetamine_count > 5 and amphetamine_exp = 0: amphetamine_exp = 1
+	end
 	if amphIntake < 2:
 		'<font color= blue>You swallow the white pill.</font>'
 		amphIntake += 1
@@ -83,6 +100,10 @@ elseif $ARGS[0] = 'amphetamine':
 	end
 	gs 'stat'
 elseif $ARGS[0] = 'alcohol':
+	if NarkImmune = 0: 
+		alcohol_count += 1
+		if alcohol_count > 15 and alcohol_exp = 0: alcohol_exp = 1
+	end	
 	if ARGS[2] <= 1: 
 		alc_count = 1
 	else
@@ -140,5 +161,17 @@ 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
 
+!!Addictive Personality Trait
+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
+elseif addictive_exp = 3 and addictive_trait_lvl < 2:
+	addictive_trait_lvl = 2
+elseif addictive_exp >= 4 or (heroin_exp = 1 and cocaine_exp = 1) and addictive_trait_lvl < 3:
+	addictive_trait_lvl = 3
+end
+
+
 --- drugs ---------------------------------
 

+ 24 - 0
locations/traits.qsrc

@@ -41,7 +41,9 @@ if $ARGS[0] = 'menu':
 			'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.'
@@ -68,7 +70,29 @@ if $ARGS[0] = 'menu':
 		'This is the highest level of this trait.'
 		'This trait grants you a large amount of excitement from exposing yourself.'
 	end
+	
 	*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 taking 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 taking 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 taking 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.'