stat.qsrc 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211
  1. # stat
  2. !!This is error catching to prevent stat from running too early
  3. if opPRE > 0: exit
  4. if Enable_Android = 0:
  5. clr
  6. !only clear status and renew object in non-Android mode
  7. gs 'obj_din', 'old'
  8. end
  9. if daystart_start < 100:
  10. pl '<BR>Did you start at the <a href="exec:daystart_start = 241 & gs''daystart'' & gs''stat''">end of August</a> or <a href="exec:daystart_start = 152 & gs''daystart'' & gs''stat''">beginning of June</a>?'
  11. exit
  12. end
  13. view
  14. rand1 = rand(0,100)
  15. $stat_msg=''
  16. if MagikDostup = 0: magik_exp = orgasm
  17. if insleep = 0: gs 'stat_sklattrib'
  18. if cheatHealth = 1: dynamic $cheatmenu['std_cure']
  19. if (analplay >= 2 and pcs_ass <= 10) or (analplay >= 4 and pcs_ass <= 15) or (analplay >= 8 and pcs_ass <= 20): pcs_ass += 1 & analplay = 0
  20. !!The following seems to be part of the combat system.
  21. musle[1] = musle
  22. flex[1] = pcs_agil
  23. stamina[1] = pcs_vital * 3
  24. wipo[1] = pcs_sprt
  25. intel[1] = pcs_intel - bimbostupidity
  26. krasota[1] = pcs_apprnc
  27. pcs_hgt[1] = pcs_hgt
  28. salo[1] = salo
  29. fat[1] = fat
  30. Bteh[1] = bteh
  31. Uteh[1] = uteh
  32. Zteh[1] = zteh
  33. !!This is a temporary stop-gap measure for the accomadation skill and will be removed
  34. if succubusflag = 1 and sucskill >= 4:
  35. if pain['throat'] > 0: pain['throat'] = 0 & sucexcess -= 1
  36. if pain['asshole'] > 0: pain['asshole'] = 0 & sucexcess -= 1
  37. if pain['vaginal'] > 0: pain['vaginal'] = 0 & sucexcess -= 1
  38. if vgape > 0: vgape = 0 & vgapetime = 0 & sucexcess -= 1
  39. if agape > 0: agape = 0 & agapetime = 0 & sucexcess -= 1
  40. end
  41. !!mouth cleaning for drinks
  42. if pcs_hydra > hydra_check:
  43. cumspclnt = 2
  44. gs 'cum_cleanup'
  45. end
  46. !!!CHEATS!!!
  47. if cheatWork = 1:work = 0
  48. if cheatWorkKiskis = 1:young_shop_miss = 0
  49. if cheatHapri = 1:pcs_hairbsh = 1
  50. ! Moved from cheats to settings under 'Enema realism'
  51. if cheatKlisma = 0:klismaday = daystart & klismaday1 = 1
  52. if cheatNomakeup = 1:
  53. if pcs_makeup = 0: pcs_makeup = 1
  54. end
  55. if cheatNoSweat = 1 and pcs_sweat > 0: pcs_sweat = 0
  56. if cheatNoEat = 1:
  57. if pcs_energy < 35: pcs_energy = 35
  58. end
  59. if cheatNoDrink = 1:
  60. if pcs_hydra < 35: pcs_hydra = 35
  61. end
  62. if cheatNoSleep = 1:
  63. if pcs_sleep < 35: pcs_sleep = 35
  64. end
  65. if cheatBandit = 1 and npc_horny['A66'] < 19: npc_horny['A66'] = 19
  66. if alko > 0 and frost > 0:frost = 0
  67. if StrongNarkota >= 20:
  68. if alko > 0:alko = 0
  69. end
  70. if lernSkill >= 8: intel_exp += 1 & lernSkill = 0
  71. if lern >= 10: intel_exp += 1 & lern = 0
  72. if pav_slut >= 150 and KatjaKnowBJ ! 1: KatjaKnowBJ = 1
  73. if pav_slut >= 250 or preg > 0 and KatjaKnowSex ! 1: KatjaKnowSex = 1
  74. shameless = guy + stat['bj'] + stat['anal'] + stat['hj'] + ((slutty + gang) * 2)
  75. moneySUM = money + karta + stolmoney
  76. cumSUM = cumsumbod/40
  77. if husbizvradd > 5:izvratH = 1
  78. if husbharmin > 10:harakHusb = 0
  79. if husband = 0:
  80. husbizvradd = 0
  81. husbharmin = 0
  82. husbandMark = 0
  83. houseslut = 0
  84. end
  85. if SNarkvnesh = 0:SNarkvnesh = 1
  86. if SNarkTimes >= SNarkvnesh * 25:
  87. SNarkvnesh += 1
  88. vidage += 1
  89. end
  90. if gopota >= 20 and gnewQW = 1:gnewQW = 2
  91. if workDisk = 4 and week > 5:workDisk = 1
  92. if workDisk = 3 and week > 5:workDiskAtkPlayer = 1
  93. if bfa < 0: bfa = 0
  94. if pcs_vag > 36: pcs_vag = 36
  95. if pcs_throat > 36: pcs_throat = 36
  96. if pcs_ass > 36: pcs_ass = 36
  97. if NarkImmune = 1:
  98. if narkoman ! 0:narkoman = 0
  99. elseif nark >= 30 and narkoman = 0 and NarkImmune = 0:
  100. narkoman = 1
  101. elseif nark = 0 and narkoman = 1:
  102. narkoman = 0
  103. end
  104. if CheatSlut = 1 or succubusflag = 1:
  105. !!Succubus cannot get pregnant
  106. mesec = 0
  107. FocH = 0
  108. EggRH = 0
  109. Ovulate = 0
  110. fertegg = 0
  111. UnfertEgg = 0
  112. PregChem = 0
  113. preg = 0
  114. LutH = 0
  115. RecovH = 0
  116. babyembryo = 0
  117. cycle = 1
  118. end
  119. if succubusflag = 1 and succublvl > 2 and rape > rape_count:
  120. !!High Level Succubus cannot get raped
  121. orgasm += 1
  122. rape = rape_count
  123. pcs_mood = 100
  124. end
  125. if pcs_horny < 50 and cheatHorny = 1: pcs_horny = 50
  126. !!These will be made obsolete with the combat system overhaul
  127. boxing = pcs_jab + pcs_punch + pcs_kick + pcs_def
  128. if boxing > 100: boxing = 100
  129. if MagikDostup = 0:
  130. if pcs_magik > magikhigh:
  131. magikhigh += 1
  132. rikudo += pcs_magik * 100
  133. $stat_msg += '<BR><b>You feel like a strength has been revealed within you, and you gush with magic, lifting you to a new energy level.</b>'
  134. !! This will be replaced when a more advanced physical system is made
  135. if (pcs_magik mod 2 ! 0) and pcs_eyesize < 2: pcs_eyesize += 1
  136. if (pcs_magik mod 2 = 0) and pcs_lashes < 2: pcs_lashes += 1
  137. end
  138. else
  139. !!This is for error catching
  140. killvar 'pcs_magik'
  141. killvar 'rikudo'
  142. killvar 'pcs_splcstng'
  143. end
  144. if pcs_dom < 0: SUB = SUB - pcs_dom & pcs_dom = 0
  145. if SUB < 0: pcs_dom = pcs_dom - SUB & SUB = 0
  146. if pcs_dom > 100: pcs_dom = 100
  147. if SUB > 100: SUB = 100
  148. if SUB >= pcs_dom and pcs_dom > 0:SUB = SUB - pcs_dom & pcs_dom = 0
  149. if pcs_dom >= SUB and SUB > 0:pcs_dom = pcs_dom - SUB & SUB = 0
  150. if pcs_horny < 0: pcs_horny = 0
  151. if pcs_inhib < 0:
  152. pcs_inhib = 0
  153. elseif pcs_inhib > 100:
  154. pcs_inhib = 100
  155. end
  156. healthmax = (pcs_vital * 10 + pcs_stren * 5)
  157. stammax = 5 * (2 * pcs_vital + pcs_agil + pcs_stren) / 2
  158. manamax = (pcs_intel * pcs_magik) + pcs_magik * 100 + pcs_vital * 10 + rikudo
  159. speed = (2 * (pcs_stren + pcs_agil) + pcs_vital) / 5
  160. if healthmax < 1: healthmax = 1
  161. if willpowermax < 50: willpowermax = 50
  162. if stammax < 1: stammax = 1
  163. if manamax < 1: manamax = 1
  164. !pre-calc max value for later display
  165. if fairycurse >= daystart and fairyshoo > 0: pcs_horny = 90
  166. if min_arousal > pcs_horny: pcs_horny = min_arousal
  167. if Enable_lockhorny > 0 and pcs_horny < Enable_lockhorny - 1: pcs_horny = Enable_lockhorny - 1
  168. if pcs_horny < 0: pcs_horny = 0
  169. if pcs_health > healthmax: pcs_health = healthmax
  170. if pcs_willpwr > willpowermax: pcs_willpwr = willpowermax
  171. if pcs_stam > stammax: pcs_stam = stammax
  172. if pcs_mana > manamax: pcs_mana = manamax
  173. if pcs_mood > 100: pcs_mood = 100
  174. !!Add mood_trauma to events to lower max mood for a period of time
  175. if mood_trauma > 0:
  176. mood_max_calc = 100 - (mood_trauma * 5)
  177. mood_max = max(10, mood_max_calc)
  178. if pcs_mood > mood_max: pcs_mood = mood_max
  179. killvar 'mood_max_calc'
  180. elseif mood_trauma < 0:
  181. mood_trauma = 0
  182. end
  183. if hypnoAddict = 1 and pcs_horny < 30:
  184. pcs_horny = 30
  185. elseif hypnoAddict = 2 and pcs_horny < 50:
  186. pcs_horny = 50
  187. end
  188. if cumloc[0] = 1 or cumloc[3] = 1 or hypnoAddict = 0:
  189. killvar 'missCum'
  190. elseif missCum > timeTresh:
  191. if pcs_horny < 90: pcs_horny = 90
  192. if preziktype = 0: prezikcount = prezik
  193. if preziktype = 2: preziksabo = prezik
  194. prezik = 0
  195. preziktype = 1
  196. end
  197. !!!!!!!!!!!
  198. !!!TIME!!!
  199. !!!!!!!!!!!
  200. if nminut ! minut or nhour ! hour:
  201. ! Zero totminut will be at New Years Eve of 2015
  202. prevtotmin = totminut
  203. ! Years since 2015 in days
  204. totminut = (year - 2015) * 365
  205. ! Days this year
  206. if month > 1 : totminut += 31 & ! Jan
  207. if month > 2 : totminut += 28 & ! Feb
  208. if month > 3 : totminut += 31 & ! Mar
  209. if month > 4 : totminut += 30 & ! Apr
  210. if month > 5 : totminut += 31 & ! May
  211. if month > 6 : totminut += 30 & ! Jun
  212. if month > 7 : totminut += 31 & ! Jul
  213. if month > 8 : totminut += 31 & ! Aug
  214. if month > 9 : totminut += 30 & ! Sep
  215. if month > 10: totminut += 31 & ! Oct
  216. if month > 11: totminut += 30 & ! Nov
  217. if month > 12: totminut += 31 & ! Dec
  218. if month > 13: totminut += 31 & ! Jan rollover sanity check
  219. totminut += day
  220. ! Hours
  221. totminut = totminut * 24 + hour
  222. ! Minutes
  223. totminut = totminut * 60 + minut + sec / 60
  224. nminut = minut
  225. nhour = hour
  226. end
  227. ! Execute time based spells
  228. gs 'spellTimer', prevtotmin, totminut
  229. ! Determine Incoming Telephone Calls
  230. gs 'telefon', 'IncomingCheck', prevtotmin, totminut
  231. !! deodorant
  232. if deodorant_on = 1 and totminut > deodorant_time: gs 'sweat', 'remove_deo'
  233. !!painkiller
  234. if pain['killer'] > 0:
  235. if pain['killer'] = 1: pain_timer = totminut - 2
  236. pain['killer'] = totminut - pain_timer
  237. if pain['killer'] >= 243: pain['killer'] = 0
  238. end
  239. ! WD: 'daystart' Should start at 1
  240. if daystart = 0: daystart = 1
  241. !!Gaping of vagina recovery time
  242. if vgape > 0:
  243. if vgapetime = 0: vgapetime = totminut
  244. if (vgapetime + 60) <= totminut:vgape -= 1 & vgapetime = 0
  245. end
  246. !!Gaping of anus recovery time
  247. if agape > 0:
  248. if agapetime = 0: agapetime = totminut
  249. if (agapetime + 90) <= totminut:agape -= 1 & agapetime = 0
  250. end
  251. !!Recovery from spanking - will be superseded by pain system
  252. if spanked > 0:
  253. if spankedtime = 0: spankedtime = totminut
  254. if (spankedtime + 2040) <= totminut:spanked -= 1 & spankedtime = 0
  255. end
  256. !! Orgasmic cooldown
  257. if orgasmic ! 0:
  258. if orgasmic < totminut - 30: orgasmic = 0 & pcs_horny = 0
  259. end
  260. !!!!!!!!!!!!!!! Heels pain and skill gain
  261. !! This compares the player heels skill to the skill required to wear any heels the player
  262. !! currently wears. If the skill needed is greater than the player currently possesses,
  263. !! the pain in the feet increases and the player earns heels skill. If the skill required
  264. !! is lower, the player might still get experience, depending on how much greater the
  265. !! player skill is.
  266. !! Variables
  267. !! pcs_heels is the main heels skill
  268. !! heels_exp is used when the player gains experience using heels
  269. !! heels_deg is used when the player neglects their heels
  270. !! PShoHeels tracks the height of the heels currently worn
  271. !! heelsminut tracks when the heels skill was last changed
  272. !! heelsRequiredskill substitutes PShoHeels to allow comparison with pcs_heels
  273. !! heelsSkilldiff tracks difference between the players current and skill required by heels
  274. !! Required skill for various heel sizes
  275. !! 1 flats - 0
  276. !! 2 low heel - 5
  277. !! 3 Mid heel - 15
  278. !! 4 High heel - 25
  279. !! 5 ultra high heel - 40
  280. !! 6 fetish heel - 60
  281. !! Only run if at least X minutes have passed since last time
  282. if totminut >= heelsminut + 120:
  283. heelsminut = totminut
  284. !! Only check experience and pain gain and if the player wears heels, flats give nothing
  285. if PShoHeels > 1:
  286. if PShoHeels = 2:
  287. heelsRequiredskill = 5
  288. elseif PShoHeels = 3:
  289. heelsRequiredskill = 15
  290. elseif PShoHeels = 4:
  291. heelsRequiredskill = 25
  292. elseif PShoHeels = 5:
  293. heelsRequiredskill = 40
  294. elseif PShoHeels = 6:
  295. heelsRequiredskill = 60
  296. end
  297. !! stat is called a lot, there should be a limit to how much exp and pain you can accumulate...
  298. !! If the player skill is below the required skill, give heel_exp and apply ache
  299. if pcs_heels < heelsRequiredskill:
  300. heelsSkilldiff = heelsRequiredskill - pcs_heels
  301. if heelsSkilldiff <= 5:
  302. heels_exp += rand(3,6)
  303. if pain['feet'] < 40: gs 'pain', rand(0,1), 'feet', 'ache'
  304. elseif heelsSkilldiff <= 10:
  305. heels_exp += rand(5,9)
  306. if pain['feet'] < 50: gs 'pain', rand(0,2), 'feet', 'ache'
  307. elseif heelsSkilldiff <= 15:
  308. heels_exp += rand(7,12)
  309. if pain['feet'] < 60: gs 'pain', rand(1,3), 'feet', 'ache'
  310. elseif heelsSkilldiff <= 20:
  311. heels_exp += rand(9,15)
  312. if pain['feet'] < 70: gs 'pain', rand(2,4), 'feet', 'ache'
  313. elseif heelsSkilldiff > 20:
  314. heels_exp += rand(12,20)
  315. if pain['feet'] < 80: gs 'pain', rand(3,5), 'feet', 'ache'
  316. end
  317. !! Player skill is equal to or higher than the required skill
  318. !! Maybe have excessive skill result in no gain, or even a degrading skill?
  319. else
  320. heelsSkilldiff = pcs_heels - heelsRequiredskill
  321. if heelsSkilldiff <= 5:
  322. heels_exp += rand(3,6)
  323. elseif heelsSkilldiff <= 10:
  324. heels_exp += rand(2,4)
  325. elseif heelsSkilldiff <= 15:
  326. heels_exp += rand(1,2)
  327. elseif heelsSkilldiff <= 20:
  328. heels_exp += 0
  329. elseif heelsSkilldiff > 20:
  330. heels_deg -= rand(0,1)
  331. end
  332. end
  333. !! If not wearing heels, degrade heels skill
  334. else
  335. heels_deg -= rand(0,1)
  336. end
  337. end
  338. !!!!!!!!!!!!!!! End heels
  339. if sec >= 60:
  340. :loopsec
  341. minut += 1
  342. sec -= 60
  343. if sec >= 60:jump 'loopsec'
  344. end
  345. if minut >= 60:
  346. :loopmin
  347. hour += 1
  348. minut -= 60
  349. if SbrosNerdism = 1:pcs_nerd = pcs_sprt / 10 - orgasm
  350. if pcs_nerd < 0:pcs_nerd = 0
  351. if obkvsdam > 0:obkvsdam = rand(2, 5)
  352. if scpopt > 1: scpopt = 0
  353. if insleep = 1:
  354. if amphHigh > 0:
  355. pcs_energy -= (4 / amphetamineBonus + succublvl/2)
  356. pcs_hydra -= (8 / amphetamineBonus + succublvl/2)
  357. else
  358. pcs_energy -= (4 * amphetamineBonus + succublvl/2)
  359. pcs_hydra -= (8 * amphetamineBonus + succublvl/2)
  360. end
  361. pcs_stam += stammax / 10
  362. pcs_sleep -= 4
  363. if alko > 0: alko -= 1
  364. pcs_willpower_feeder += willpowermax*4
  365. pcs_willpwr += pcs_willpower_feeder/100
  366. pcs_willpower_feeder = pcs_willpower_feeder mod 100
  367. else
  368. if amphHigh > 0:
  369. pcs_energy -= (8 / amphetamineBonus + succublvl)
  370. pcs_hydra -= (16 / amphetamineBonus + succublvl)
  371. else
  372. pcs_energy -= (8 * amphetamineBonus + succublvl)
  373. pcs_hydra -= (16 * amphetamineBonus + succublvl)
  374. end
  375. pcs_stam += stammax / 20
  376. pcs_sleep -= 4
  377. pcs_willpower_feeder += willpowermax*4/3
  378. pcs_willpwr += pcs_willpower_feeder/100
  379. pcs_willpower_feeder = pcs_willpower_feeder mod 100
  380. end
  381. if pcs_willpwr > willpowermax: pcs_willpwr = willpowermax
  382. if pcs_willpwr < 25: will_degrade += 1
  383. if will_degrade >= 5: willpowermax -= 1 & will_degrade = 0
  384. if pcs_willpwr >= 50 and will_degrade > 0: will_degrade -= 1
  385. if pcs_stam > stammax: pcs_stam = stammax
  386. gs 'femcyc'
  387. if hypnoAddict > 0:dynamic $hypnoAddiction
  388. !!mana regen
  389. pcs_mana += manamax / 20
  390. if alko > 0 and alkoblock = 0:
  391. if alko >= 6:
  392. if pcs_run > 0: run_deg -= 1
  393. if vball_lvl >= 50: vball_deg -= 1
  394. if alko >= 10:
  395. if pcs_stren > 10: stren_deg -= 1
  396. if pcs_vital > 10: vital_deg -= 1
  397. if pcs_intel > 10: intel_deg -= 1
  398. alko -= rand (0,1)
  399. end
  400. end
  401. alko -= rand (0,1)
  402. elseif alko < 0:
  403. alko = 0
  404. end
  405. if shame > 0:shame -= 1 & pcs_mood -= 5
  406. if smoker >= 20 and NarkImmune = 0: smokerNeed += 1
  407. if smokerNeed > 10 and InSleep = 0 and pcs_mood > 20 and NarkImmune = 0: pcs_mood -= pcs_mood / 10
  408. if smokerNeed > 300:smokerNeed = 0 & smoker = 0
  409. if StrongNarkota > 0:pcs_mood -= (40 / StrongNarkota) & StrongNarkota -= 1
  410. if amphWithdrawl >= 5: amphWithdrawl += 1 & pcs_mood -= (amphWithdrawl / 5)
  411. if amphHigh > 0:
  412. if amphWithdrawl < 2: amphWithdrawl = 2
  413. amphetamineBonus = 3
  414. amphHigh -= 4
  415. pcs_mood += (2 * amphHigh)
  416. elseif amphHigh <= 0 and amphWithdrawl = 2:
  417. if amphIntake > 0:
  418. amphIntake -= 1
  419. else
  420. amphWithdrawl = 0
  421. end
  422. amphHigh = 0
  423. amphetamineBonus = 2
  424. pcs_mood -= pcs_mood / 10
  425. elseif amphIntake > 0:
  426. amphWithdrawl += 1
  427. elseif amphHigh = 0 and amphWithdrawl = 0:
  428. amphetamineBonus = 1
  429. end
  430. if amphWithdrawl > 169: amphWithdrawl = 1 & amphetamineBonus = 1 & amphCount = 0
  431. if SLomka > 0 and pcs_mood > 10:SLomka += 1 & pcs_mood -= pcs_mood / 10
  432. if SLomka > 100 and StrongNarkota <= 0:SLomka = 0 & SNarkTimes = 0
  433. if jointhigh > 0: jointhigh -= 1
  434. if narkoman = 1 and narkday ! daystart:
  435. pcs_health -= 5
  436. if pcs_mood > 40:
  437. pcs_mood -= 40
  438. else
  439. pcs_mood = 5
  440. end
  441. end
  442. if $pantyworntype = 'none' and PCloPants > 0 and PCloPanties = 0 and $clothingworntype ! 'nude' and trait['commando_lvl'] < 2:
  443. if trait['commando_lvl'] < 1:
  444. mosol += 2
  445. elseif trait['commando_lvl'] = 1:
  446. mosol += 1
  447. end
  448. if mosol >= 100: pcs_mood -= 5
  449. if mosol >= 60 and pain['pubic'] < 80: gs 'pain', 1, 'pubic', 'ache'
  450. end
  451. if pcs_energy > 100:
  452. fat += (pcs_energy - 100) / 4
  453. pcs_energy = 100
  454. elseif pcs_energy <= (10 + vitalbuf / 25) and fat > (2 + vitalbuf / 25):
  455. pcs_energy += 6
  456. fat -= 2
  457. end
  458. if pcs_hydra > 200: pcs_hydra = 200
  459. if mosol > 0:
  460. if $pantyworntype ! 'none' or $clothingworntype = 'nude' or PCloPanties = 1:mosol -= rand(0,1)
  461. end
  462. if pcs_lipbalm > 0:pcs_lipbalm -= 1
  463. if sickstage = 1:sick += 1 & sicktimer += 1
  464. if sickstage = 1 and sicktimer >= 80:sicktimer = 0 & sickstage = 2
  465. if sickstage = 2 and sick > 0:sick -= 1
  466. if sickstage = 2 and sick <= 0:sick = 0 & sickstage = 0
  467. if perkice > 0:perkice -= 1
  468. if frost > 0:frost -= 1
  469. if KGOLpers > 0:
  470. if KGHP < KGHPMAX:KGHP += 10
  471. if KGMana < KGManaMax:KGMana += 10
  472. end
  473. !! pain[0] = pain['total'] , pain[1] = pain['damage'] , pain[2] = pain['relief']
  474. i = arrsize('pain')
  475. :statpainloop
  476. if i > 0:
  477. i -= 1
  478. pain[i] -= rand(0,1)
  479. if pain[i] < 0: pain[i] = 0
  480. jump 'statpainloop'
  481. end
  482. !! Panty happiness gain
  483. if pcs_mood < 60 and $pantyworntype = 'kats': pcs_mood += 2
  484. if pcs_mood < 60 and $braworntype = 'kats': pcs_mood += 2
  485. !!Arousal adjustments
  486. if ($pantyworntype = 'exhibitionist' and $braworntype = 'exhibitionist') and pcs_horny < 25:
  487. pcs_horny += 10
  488. elseif pcs_horny < 10 and ($pantyworntype = 'exhibitionist' or $braworntype = 'exhibitionist'):
  489. pcs_horny += 5
  490. end
  491. if aphrodisiac_timer >= 1:
  492. if pcs_horny < 80:
  493. pcs_horny = 80
  494. else
  495. pcs_horny += 10
  496. end
  497. aphrodisiac_timer -= 1
  498. end
  499. if $pantyworntype ! 'none' and clit_size >= 25 and pcs_horny < 60:pcs_horny += 20
  500. if insleep = 0:
  501. gs 'sweat', 'add', rand(0,1)
  502. if temper >= 20: gs 'sweat', 'add', rand(0,1)
  503. end
  504. ! vovan edition, from 1.2.5
  505. if huntersAndreisex > 0: huntersAndreisex -= 1
  506. if huntersSergeisex > 0: huntersSergeisex -= 1
  507. if huntersIgorsex > 0: huntersIgorsex -= 1
  508. if huntslutsex > 0: huntslutsex -= 1
  509. if mira_go_blok > 0: mira_go_blok -= 1
  510. if mira_no_home > 0: mira_no_home -= 1
  511. gs 'traits', 'hourly'
  512. if (hour mod 2) = 0: gs 'outdoors', 'weather'
  513. if minut >= 60:jump 'loopmin'
  514. end
  515. if hour >= 24: gs 'cikl'
  516. if minut < 10:
  517. $nilmin = '0'
  518. else
  519. $nilmin = ''
  520. end
  521. if kid > 0:
  522. i = arrsize('yearkid')
  523. :LoopKidAgeCounter
  524. if i >= 0:
  525. if yearkid[i] = year + 1 and monthkid[i] = month and daykid[i] = day: msg'It is <<$kidname[i]>>''s birthday today.'
  526. i -= 1
  527. jump 'LoopKidAgeCounter'
  528. end
  529. end
  530. if pcs_nerd > 0:
  531. if lastreadday = daystart:
  532. !!<font color="green">You are completely healthy shine and a healthy glow.</font>
  533. pcs_mood = 100
  534. SbrosNerdism = 0
  535. $mudnerd = '<font color="green">You are lost in a fantasy after reading a book.</font>'
  536. end
  537. if lastreadday + 1 = daystart:
  538. SbrosNerdism = 0
  539. $mudnerd = '<font color="black">You are a little bored and want to plunge into a book.</font>'
  540. end
  541. if lastreadday + 2 = daystart:
  542. SbrosNerdism = 0
  543. if pcs_mood > 50:pcs_mood -= 10
  544. $mudnerd = '<font color="red">You really want to read something.</font>'
  545. end
  546. if lastreadday + 3 <= daystart:
  547. if pcs_mood > 10:pcs_mood -= 10
  548. SbrosNerdism = 1
  549. $mudnerd = '<font color="red"><b>You have an incredibly strong desire to read!!!</b></font>'
  550. end
  551. else
  552. SbrosNerdism = 0
  553. $mudnerd = ''
  554. end
  555. if bimbolevel > 0:
  556. if bimbowithdrawal = 0:
  557. $bimbostatus = '<font color = #FF1493>You''re, like, super hawt today.</font>'
  558. $bimbo_tooltip = 'You''re, like, super hawt today.'
  559. elseif bimbowithdrawal = 1:
  560. $bimbostatus = '<font color="green">You feel, like, kind of lame today.</font>'
  561. $bimbo_tooltip = 'You feel, like, kind of lame today.'
  562. elseif bimbowithdrawal < 4:
  563. $bimbostatus = '<font color="grey">You feel, like, totally lame today.</font>'
  564. $bimbo_tooltip = 'You feel, like, totally lame today.'
  565. elseif bimbowithdrawal < 6:
  566. if pcs_mood > 50: pcs_mood -= 10
  567. $bimbostatus = '<font color="red">You really feel, like, awful today.</font>'
  568. $bimbo_tooltip = 'You really feel, like, awful today.'
  569. elseif bimbowithdrawal >= 6:
  570. if pcs_mood > 10: pcs_mood -= 10
  571. $bimbostatus= '<font color="red"><b>You feel that, like, horrible today!</b></font>'
  572. $bimbo_tooltip = 'You feel that, like, horrible today!'
  573. end
  574. if bimbowithdrawal > 30:
  575. bimbowithdrawal = 0
  576. bimbo = 0
  577. bimbolevel = 0
  578. $stat_msg += '<BR>You suddenly feel as if your head is clear, instead of filled with pink thoughts.'
  579. end
  580. else
  581. bimbowithdrawal = 0
  582. $bimbostatus = ''
  583. end
  584. !
  585. ! WD: Triggers every 15 minutes if not sleeping
  586. ! Update to remove long iterations on loading saves from previous versions
  587. ! Do Nothing if sleeping, invalid Trig15Minute value or more than 6 hours 16 minute pass
  588. if InSleep ! 0 or Trig15Minute > totminut or (totminut - Trig15Minute) >= 376:
  589. set Trig15Minute = totminut
  590. ! More than 15 minutes since last check
  591. else
  592. if (totminut - Trig15Minute) >= 15:
  593. ! begin Loop
  594. :Trig15MinuteLoop
  595. ! Horny Actions
  596. if pcs_horny > 100:
  597. set Trig15Minute = totminut
  598. else
  599. set Trig15Minute += 15
  600. ! WD: Fix vibrator arousal to trigger every 15 minutes, moved from 'time' location
  601. if vibratorin = 1:pcs_horny += rand(1, 5)
  602. ! WD: Fixed Piecing arousal to trigger every 15 minutes, instead of once per day
  603. if pcs_horny < 70:
  604. hornystat = 0
  605. if pirsF > 0 and pirsF < 10000:hornystat += 1
  606. if pirsG > 0 and pirsG < 10000:hornystat += 1
  607. hornyStat = hornystat * 4
  608. if pirsA > 0 and pirsA < 10000:hornystat += 1
  609. if pirsB > 0 and pirsB < 10000:hornystat += 1
  610. if pirsC > 0 and pirsC < 10000:hornystat += 1
  611. if pirsD > 0 and pirsD < 10000:hornystat += 1
  612. if pirsE > 0 and pirsE < 10000:hornystat += 1
  613. if pirsN > 0 and pirsN < 10000:hornystat += 1
  614. set pcs_horny += hornyStat / 4 + rand(1,4) <= hornyStat mod 4 & ! Apply 1/4 of value on average
  615. end
  616. ! WD: Clothing
  617. if CloStyle = 4 and pcs_horny < 70:set pcs_horny += rand(0, 2)
  618. if (PCloSkirt > 5 or PCloPants > 5) and pcs_horny < 50:set pcs_horny += rand(0, 1)
  619. if PCloTopCut = 4 and pcs_horny < 50:set pcs_horny += rand(0, 1)
  620. end
  621. !!SECTION: Bimbo (15 minute interval update checks)
  622. if bimbolevel = 2:
  623. if pcs_mood < 100:pcs_mood += ((pcs_mood / 100) * (rand(0,1)))
  624. if pcs_horny < 25:pcs_horny = 25
  625. if pcs_horny < 100:pcs_horny += 1
  626. end
  627. if bimbolevel = 3:
  628. if (pcs_mood < 100):pcs_mood += ((pcs_mood / 100) * (rand(0,2)))
  629. if pcs_horny < 50:pcs_horny = 50
  630. if pcs_horny < 100:pcs_horny += 2
  631. end
  632. !!SECTION: Commando trait (15 minute interval update checks)
  633. if $clothingworntype ! 'nude':
  634. if $pantyworntype = 'none':
  635. !! Addition to trait exp/lvls
  636. if trait['commando_lvl'] = 0:
  637. if PCloSkirt > 0:
  638. trait['commando_exp'] += 2
  639. else
  640. trait['commando_exp'] += 1
  641. end
  642. if trait['commando_exp'] >= 1000:
  643. trait['commando_exp'] = 50
  644. trait['commando_lvl'] = 1
  645. msg'You have gained the Commando trait! You have become accustomed to the idea you don''t have to wear panties all the time and can now comfortably wear skirts without panties. Pants are still a little itchy though...'
  646. end
  647. elseif trait['commando_lvl'] = 1:
  648. trait['commando_exp'] += 2
  649. if trait['commando_exp'] >= 1000:
  650. trait['commando_exp'] = 50
  651. trait['commando_lvl'] = 2
  652. msg'You have gained the 2nd level of the Commando trait! You have become very comfortable without panties and the raw insides of your pants no longer irritate your pussy.'
  653. end
  654. elseif trait['commando_lvl'] = 2:
  655. mosol = 0
  656. trait['commando_exp'] += 2
  657. if trait['commando_exp'] >= 1000:
  658. trait['commando_exp'] = 500
  659. trait['commando_lvl'] = 3
  660. msg'You have gained the 3rd level of the Commando trait! You have become so accustomed to going commando that any kind of underwear over your hips just feels <i>wrong</i>. You suffer mood penalties while wearing panties.'
  661. end
  662. elseif trait['commando_lvl'] = 3:
  663. trait['commando_exp'] += 1
  664. end
  665. elseif trait['commando_lvl'] > 0:
  666. !!Reduction from exp/lvls
  667. if trait['commando_lvl'] = 3:
  668. trait['commando_exp'] -= 1
  669. pcs_mood -= 1
  670. if trait['commando_exp'] <= 0:
  671. trait['commando_exp'] = 500
  672. trait['commando_lvl'] = 2
  673. msg'You have lost the 3rd level of the Commando trait! You are now only comfortable not wearing panties and will not suffer irritation from wearing pants while going commando.'
  674. end
  675. else
  676. trait['commando_exp'] -= 1
  677. if trait['commando_exp'] <= -0:
  678. trait['commando_exp'] = 900
  679. trait['commando_lvl'] -= 1
  680. end
  681. end
  682. end
  683. end
  684. !! This is the Succubus non-direct injection (pun intented) sex to sexnutrition and the sexnutrition conversion handling
  685. if succubusflag = 1:
  686. if pcs_horny < 50: pcs_horny = 50
  687. if pcs_horny < 100: pcs_horny += succublvl
  688. if succhungry > 0:
  689. pcs_energy -= succhungry * succublvl
  690. pcs_hydra -= succhungry * succublvl
  691. pcs_sleep -= succhungry * succublvl
  692. end
  693. cumres_idx = arrpos('sparrloc',12)
  694. if cumres_idx >= 0 and sparrvol[cumres_idx] > 0:sexnutrition += 4 & gs 'cum_cleanup', 'cleanloc', 12
  695. cumres_idx = arrpos('sparrloc',0)
  696. if cumres_idx >= 0 and cumsumvag > 0:sexnutrition += cumsumvag * 4 & gs 'cum_cleanup', 'cleanloc', 0
  697. if cumres_idx >= 0 and cumsumass > 0:sexnutrition += cumsumass * 4 & gs 'cum_cleanup', 'cleanloc', 3
  698. if arrsize('sparrvol') > 0:
  699. suctempi = -1
  700. :SuccAbsorbLoop
  701. suctempi += 1
  702. if suctempi <= 1 or suctempi = 4 or suctempi >= 8:
  703. if suctempi = 12: jump 'SuccAbsorbLoop'
  704. suctemparr = arrpos('sparrloc',suctempi)
  705. if suctemparr >= 0 and sparrloc[suctemparr] = suctempi and sparrvol[suctemparr] > 0:
  706. sexnutrition += succublvl * 5
  707. cumsumbod -= sparrvol[suctemparr]
  708. succubxp += 2
  709. sucabscum = 1
  710. gs 'cum_cleanup', 'cleandeposit', suctemparr
  711. cumloc[suctempi] = 0
  712. spdirty = 0
  713. cumloc[1] = 0
  714. cumloc[2] = 0
  715. cumloc[4] = 0
  716. cumloc[5] = 0
  717. cumloc[6] = 0
  718. cumloc[7] = 0
  719. cumloc[11] = 0
  720. cumloc[14] = 0
  721. !! debug code $stat_msg += '<BR>Absorb ext <<sexnutrition>>'
  722. end
  723. end
  724. if suctempi < 17:jump 'SuccAbsorbLoop'
  725. end
  726. if suclezsex < lesbian:
  727. sexnutrition += succublvl * 20
  728. suclezsex = lesbian
  729. succubxp += 3
  730. sucabslez = 1
  731. end
  732. if sexnutrition > 0:
  733. if sucskill >= 3 and succublvl >= 2: sexnutrition += (sexnutrition * 2) / 10
  734. if sucabslez = 1 and sucabscum = 1:
  735. $sucabs1 = 'absorbed energy from the woman you had sex with'
  736. $sucabs2 = ' and you '
  737. $sucabs3 = 'absorb the semen in your body'
  738. elseif sucabscum = 1:
  739. $sucabs3 = 'absorb the semen in your body'
  740. elseif sucabslez = 1:
  741. $sucabs1 = 'absorbed energy from the woman you had sex with'
  742. else
  743. !!Debug code
  744. $stat_msg += '<BR>SOMETHING HAPPENED!'
  745. end
  746. $stat_msg += '<BR>You <<$sucabs1>><<$sucabs2>><<$sucabs3>>, gaining nourishment.'
  747. sucabslez = 0 & sucabscum = 0
  748. $sucabs1 = '' & $sucabs2 = '' & $sucabs3 = ''
  749. if (pcs_mood < 100): pcs_mood += ((pcs_mood / 100) * 5)
  750. if pcs_energy > 100: entemp = (pcs_energy - 100)
  751. if sucexcess < 0 and sexnutrition > 20 and pcs_energy > 30:
  752. if sexnutrition - 20 >= (0 - sucexcess) * 2:
  753. sexnutrition += sucexcess * 2
  754. sucexcess = 0
  755. else
  756. sucexcess += (sexnutrition - 20) / 2
  757. sexnutrition = 20
  758. end
  759. end
  760. pcs_energy += sexnutrition / 2
  761. pcs_hydra += sexnutrition
  762. pcs_sleep += sexnutrition / 20
  763. if succhungry > 0: succhungry = 0
  764. sexnutrition = 0
  765. if pcs_energy > 100: sucexcess += (pcs_energy - entemp - 100) & pcs_energy = 100 + entemp & killvar 'entemp'
  766. end
  767. end
  768. !! safeguards to prevent bimbolevel from going above or below its intended limits
  769. if bimbolevel > 3: bimbolevel = 3
  770. if bimbolevel < 0: bimbolevel = 0
  771. ! do loop
  772. if (totminut - Trig15Minute) >= 15:jump 'Trig15MinuteLoop'
  773. end
  774. end
  775. !!!!!!!!!!!!!
  776. !!!ENERGY!!!
  777. !!!!!!!!!!!!!
  778. if succubusflag = 1:
  779. if pcs_energy < 0:
  780. if fat >= 1:
  781. if cheatNoFat = 0: fat -= 2
  782. pcs_energy += 8 + succublvl
  783. else
  784. pcs_energy += 8 + succublvl
  785. sucexcess -= (8 + succublvl) * (6 - succublvl)
  786. end
  787. end
  788. if pcs_health < 0:
  789. pcs_health = 10
  790. sucexcess -= 25 * (9 - succublvl)
  791. end
  792. if pcs_willpwr < 0:
  793. pcs_willpwr = 10
  794. sucexcess -= 20 * (9 - succublvl)
  795. sucpowzeroed = 4
  796. end
  797. end
  798. if pcs_sleep < 0:
  799. pcs_sleep = 0
  800. pcs_mood -= 5
  801. end
  802. if pcs_energy < 0:
  803. pcs_energy = 0
  804. pcs_health -= 5
  805. if salo = 0 and pcs_stren + pcs_vital > 0:
  806. stren_deg -= 1
  807. vital_deg -= 1
  808. pcs_energy += 8
  809. elseif salo = 0 and pcs_stren + pcs_vital <= 0:
  810. if Enable_nogameover = 0 :
  811. over = 3
  812. if $loc ! 'gameover': gt 'gameover'
  813. exit
  814. else
  815. $stat_msg += '<BR><font color=red><B>You starved to death, but Cheat Mode keeps you Alive.</B></font>'
  816. fat = 1
  817. end
  818. elseif salo > 0:
  819. if cheatNoFat = 0: fat -= 1
  820. pcs_energy += 8
  821. end
  822. end
  823. if pcs_hydra <= 0:
  824. pcs_hydra = 1
  825. pcs_health -= 5
  826. end
  827. !!Set hydra_check value
  828. hydra_check = pcs_hydra
  829. if pcs_mood <= 0:
  830. pcs_mood = 1
  831. pcs_health -= 5
  832. end
  833. if pcs_health < 0:
  834. if Enable_nogameover = 0 :
  835. over = 1
  836. if $loc ! 'gameover': gt 'gameover'
  837. exit & !nogameover by illume
  838. else
  839. $stat_msg += '<BR><font color=red><B>You died from injuries, but Cheat Mode keeps you Alive.</B></font>'
  840. pcs_health = 0
  841. end
  842. end
  843. if pcs_willpwr <= 0 :
  844. !this will set willpower to 0 correctly; then check mana =1 for insane-gameover(pcs_willpwr=0&mana=1).
  845. if pcs_mood <= 1:
  846. if Enable_nogameover = 0 :
  847. over = 2
  848. if $loc ! 'gameover': gt 'gameover'
  849. exit & !nogameover by illume
  850. else
  851. $stat_msg += '<BR><font color=red><B>You are insane, but Cheat Mode keeps you Alive.</B></font>'
  852. !pcs_mood already checked for >=1 in line 1113 if pcs_mood <= 0, no need to set another one
  853. end
  854. end
  855. pcs_willpwr = 0
  856. end
  857. !!cars-increase/depressed mood after orgasm/rape
  858. if rape > 0 and rape ! rape_count and orgasm = orgasm_count:
  859. pcs_mood = 10
  860. rape_count = rape
  861. elseif orgasm > 0 and orgasm ! orgasm_count:
  862. pcs_mood = 100
  863. orgasm_count = orgasm
  864. elseif rape > 0 and rape ! rape_count and orgasm > 0 and orgasm ! orgasm_count:
  865. pcs_mood = 100
  866. orgasm_count = orgasm
  867. rape_count = rape
  868. end
  869. !!Health, Willpower, Auto Birth Control pregnancy check
  870. gs 'body'
  871. if pcs_health >= healthmax:
  872. $pcs_health = '<font color="green">You are very healthy.</font>'
  873. elseif pcs_health >= healthmax * 75 / 100:
  874. $pcs_health = '<font color=#0064FF>You are healthy.</font>'
  875. elseif pcs_health >= healthmax * 50 / 100:
  876. $pcs_health = '<font color="brown">You are not healthy.</font>'
  877. elseif pcs_health >= healthmax * 25 / 100:
  878. $pcs_health = '<font color="red">You are sick.</font>'
  879. else
  880. $pcs_health = '<font color="red">You are on the verge of death.</font>'
  881. end
  882. if pcs_willpwr >= willpowermax:
  883. $pcs_willpwr = '<font color="green">You feel in charge of your actions.</font>'
  884. elseif pcs_willpwr >= willpowermax * 75 / 100:
  885. $pcs_willpwr = '<font color=#0064FF>You are mostly in control.</font>'
  886. elseif pcs_willpwr >= willpowermax * 50 / 100:
  887. $pcs_willpwr = '<font color="brown">You might have to make some concessions.</font>'
  888. elseif pcs_willpwr >= willpowermax * 25 / 100:
  889. $pcs_willpwr = '<font color="red">You will have to toe the line.</font>'
  890. else
  891. $pcs_willpwr = '<font color="red">You are completely at other people''s mercy.</font>'
  892. end
  893. !!stop auto birth control pill taking if the player believes they are pregnant or are pregnant
  894. if (thinkpreg = 1 or knowpreg = 1) and tabletkicheck = 1: tabletkicheck = 0
  895. !!Mood
  896. if cheatNoMood = 0:
  897. maxmood = 100 - moodmodifier
  898. if pcs_mood > 100:
  899. pcs_mood = 100
  900. elseif pcs_mood < 0:
  901. pcs_mood = 0
  902. !! Asylum: basically this means clinically insane, like court-ordered committed, saliva dripping, blubbering... Ordinarily irreversible at this stage meaning Game Over, but cheat can help
  903. end
  904. else
  905. pcs_mood = 100
  906. mood_trauma = 0
  907. end
  908. if pcs_mood >= 80:
  909. $pcs_mood = '<font color="green">You are in a great mood.</font>'
  910. elseif pcs_mood >= 60:
  911. $pcs_mood = '<font color=#0064FF>You are in a good mood.</font>'
  912. elseif pcs_mood >= 40:
  913. $pcs_mood = '<font color="brown">You are in an OK mood.</font>'
  914. elseif pcs_mood >= 20:
  915. $pcs_mood = '<font color="orange">You are in a bad mood.</font>'
  916. elseif pcs_mood >= 5:
  917. $pcs_mood = '<font color="red">You are in a terrible mood.</font>'
  918. else
  919. $pcs_mood = '<font color="red">You are really depressed and need to improve your mood.</font>'
  920. end
  921. if pcs_energy >= 80:
  922. $pcs_energy = '<font color="green">You couldn''t eat one more bite.</font>'
  923. elseif pcs_energy >= 40:
  924. $pcs_energy = '<font color=#0064FF>You''re not really hungry, but a small snack would be very welcome.</font>'
  925. elseif pcs_energy >= 8:
  926. $pcs_energy = '<font color="brown">You are hungry.</font>'
  927. else
  928. $pcs_energy = '<font color="red">You are very hungry.</font>'
  929. end
  930. if pcs_hydra >= 80:
  931. $pcs_hydra = '<font color="green">You are not thirsty at all.</font>'
  932. elseif pcs_hydra >= 40:
  933. $pcs_hydra = '<font color=#0064FF>You are slightly thirsty.</font>'
  934. elseif pcs_hydra >= 8:
  935. $pcs_hydra = '<font color="brown">You are thirsty.</font>'
  936. else
  937. $pcs_hydra = '<font color="red">You are very thirsty.</font>'
  938. end
  939. if pcs_sleep >= 80:
  940. $pcs_sleep = '<font color="green">You are well rested.</font>'
  941. elseif pcs_sleep >= 40:
  942. $pcs_sleep = '<font color=#0064FF>You are slightly tired.</font>'
  943. elseif pcs_sleep >= 8:
  944. $pcs_sleep = '<font color="brown">You are tired.</font>'
  945. else
  946. $pcs_sleep = '<font color="red">You are very tired.</font>'
  947. end
  948. if workFabrika = 1 and week => 1 and week <= 5 and hour > 8 and age => 16 and age < 18 and FabrikaProgulDay ! day or workFabrika = 1 and week => 1 and week <= 5 and hour > 16 and age > 18 and FabrikaProgulDay ! day:
  949. !!absence from work in a factory in Pavlovsk
  950. FabrikaProgul += 1
  951. FabrikaProgulDay = day
  952. end
  953. if hotelroom > 0:
  954. if hotelroom1day = daystart: $stat_msg += '<BR>You have 1 night left on your hotel booking.'
  955. if hotelroom1day < daystart and hour <= 11: $stat_msg += '<BR>Your hotel booking has expired, and you cannot return to your room after 11:00'
  956. if hotelroom1day < daystart and hour > 11: hotelroom = 0
  957. end
  958. if hour >= 8 and hour < 14 and week < 6 and StoryLine > 0 and SchoolAtestat = 0 and kanikuli = 0 and schoolProgulDay ! daystart:
  959. !!absence from school
  960. schoolprogul += 1
  961. schoolProgulDay = daystart
  962. end
  963. if cumcondslip <= 0: cumcondslip_deep = 0
  964. !!Sex stat update
  965. stat['mast'] += mastr & mastr = 0
  966. stat['hj'] += hj & hj = 0
  967. stat['bj'] += bj & bj = 0
  968. stat['vaginal'] += sex & sex = 0
  969. stat['anal'] += anal & anal = 0
  970. stat['cuni'] += kuni & kuni = 0
  971. stat['anal_strap_give'] += pegging & pegging = 0
  972. !!Pain calculation
  973. paintmp1 = func('shortgs','modul',pain['head'],pain['hair'],pain['ears'],pain['eyebrows'],pain['eyes'],pain['cheeks'],pain['nose'],pain['mouth'])
  974. paintmp2 = func('shortgs','modul',pain['tummy'],pain['pubic'],pain['vaginal'],pain['labia'],pain['clitoris'],pain['urethra'],pain['cervix'],pain['lips'])
  975. paintmp3 = func('shortgs','modul',pain['throat'],pain['asscheeks'],pain['asshole'],pain['hips'],pain['thighs'],pain['legL'],pain['legR'],pain['feet'])
  976. paintmp4 = func('shortgs','modul',pain['toes'],pain['shoulders'],pain['armL'],pain['armR'],pain['hands'],pain['fingers'],pain['chest'],pain['breasts'])
  977. paintmp5 = func('shortgs','modul',pain['tongue'],pain['neck'],pain['back'],pain['nipples'],pain['ribs'],vgape * 8, agape * 10,spanked * 24)
  978. pain['total'] = func('shortgs','modul',paintmp1,paintmp2,paintmp3,paintmp4,paintmp5)
  979. if pain['total'] > 100: pain['total'] = 100
  980. pain['damage'] = pain['total']
  981. pain['relief'] = 0
  982. if alko > 9:
  983. pain['relief'] = 70
  984. elseif alko > 6:
  985. pain['relief'] = 40
  986. elseif alko > 3:
  987. pain['relief'] = 15
  988. end
  989. if StrongNarkota > 0:
  990. pain['relief'] = 90
  991. elseif nark > 0:
  992. pain['relief'] = 60
  993. elseif pain['killer'] > 12 and alko <= 9:
  994. pain['relief'] = 50
  995. end
  996. if pain['relief'] ! 0:
  997. if (pain['total'] / pain['relief']) > 0:
  998. pain['total'] = pain['total'] / pain['relief']
  999. elseif pain['total'] > 0:
  1000. pain['total'] = 0
  1001. end
  1002. end
  1003. if pain['total'] > 80:
  1004. if (pcs_health * 5) >= healthmax: pcs_health = pcs_health * 20 / 100
  1005. if (pcs_mood * 5) >= 100: pcs_mood = pcs_mood * 20 / 100
  1006. elseif pain['total'] > 60:
  1007. if (pcs_health * 5 / 2) >= healthmax: pcs_health = pcs_health * 40 / 100
  1008. if (pcs_mood * 5 / 2) >= 100: pcs_mood = pcs_mood * 40 / 100
  1009. elseif pain['total'] > 40:
  1010. if (pcs_health * 5 / 3) >= healthmax: pcs_health = pcs_health * 60 / 100
  1011. if (pcs_mood * 5 / 3) >= 100: pcs_mood = pcs_mood * 60 / 100
  1012. elseif pain['total'] > 20:
  1013. if (pcs_health * 5 / 4) >= healthmax: pcs_health = pcs_health * 80 / 100
  1014. if (pcs_mood * 5 / 4) >= 100: pcs_mood = pcs_mood * 80 / 100
  1015. elseif pain['total'] > 0:
  1016. if (pcs_health * 10 / 9) >= healthmax: pcs_health = pcs_health * 90 / 100
  1017. if (pcs_mood * 10 / 9) >= 100: pcs_mood = pcs_mood * 90 / 100
  1018. end
  1019. !!--------------------------pain calculation end--------------------------------
  1020. !!update skills and attributes to pcs_ from there _lvl values plus adjustments based on condition
  1021. gs 'stat_sklattrib_lvlset'
  1022. !!Sleep variable cap
  1023. if pcs_sleep > 100: pcs_sleep = 100
  1024. if insleep = 0: gs 'stat_display'
  1025. gs 'family_schedule'
  1026. !!--------------------------Job Checks For Icons--------------------------------
  1027. if (acting['shoot_day'] = daystart and actress_cast = 1) or (audition['day'] = daystart):
  1028. acting['icon'] = 1
  1029. else
  1030. acting['icon'] = 0
  1031. end
  1032. if model_job_week < 2 and model['status'] = 1:
  1033. model['icon'] = 1
  1034. else
  1035. model['icon'] = 0
  1036. end
  1037. if pfilmday[0] > 0:
  1038. pornstar['icon'] = 1
  1039. else
  1040. pornstar['icon'] = 0
  1041. end
  1042. !!-------------------------School grades and other checks----------------------
  1043. !! Having this for just the mornings means it is not always correct.
  1044. gs '_difficulty','getmaxgrades'
  1045. if pcs_grades > max_grades: pcs_grades = max_grades
  1046. if pcs_grades < 0: pcs_grades = 0
  1047. --- stat ---------------------------------