# cikl
day += 1
daystart += 1
week += 1
hour -= 24

if BuyHous = 2 and ArendHouseSL <= 0:ArendHouseSL = 0 & BuyHous = 0 & housr = 0
if BuyHous = 2 and ArendHouseSL > 0:ArendHouseSL -= 1

vidageday -= 1
if workDolgDay > 0:workDolgDay -= 1
if QWdogreiqTimer > 0:QWdogreiqTimer -= 1
if husband > 0:husbanday += 1
if husband > 10 and husbanday > 0:husband -= 15
if fingal > 0:fingal -= 1

if husbandMark = 1 and husband <= 10:
	husbizvradd = 0
	husbharmin = 0
	husbandMark = 0
	husband = 0
	divorced += 1

	if KFOnLineReaga > 0:KFOnLineReaga -= 1

	'<b><font color="red">Your husband has filed for a divorce.</font></b>'
end

if year_start ! year and katjaPreg = 0 and month >= 2:katjaPreg = 1

!Clothing stock and price randomizers
Clothingstock = rand (0,23)
i = 1
:loopprice
Clothingstock[i] = rand (0,500)
i += 1
if i <= 147:jump 'loopprice'

!!SECTION: Bimbo (daily status update checks)
if bimbo < 0:
	bimbo = 0
elseif bimbo < 10:
	bimbolevel = 0
	bimbo -= 1
elseif bimbo < 20:
	bimbolevel = 1
elseif bimbo < 30:
	bimbolevel = 2
elseif bimbo < 40:
	bimbolevel = 3
else
	if succubusflag = 1:
		bimbolevel = 4
	else
		bimbolevel = 3
	end
end
if bimbo >= 50:bimbo = 50

!!Bimbo levels. They use custom variables so they wont permanently change character stats
if bimbolevel = 0:bimbobeauty = 0 and bimbostupidity = 0
if bimbolevel = 1:bimbobeauty = (vnesh / 10) and bimbostupidity = (intel / 6)
if bimbolevel = 2:bimbobeauty = (vnesh / 6) and bimbostupidity = (intel / 4)
if bimbolevel = 3:bimbobeauty = (vnesh / 5) and bimbostupidity = (intel / 3)
if bimbolevel = 4:bimbobeauty = (vnesh / 4) and bimbostupidity = (intel / 3)

if bimbocl = 1:
	bimbocl = 0
	bimbo += 2
end
!!Checks how often sex has occured in the last 24 hours and for drops in bimbo score, for calculating withdrawal
if bimbolevel >= 1:
	bimbo += ((sex + bj + anal) - snapshotX) - 3
	if snapshotY - bimbo <= 1 or bimbo > 40:
		bimbowithdrawal = 0
	else
		bimbowithdrawal += 1
	end
end
snapshotX = (sex + bj + anal)
snapshotY = bimbo


if curly > 0:curly -= 1

! WD: Added daily reduction of braids for Maruda Hair Mod
if hbraids > 0:hbraids -= 1


sweat += 1

if tan > 0:tan -= 1

if pillcon < 0:
	pillcon = 0
elseif tabletkishot <= 0:
	pillcon -= 1
end
if tabletkicheck = 2:
	if tabletkishot ! 0:
		cycle = 1
		mesec = 0
		if rand(0,1000) = 1000:
			EggRH = rand(20,80)
		else
			EggRH = 0
		end
		FocH = EggRH
	end
	if tabletkishot <= 0:
		'The chemicals regulating your fertility cycle are wearing off.'
		pillcon -= 29
		tabletkicheck = 0
	elseif tabletkishot > 1 and tabletkishot < 5:
		'You are due for a birth control shot. If you do not get one, you might get pregnant.'
	elseif tabletkishot = 1:
		'Your birth control shot will wear off tomorrow.'
	end
	tabletkishot -= 1
end
tabletkipd += tabletkipi
tabletkipi = 0
tabletkipt = 0

if tabletkicheck = 1 and tabletkichday < daystart:
	tabletkichday = daystart
	tabletkimm = ((100-(willpower / (intel * 5 + will * 5))) + (100-(manna / (intel * magik + magik * 100 + vital * 10 + rikudo))))
	if son < 10:
		tabletkimm += (100- (son * 10))
	end
	if willpower < ((intel * 5 + will * 5) * 25 / 100):
		tabletkimm = tabletkimm * 4
	elseif manna < ((intel * magik + magik * 100 + vital * 10 + rikudo) * 10 / 100):
		tabletkimm = tabletkimm * 2
	end
	tabletkiap = tabletkimm
	tabletkiap += (((100-intel)*4)+((100-will)*2)+((50-age)*3))
	tabletkiap -= ((kid*30)+(abort*2)+(tabletkipd*(age/10)))
	temprand = rand(0,(200+(tabletkimm-(will*3))))
	if temprand = 0:
		tabletkioddp = 1
	end
	tabletkiap += temprand
	if tabletkiap < 600:
		if tabletkipd > -10:
			if willpower < ((intel * 5 + will * 5) * 25 / 100):
				'You stare at your bottle of birth control pills. You know you should take one, but you can''t quite work up enough effort to care.'
			elseif manna < ((intel * magik + magik * 100 + vital * 10 + rikudo) * 10 / 100):
				'You stare at your bottle of birth control pills, but don''t open it.'
			elseif son < 10:
				'You fumble with the cap on your birth control pills, trying to get it open. You finally give up, too tired to manage it.'
			else
				'You just realized you forgot to take your birth control pill today.'
			end
		end
		tabletkipt = 2
		tabletkipi = -4
	else
		if tabletkiap < 650:
			temprand = rand(0,5)
		else
			temprand = rand(0,1000)
		end
		if temprand = 0:
			temprand = rand(0,1)
			if temprand = 0:
				tabletki -= 1
				skinvan += 1
				tabletkipt = -2
				tabletkipi = 1
			else
				tabletkipt = 3
				tabletkipi = -3
			end
			if tabletkipd > -10:
				'You find yourself holding the bottle of birth control pills. You cannot remember if you took one or not.'
			end
			if tabletkipd > 10:
				if rand(0,9) = 0:
					if tabletkipt < 0:
						'You don''t think you have taken it today.'
					else
						'You think you have taken it today.'
					end
				else
					if tabletkipt > 0:
						'You don''t think you have taken it today.'
					else
						'You think you have taken it today.'
					end
				end
			end
		else
			'You take your birth control pill for the day.'
			tabletki -= 1
			skinvan += 1
			if tabletkioddp = 0:
				pillcon += 1+(pillcon+15)/40
				if pillcon > 40: pillcon = 40
			else
				if vitaminday ! daystart:
					vitaminday = daystart
					skinvan += 1
				end
			end
			tabletkiday = daystart
			tabletkipt = 0
			tabletkipi = 0
		end
	end		
end

if skinvan >= 20:skinvan -= 20 & skin += 1

if lashair ! 1:
	leghair += 1
	lobok += 1
end

if suhbelo > 0:suhbelo2 = suhbelo & suhbelo = 0

if fbreath = 1:fbreath = 0

manna -= 10

if beg >= 2000:
	beg -= 4
elseif beg >= 1500:
	beg -= 3
elseif beg >= 1000:
	beg -= 2
elseif beg >= 100:
	beg -= 1
end

!'
if salo > fat:
	salo -= 1
	fat += 1
else
	salo += 1
	fat -= 1
end

if strenbuf > stren:strenbuf -= 1
if strenbuf < stren:strenbuf += 1
if vitalbuf > vital:vitalbuf -= 1
if vitalbuf < vital:vitalbuf += 1
if agilbuf > agil:agilbuf -= 1
if agilbuf < agil:agilbuf += 1
'!

!STD check
if SifacOnce = 1:Sifilis += 1
if GerpesOnce = 1:Gerpes += 1
if TriperOnce = 1:Triper += 1
if KandidozOnce = 1:Kandidoz += 1

VeneraN = 0

if VeneraOnce > 0:VeneraOnce = 0
if SifacOnce = 1:VeneraN += 1
if GerpesOnce = 1:VeneraN += 1
if TriperOnce = 1:VeneraN += 1

Venera = VeneraN

!Appearance age
if vidageday <= 0:
	vidageday = 360
	vidage += 1
end

if anus > 1 and ashrink > 0 and analplugIN = 0:
	if anusK < 0:anusK = 0
	if anusK < ashrinkdays:anusK += 1
	if anusK >= ashrinkdays:anus -= ashrink & anusK = 0
	if anus < 0: anus = 0
end
if vagina > 10 and vshrink > 0:
	if vaginaK < 0:vaginaK = 0
	if vaginaK < vshrinkdays:vaginaK += 1
	if vaginaK >= vshrinkdays:vaginaK = 0 & vagina -= vshrink
end

lipkoef -= 1
!!!!!!!!!!!!
!!!jobs!!!
!!!!!!!!!!!!
if Enable_autotampon = 0 and isprok = 1:isprok = 0 & 'You threw away your used tampon.'
if Enable_autotampon = 0 and isprokp = 1:isprokp = 0 & 'You threw away your used sanitary pad.'

if preg = 1 and pregtime < 280:
	pregtime += 1

	if pregtimes = 0:pregtimes = 1
elseif preg = 1 and pregtime = 280 and hourpreg ! hour:
	hourpreg = hour
	'<center><b>A sharp pain runs through your stomach, and something flows down your legs. Snap, your water broke! You have to get to the clinic fast!</b></center>'
elseif preg = 1 and pregtime > 280:
	cla
	*clr
	over = 4
	'<center><b>A horrible pain shoots through your body.</b></center>'
	xgt 'gameover'
	exit
end

if StoryLine = 0 or altQS = 1:
	if horny < 100:horny += vagina
else
	if vagina = 0:
		razeba = 0

		if horny > 0 and horny <= 50:horny -= 10
		if horny > 50:horny -= 25
	elseif vagina > 0:
		if pregtimes = 0:
			if age < 18:
				razeba = 1

				if horny > 0 and horny <= 50:horny -= 5
				if horny > 50 and horny < 80:horny -= 10
				if horny >= 80:horny -= 20
			elseif age >= 18 and age < 21:
				razeba = 2

				if horny > 0 and horny <= 50:horny -= 1
				if horny > 50 and horny < 80:horny -= 5
				if horny >= 80:horny -= 10
			elseif age >= 21 and age < 25:
				razeba = 3

				if horny > 0 and horny <= 50:horny += 1
				if horny > 50 and horny < 80:horny -= 1
				if horny >= 80:horny -= 5
			elseif age >= 25 and age < 30:
				razeba = 4

				if horny > 0 and horny <= 50:horny += 5
				if horny > 50 and horny < 80:horny += 1
				if horny >= 80:horny -= 5
			elseif age >= 30:
				razeba = 5

				if horny > 0 and horny <= 50:horny += 10
				if horny > 50 and horny < 80:horny += 5
				if horny >= 80:horny += 1
			end
		elseif pregtimes > 0:
			if preg = 0:
				razeba = 5

				if horny > 0 and horny <= 50:horny += 10
				if horny > 50 and horny < 80:horny += 5
				if horny >= 80:horny += 1
			elseif preg > 0:
				razeba = 6

				if horny < 100:horny += pregtime / 10
			end
		end
	end
end

if horny < 0:horny = 0

if musle >= salo and stren >= 10 and vital >= 10 and dounspell = 0:
	!!Fall muscularity
	if downmusl >= 5:
		downmusl = 0
		stren -= 1
		vital -= 1
		fat += 4
		salo += 4
	else
		downmusl += 1
	end
end

!counter for Dimka avoidance
if nodimka = 1:
	nodimkaK += 1
	if dimaRudeBlock = 1: nodimka = 0
end

!!! Maruda Hair Mod
!!! Max. Hair length 600mm, or 60cm, which should be somewhere in the lower back area.
!!! Hair grows 1mm each day, it takes 20 months (1 month = 30 days) to regrow the hair from 0.
if hairlength < 601:hairlength += 1

if hscrunch > 0:
	hscrunchrand = rand(1, 100)

	if hscrunchrand <= 8:hscrunch -= 1
end
!!! Maruda Hair Mod

gs 'starenie'

if nark > 60:
	nark = 60
elseif nark > 30:
	nark -= 3
elseif nark > 0:
	nark -= 1
end

if pregtime > 10:fat += 1
if kanicont > 0:kanicont -= 1 & !kanicont countdown. set and display in [stat]

--- cikl ---------------------------------

