stat.qsrc 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174
  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. !!Bimbo shoe check so bonus will be applied
  338. if PShoStyle = 2: bimbosh = 1
  339. if PShoStyle ! 2: bimbosh = 0
  340. end
  341. !!!!!!!!!!!!!!! End heels
  342. if sec >= 60:
  343. :loopsec
  344. minut += 1
  345. sec -= 60
  346. if sec >= 60:jump 'loopsec'
  347. end
  348. if minut >= 60:
  349. :loopmin
  350. hour += 1
  351. minut -= 60
  352. if SbrosNerdism = 1:pcs_nerd = pcs_sprt / 10 - orgasm
  353. if pcs_nerd < 0:pcs_nerd = 0
  354. if obkvsdam > 0:obkvsdam = rand(2, 5)
  355. if scpopt > 1: scpopt = 0
  356. if insleep = 1:
  357. if amphHigh > 0:
  358. pcs_energy -= (4 / amphetamineBonus + succublvl/2)
  359. pcs_hydra -= (8 / amphetamineBonus + succublvl/2)
  360. else
  361. pcs_energy -= (4 * amphetamineBonus + succublvl/2)
  362. pcs_hydra -= (8 * amphetamineBonus + succublvl/2)
  363. end
  364. pcs_stam += stammax / 10
  365. pcs_sleep -= 4
  366. if alko > 0: alko -= 1
  367. pcs_willpower_feeder += willpowermax*4
  368. pcs_willpwr += pcs_willpower_feeder/100
  369. pcs_willpower_feeder = pcs_willpower_feeder mod 100
  370. else
  371. if amphHigh > 0:
  372. pcs_energy -= (8 / amphetamineBonus + succublvl)
  373. pcs_hydra -= (16 / amphetamineBonus + succublvl)
  374. else
  375. pcs_energy -= (8 * amphetamineBonus + succublvl)
  376. pcs_hydra -= (16 * amphetamineBonus + succublvl)
  377. end
  378. pcs_stam += stammax / 20
  379. pcs_sleep -= 4
  380. pcs_willpower_feeder += willpowermax*4/3
  381. pcs_willpwr += pcs_willpower_feeder/100
  382. pcs_willpower_feeder = pcs_willpower_feeder mod 100
  383. end
  384. if pcs_willpwr > willpowermax: pcs_willpwr = willpowermax
  385. if pcs_willpwr < 25: will_degrade += 1
  386. if will_degrade >= 5: willpowermax -= 1 & will_degrade = 0
  387. if pcs_willpwr >= 50 and will_degrade > 0: will_degrade -= 1
  388. if pcs_stam > stammax: pcs_stam = stammax
  389. gs 'femcyc'
  390. if hypnoAddict > 0:dynamic $hypnoAddiction
  391. !!mana regen
  392. pcs_mana += manamax / 20
  393. if alko > 0 and alkoblock = 0:
  394. if alko >= 6:
  395. if pcs_run > 0: run_deg -= 1
  396. if vball_lvl >= 50: vball_deg -= 1
  397. if alko >= 10:
  398. if pcs_stren > 10: stren_deg -= 1
  399. if pcs_vital > 10: vital_deg -= 1
  400. if pcs_intel > 10: intel_deg -= 1
  401. alko -= rand (0,1)
  402. end
  403. end
  404. alko -= rand (0,1)
  405. elseif alko < 0:
  406. alko = 0
  407. end
  408. !!!!!!!!!!!!!
  409. !!!Avtoboy!!!
  410. !!!!!!!!!!!!!
  411. if hour >= 8 and hour <= 23 and NPCnum > 10 and insleep = 0:
  412. :markturnirotbort
  413. xf = 0
  414. :markturnirotbortt
  415. xf += 1
  416. turnirFighter[xf] = rand(2, NPCnum)
  417. if xf < 2:jump 'markturnirotbortt'
  418. if turnirFighter[1] = turnirFighter[2]:jump 'markturnirotbort'
  419. a = turnirFighter[1]
  420. i = turnirFighter[2]
  421. NoView = 1
  422. gs 'Autofight'
  423. end
  424. !!!!!!!!!!!!!
  425. if shame > 0:shame -= 1 & pcs_mood -= 5
  426. if smoker >= 20 and NarkImmune = 0: smokerNeed += 1
  427. if smokerNeed > 10 and InSleep = 0 and pcs_mood > 20 and NarkImmune = 0: pcs_mood -= pcs_mood / 10
  428. if smokerNeed > 300:smokerNeed = 0 & smoker = 0
  429. if StrongNarkota > 0:pcs_mood -= (40 / StrongNarkota) & StrongNarkota -= 1
  430. if amphWithdrawl >= 5: amphWithdrawl += 1 & pcs_mood -= (amphWithdrawl / 5)
  431. if amphHigh > 0:
  432. if amphWithdrawl < 2: amphWithdrawl = 2
  433. amphetamineBonus = 3
  434. amphHigh -= 4
  435. pcs_mood += (2 * amphHigh)
  436. elseif amphHigh <= 0 and amphWithdrawl = 2:
  437. if amphIntake > 0:
  438. amphIntake -= 1
  439. else
  440. amphWithdrawl = 0
  441. end
  442. amphHigh = 0
  443. amphetamineBonus = 2
  444. pcs_mood -= pcs_mood / 10
  445. elseif amphIntake > 0:
  446. amphWithdrawl += 1
  447. elseif amphHigh = 0 and amphWithdrawl = 0:
  448. amphetamineBonus = 1
  449. end
  450. if amphWithdrawl > 169: amphWithdrawl = 1 & amphetamineBonus = 1 & amphCount = 0
  451. if SLomka > 0 and pcs_mood > 10:SLomka += 1 & pcs_mood -= pcs_mood / 10
  452. if SLomka > 100 and StrongNarkota <= 0:SLomka = 0 & SNarkTimes = 0
  453. if jointhigh > 0: jointhigh -= 1
  454. if narkoman = 1 and narkday ! daystart:
  455. pcs_health -= 5
  456. if pcs_mood > 40:
  457. pcs_mood -= 40
  458. else
  459. pcs_mood = 5
  460. end
  461. end
  462. if $pantyworntype = 'none' and PCloPants > 0 and PCloPanties = 0 and $clothingworntype ! 'nude':mosol += 1
  463. if mosol >= 50: pcs_mood -= 5
  464. if mosol >= 30 and pain['pubic'] < 80: gs 'pain', 1, 'pubic', 'ache'
  465. if pcs_energy > 100:
  466. fat += (pcs_energy - 100) / 4
  467. pcs_energy = 100
  468. elseif pcs_energy <= (10 + vitalbuf / 25) and fat > (2 + vitalbuf / 25):
  469. pcs_energy += 6
  470. fat -= 2
  471. end
  472. if pcs_hydra > 200: pcs_hydra = 200
  473. if mosol > 0:
  474. if $pantyworntype ! 'none' or $clothingworntype = 'nude' or PCloPanties = 1:mosol -= rand(0,1)
  475. end
  476. if pcs_lipbalm > 0:pcs_lipbalm -= 1
  477. if sickstage = 1:sick += 1 & sicktimer += 1
  478. if sickstage = 1 and sicktimer >= 80:sicktimer = 0 & sickstage = 2
  479. if sickstage = 2 and sick > 0:sick -= 1
  480. if sickstage = 2 and sick <= 0:sick = 0 & sickstage = 0
  481. if perkice > 0:perkice -= 1
  482. if frost > 0:frost -= 1
  483. if KGOLpers > 0:
  484. if KGHP < KGHPMAX:KGHP += 10
  485. if KGMana < KGManaMax:KGMana += 10
  486. end
  487. !! pain[0] = pain['total'] , pain[1] = pain['damage'] , pain[2] = pain['relief']
  488. i = arrsize('pain')
  489. :statpainloop
  490. if i > 0:
  491. i -= 1
  492. pain[i] -= rand(0,1)
  493. if pain[i] < 0: pain[i] = 0
  494. jump 'statpainloop'
  495. end
  496. !! Panty happiness gain
  497. if pcs_mood < 60 and $pantyworntype = 'kats': pcs_mood += 2
  498. if pcs_mood < 60 and $braworntype = 'kats': pcs_mood += 2
  499. !!Arousal adjustments
  500. if ($pantyworntype = 'exhibitionist' and $braworntype = 'exhibitionist') and pcs_horny < 25:
  501. pcs_horny += 10
  502. elseif pcs_horny < 10 and ($pantyworntype = 'exhibitionist' or $braworntype = 'exhibitionist'):
  503. pcs_horny += 5
  504. end
  505. if aphrodisiac_timer >= 1:
  506. if pcs_horny < 80:
  507. pcs_horny = 80
  508. else
  509. pcs_horny += 10
  510. end
  511. aphrodisiac_timer -= 1
  512. end
  513. if $pantyworntype ! 'none' and clit_size >= 25 and pcs_horny < 60:pcs_horny += 20
  514. if insleep = 0:
  515. gs 'sweat', 'add', rand(0,1)
  516. if temper >= 20: gs 'sweat', 'add', rand(0,1)
  517. end
  518. ! vovan edition, from 1.2.5
  519. if huntersAndreisex > 0: huntersAndreisex -= 1
  520. if huntersSergeisex > 0: huntersSergeisex -= 1
  521. if huntersIgorsex > 0: huntersIgorsex -= 1
  522. if huntslutsex > 0: huntslutsex -= 1
  523. if mira_go_blok > 0: mira_go_blok -= 1
  524. if mira_no_home > 0: mira_no_home -= 1
  525. gs 'traits', 'hourly'
  526. if (hour mod 2) = 0: gs 'outdoors', 'weather'
  527. if minut >= 60:jump 'loopmin'
  528. end
  529. if hour >= 24: gs 'cikl'
  530. if minut < 10:
  531. $nilmin = '0'
  532. else
  533. $nilmin = ''
  534. end
  535. if kid > 0:
  536. i = arrsize('yearkid')
  537. :LoopKidAgeCounter
  538. if i >= 0:
  539. if yearkid[i] = year + 1 and monthkid[i] = month and daykid[i] = day: msg'It is <<$kidname[i]>>''s birthday today.'
  540. i -= 1
  541. jump 'LoopKidAgeCounter'
  542. end
  543. end
  544. if pcs_nerd > 0:
  545. if lastreadday = daystart:
  546. !!<font color="green">You are completely healthy shine and a healthy glow.</font>
  547. pcs_mood = 100
  548. SbrosNerdism = 0
  549. $mudnerd = '<font color="green">You are lost in a fantasy after reading a book.</font>'
  550. end
  551. if lastreadday + 1 = daystart:
  552. SbrosNerdism = 0
  553. $mudnerd = '<font color="black">You are a little bored and want to plunge into a book.</font>'
  554. end
  555. if lastreadday + 2 = daystart:
  556. SbrosNerdism = 0
  557. if pcs_mood > 50:pcs_mood -= 10
  558. $mudnerd = '<font color="red">You really want to read something.</font>'
  559. end
  560. if lastreadday + 3 <= daystart:
  561. if pcs_mood > 10:pcs_mood -= 10
  562. SbrosNerdism = 1
  563. $mudnerd = '<font color="red"><b>You have an incredibly strong desire to read!!!</b></font>'
  564. end
  565. else
  566. SbrosNerdism = 0
  567. $mudnerd = ''
  568. end
  569. if bimbolevel > 0:
  570. if bimbowithdrawal = 0:
  571. $bimbostatus = '<font color = #FF1493>You''re, like, super hawt today.</font>'
  572. $bimbo_tooltip = 'You''re, like, super hawt today.'
  573. elseif bimbowithdrawal = 1:
  574. $bimbostatus = '<font color="green">You feel, like, kind of lame today.</font>'
  575. $bimbo_tooltip = 'You feel, like, kind of lame today.'
  576. elseif bimbowithdrawal < 4:
  577. $bimbostatus = '<font color="grey">You feel, like, totally lame today.</font>'
  578. $bimbo_tooltip = 'You feel, like, totally lame today.'
  579. elseif bimbowithdrawal < 6:
  580. if pcs_mood > 50: pcs_mood -= 10
  581. $bimbostatus = '<font color="red">You really feel, like, awful today.</font>'
  582. $bimbo_tooltip = 'You really feel, like, awful today.'
  583. elseif bimbowithdrawal >= 6:
  584. if pcs_mood > 10: pcs_mood -= 10
  585. $bimbostatus= '<font color="red"><b>You feel that, like, horrible today!</b></font>'
  586. $bimbo_tooltip = 'You feel that, like, horrible today!'
  587. end
  588. if bimbowithdrawal > 30:
  589. bimbowithdrawal = 0
  590. bimbo = 0
  591. bimbolevel = 0
  592. $stat_msg += '<BR>You suddenly feel as if your head is clear, instead of filled with pink thoughts.'
  593. end
  594. else
  595. bimbowithdrawal = 0
  596. $bimbostatus = ''
  597. end
  598. !
  599. ! WD: Triggers every 15 minutes if not sleeping
  600. ! Update to remove long iterations on loading saves from previous versions
  601. ! Do Nothing if sleeping, invalid Trig15Minute value or more than 6 hours 16 minute pass
  602. if InSleep ! 0 or Trig15Minute > totminut or (totminut - Trig15Minute) >= 376:
  603. set Trig15Minute = totminut
  604. ! More than 15 minutes since last check
  605. else
  606. if (totminut - Trig15Minute) >= 15:
  607. ! begin Loop
  608. :Trig15MinuteLoop
  609. ! Horny Actions
  610. if pcs_horny > 100:
  611. set Trig15Minute = totminut
  612. else
  613. set Trig15Minute += 15
  614. ! WD: Fix vibrator arousal to trigger every 15 minutes, moved from 'time' location
  615. if vibratorin = 1:pcs_horny += rand(1, 5)
  616. ! WD: Fixed Piecing arousal to trigger every 15 minutes, instead of once per day
  617. if pcs_horny < 70:
  618. hornystat = 0
  619. if pirsF > 0 and pirsF < 10000:hornystat += 1
  620. if pirsG > 0 and pirsG < 10000:hornystat += 1
  621. hornyStat = hornystat * 4
  622. if pirsA > 0 and pirsA < 10000:hornystat += 1
  623. if pirsB > 0 and pirsB < 10000:hornystat += 1
  624. if pirsC > 0 and pirsC < 10000:hornystat += 1
  625. if pirsD > 0 and pirsD < 10000:hornystat += 1
  626. if pirsE > 0 and pirsE < 10000:hornystat += 1
  627. if pirsN > 0 and pirsN < 10000:hornystat += 1
  628. set pcs_horny += hornyStat / 4 + rand(1,4) <= hornyStat mod 4 & ! Apply 1/4 of value on average
  629. end
  630. ! WD: Clothing
  631. if CloStyle = 4 and pcs_horny < 70:set pcs_horny += rand(0, 2)
  632. if (PCloSkirt > 5 or PCloPants > 5) and pcs_horny < 50:set pcs_horny += rand(0, 1)
  633. if PCloTopCut = 4 and pcs_horny < 50:set pcs_horny += rand(0, 1)
  634. end
  635. !!SECTION: Bimbo (15 minute interval update checks)
  636. if bimbolevel = 2:
  637. if pcs_mood < 100:pcs_mood += ((pcs_mood / 100) * (rand(0,1)))
  638. if pcs_horny < 25:pcs_horny = 25
  639. if pcs_horny < 100:pcs_horny += 1
  640. end
  641. if bimbolevel = 3:
  642. if (pcs_mood < 100):pcs_mood += ((pcs_mood / 100) * (rand(0,2)))
  643. if pcs_horny < 50:pcs_horny = 50
  644. if pcs_horny < 100:pcs_horny += 2
  645. end
  646. !! This is the Succubus non-direct injection (pun intented) sex to sexnutrition and the sexnutrition conversion handling
  647. if succubusflag = 1:
  648. if pcs_horny < 50: pcs_horny = 50
  649. if pcs_horny < 100: pcs_horny += succublvl
  650. if succhungry > 0:
  651. pcs_energy -= succhungry * succublvl
  652. pcs_hydra -= succhungry * succublvl
  653. pcs_sleep -= succhungry * succublvl
  654. end
  655. cumres_idx = arrpos('sparrloc',12)
  656. if cumres_idx >= 0 and sparrvol[cumres_idx] > 0:sexnutrition += 4 & gs 'cum_cleanup', 'cleanloc', 12
  657. cumres_idx = arrpos('sparrloc',0)
  658. if cumres_idx >= 0 and cumsumvag > 0:sexnutrition += cumsumvag * 4 & gs 'cum_cleanup', 'cleanloc', 0
  659. if cumres_idx >= 0 and cumsumass > 0:sexnutrition += cumsumass * 4 & gs 'cum_cleanup', 'cleanloc', 3
  660. if arrsize('sparrvol') > 0:
  661. suctempi = -1
  662. :SuccAbsorbLoop
  663. suctempi += 1
  664. if suctempi <= 1 or suctempi = 4 or suctempi >= 8:
  665. if suctempi = 12: jump 'SuccAbsorbLoop'
  666. suctemparr = arrpos('sparrloc',suctempi)
  667. if suctemparr >= 0 and sparrloc[suctemparr] = suctempi and sparrvol[suctemparr] > 0:
  668. sexnutrition += succublvl * 5
  669. cumsumbod -= sparrvol[suctemparr]
  670. succubxp += 2
  671. sucabscum = 1
  672. gs 'cum_cleanup', 'cleandeposit', suctemparr
  673. cumloc[suctempi] = 0
  674. spdirty = 0
  675. cumloc[1] = 0
  676. cumloc[2] = 0
  677. cumloc[4] = 0
  678. cumloc[5] = 0
  679. cumloc[6] = 0
  680. cumloc[7] = 0
  681. cumloc[11] = 0
  682. cumloc[14] = 0
  683. !! debug code $stat_msg += '<BR>Absorb ext <<sexnutrition>>'
  684. end
  685. end
  686. if suctempi < 17:jump 'SuccAbsorbLoop'
  687. end
  688. if suclezsex < lesbian:
  689. sexnutrition += succublvl * 20
  690. suclezsex = lesbian
  691. succubxp += 3
  692. sucabslez = 1
  693. end
  694. if sexnutrition > 0:
  695. if sucskill >= 3 and succublvl >= 2: sexnutrition += (sexnutrition * 2) / 10
  696. if sucabslez = 1 and sucabscum = 1:
  697. $sucabs1 = 'absorbed energy from the woman you had sex with'
  698. $sucabs2 = ' and you '
  699. $sucabs3 = 'absorb the semen in your body'
  700. elseif sucabscum = 1:
  701. $sucabs3 = 'absorb the semen in your body'
  702. elseif sucabslez = 1:
  703. $sucabs1 = 'absorbed energy from the woman you had sex with'
  704. else
  705. !!Debug code
  706. $stat_msg += '<BR>SOMETHING HAPPENED!'
  707. end
  708. $stat_msg += '<BR>You <<$sucabs1>><<$sucabs2>><<$sucabs3>>, gaining nourishment.'
  709. sucabslez = 0 & sucabscum = 0
  710. $sucabs1 = '' & $sucabs2 = '' & $sucabs3 = ''
  711. if (pcs_mood < 100): pcs_mood += ((pcs_mood / 100) * 5)
  712. if pcs_energy > 100: entemp = (pcs_energy - 100)
  713. if sucexcess < 0 and sexnutrition > 20 and pcs_energy > 30:
  714. if sexnutrition - 20 >= (0 - sucexcess) * 2:
  715. sexnutrition += sucexcess * 2
  716. sucexcess = 0
  717. else
  718. sucexcess += (sexnutrition - 20) / 2
  719. sexnutrition = 20
  720. end
  721. end
  722. pcs_energy += sexnutrition / 2
  723. pcs_hydra += sexnutrition
  724. pcs_sleep += sexnutrition / 20
  725. if succhungry > 0: succhungry = 0
  726. sexnutrition = 0
  727. if pcs_energy > 100: sucexcess += (pcs_energy - entemp - 100) & pcs_energy = 100 + entemp & killvar 'entemp'
  728. end
  729. end
  730. !! safeguards to prevent bimbolevel from going above or below its intended limits
  731. if bimbolevel > 3: bimbolevel = 3
  732. if bimbolevel < 0: bimbolevel = 0
  733. ! do loop
  734. if (totminut - Trig15Minute) >= 15:jump 'Trig15MinuteLoop'
  735. end
  736. end
  737. !!!!!!!!!!!!!
  738. !!!ENERGY!!!
  739. !!!!!!!!!!!!!
  740. if succubusflag = 1:
  741. if pcs_energy < 0:
  742. if fat >= 1:
  743. if cheatNoFat = 0: fat -= 2
  744. pcs_energy += 8 + succublvl
  745. else
  746. pcs_energy += 8 + succublvl
  747. sucexcess -= (8 + succublvl) * (6 - succublvl)
  748. end
  749. end
  750. if pcs_health < 0:
  751. pcs_health = 10
  752. sucexcess -= 25 * (9 - succublvl)
  753. end
  754. if pcs_willpwr < 0:
  755. pcs_willpwr = 10
  756. sucexcess -= 20 * (9 - succublvl)
  757. sucpowzeroed = 4
  758. end
  759. end
  760. if pcs_sleep < 0:
  761. pcs_sleep = 0
  762. pcs_mood -= 5
  763. end
  764. if pcs_energy < 0:
  765. pcs_energy = 0
  766. pcs_health -= 5
  767. if salo = 0 and pcs_stren + pcs_vital > 0:
  768. stren_deg -= 1
  769. vital_deg -= 1
  770. pcs_energy += 8
  771. elseif salo = 0 and pcs_stren + pcs_vital <= 0:
  772. if Enable_nogameover = 0 :
  773. over = 3
  774. if $loc ! 'gameover': gt 'gameover'
  775. exit
  776. else
  777. $stat_msg += '<BR><font color=red><B>You starved to death, but Cheat Mode keeps you Alive.</B></font>'
  778. fat = 1
  779. end
  780. elseif salo > 0:
  781. if cheatNoFat = 0: fat -= 1
  782. pcs_energy += 8
  783. end
  784. end
  785. if pcs_hydra <= 0:
  786. pcs_hydra = 1
  787. pcs_health -= 5
  788. end
  789. !!Set hydra_check value
  790. hydra_check = pcs_hydra
  791. if pcs_mood <= 0:
  792. pcs_mood = 1
  793. pcs_health -= 5
  794. end
  795. if pcs_health < 0:
  796. if Enable_nogameover = 0 :
  797. over = 1
  798. if $loc ! 'gameover': gt 'gameover'
  799. exit & !nogameover by illume
  800. else
  801. $stat_msg += '<BR><font color=red><B>You died from injuries, but Cheat Mode keeps you Alive.</B></font>'
  802. pcs_health = 0
  803. end
  804. end
  805. if pcs_willpwr <= 0 :
  806. !this will set willpower to 0 correctly; then check mana =1 for insane-gameover(pcs_willpwr=0&mana=1).
  807. if pcs_mood <= 1:
  808. if Enable_nogameover = 0 :
  809. over = 2
  810. if $loc ! 'gameover': gt 'gameover'
  811. exit & !nogameover by illume
  812. else
  813. $stat_msg += '<BR><font color=red><B>You are insane, but Cheat Mode keeps you Alive.</B></font>'
  814. !pcs_mood already checked for >=1 in line 1113 if pcs_mood <= 0, no need to set another one
  815. end
  816. end
  817. pcs_willpwr = 0
  818. end
  819. !!cars-increase/depressed mood after orgasm/rape
  820. if rape > 0 and rape ! rape_count and orgasm = orgasm_count:
  821. pcs_mood = 10
  822. rape_count = rape
  823. elseif orgasm > 0 and orgasm ! orgasm_count:
  824. pcs_mood = 100
  825. orgasm_count = orgasm
  826. elseif rape > 0 and rape ! rape_count and orgasm > 0 and orgasm ! orgasm_count:
  827. pcs_mood = 100
  828. orgasm_count = orgasm
  829. rape_count = rape
  830. end
  831. !!Health, Willpower, Auto Birth Control pregnancy check
  832. gs 'body'
  833. if pcs_health >= healthmax:
  834. $pcs_health = '<font color="green">You are very healthy.</font>'
  835. elseif pcs_health >= healthmax * 75 / 100:
  836. $pcs_health = '<font color=#0064FF>You are healthy.</font>'
  837. elseif pcs_health >= healthmax * 50 / 100:
  838. $pcs_health = '<font color="brown">You are not healthy.</font>'
  839. elseif pcs_health >= healthmax * 25 / 100:
  840. $pcs_health = '<font color="red">You are sick.</font>'
  841. else
  842. $pcs_health = '<font color="red">You are on the verge of death.</font>'
  843. end
  844. if pcs_willpwr >= willpowermax:
  845. $pcs_willpwr = '<font color="green">You feel in charge of your actions.</font>'
  846. elseif pcs_willpwr >= willpowermax * 75 / 100:
  847. $pcs_willpwr = '<font color=#0064FF>You are mostly in control.</font>'
  848. elseif pcs_willpwr >= willpowermax * 50 / 100:
  849. $pcs_willpwr = '<font color="brown">You might have to make some concessions.</font>'
  850. elseif pcs_willpwr >= willpowermax * 25 / 100:
  851. $pcs_willpwr = '<font color="red">You will have to toe the line.</font>'
  852. else
  853. $pcs_willpwr = '<font color="red">You are completely at our people''s mercy.</font>'
  854. end
  855. !!stop auto birth control pill taking if the player believes they are pregnant or are pregnant
  856. if (thinkpreg = 1 or knowpreg = 1) and tabletkicheck = 1: tabletkicheck = 0
  857. !!Mood
  858. if cheatNoMood = 0:
  859. maxmood = 100 - moodmodifier
  860. if pcs_mood > 100:
  861. pcs_mood = 100
  862. elseif pcs_mood < 0:
  863. pcs_mood = 0
  864. !! 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
  865. end
  866. else
  867. pcs_mood = 100
  868. mood_trauma = 0
  869. end
  870. if pcs_mood >= 80:
  871. $pcs_mood = '<font color="green">You are in a great mood.</font>'
  872. elseif pcs_mood >= 60:
  873. $pcs_mood = '<font color=#0064FF>You are in a good mood.</font>'
  874. elseif pcs_mood >= 40:
  875. $pcs_mood = '<font color="brown">You are in an OK mood.</font>'
  876. elseif pcs_mood >= 20:
  877. $pcs_mood = '<font color="orange">You are in a bad mood.</font>'
  878. elseif pcs_mood >= 5:
  879. $pcs_mood = '<font color="red">You are in a terrible mood.</font>'
  880. else
  881. $pcs_mood = '<font color="red">You are really depressed and need to improve your mood.</font>'
  882. end
  883. if pcs_energy >= 80:
  884. $pcs_energy = '<font color="green">You couldn''t eat one more bite.</font>'
  885. elseif pcs_energy >= 40:
  886. $pcs_energy = '<font color=#0064FF>You''re not really hungry, but a small snack would be very welcome.</font>'
  887. elseif pcs_energy >= 8:
  888. $pcs_energy = '<font color="brown">You are hungry.</font>'
  889. else
  890. $pcs_energy = '<font color="red">You are very hungry.</font>'
  891. end
  892. if pcs_hydra >= 80:
  893. $pcs_hydra = '<font color="green">You are not thirsty at all.</font>'
  894. elseif pcs_hydra >= 40:
  895. $pcs_hydra = '<font color=#0064FF>You are slightly thirsty.</font>'
  896. elseif pcs_hydra >= 8:
  897. $pcs_hydra = '<font color="brown">You are thirsty.</font>'
  898. else
  899. $pcs_hydra = '<font color="red">You are very thirsty.</font>'
  900. end
  901. if pcs_sleep >= 80:
  902. $pcs_sleep = '<font color="green">You are well rested.</font>'
  903. elseif pcs_sleep >= 40:
  904. $pcs_sleep = '<font color=#0064FF>You are slightly tired.</font>'
  905. elseif pcs_sleep >= 8:
  906. $pcs_sleep = '<font color="brown">You are tired.</font>'
  907. else
  908. $pcs_sleep = '<font color="red">You are very tired.</font>'
  909. end
  910. 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:
  911. !!absence from work in a factory in Pavlovsk
  912. FabrikaProgul += 1
  913. FabrikaProgulDay = day
  914. end
  915. if hotelroom > 0:
  916. if hotelroom1day = daystart: $stat_msg += '<BR>You have 1 night left on your hotel booking.'
  917. if hotelroom1day < daystart and hour <= 11: $stat_msg += '<BR>Your hotel booking has expired and you cannot return to your room after 11:00'
  918. if hotelroom1day < daystart and hour > 11: hotelroom = 0
  919. end
  920. if hour >= 8 and hour < 14 and week < 6 and StoryLine > 0 and SchoolAtestat = 0 and kanikuli = 0 and schoolProgulDay ! daystart:
  921. !!absence from school
  922. schoolprogul += 1
  923. schoolProgulDay = daystart
  924. end
  925. if cumcondslip <= 0: cumcondslip_deep = 0
  926. !!Sex stat update
  927. stat['mast'] += mastr & mastr = 0
  928. stat['hj'] += hj & hj = 0
  929. stat['bj'] += bj & bj = 0
  930. stat['vaginal'] += sex & sex = 0
  931. stat['anal'] += anal & anal = 0
  932. stat['cuni'] += kuni & kuni = 0
  933. stat['anal_strap_give'] += pegging & pegging = 0
  934. !!Pain calculation
  935. paintmp1 = func('shortgs','modul',pain['head'],pain['hair'],pain['ears'],pain['eyebrows'],pain['eyes'],pain['cheeks'],pain['nose'],pain['mouth'])
  936. paintmp2 = func('shortgs','modul',pain['tummy'],pain['pubic'],pain['vaginal'],pain['labia'],pain['clitoris'],pain['urethra'],pain['cervix'],pain['lips'])
  937. paintmp3 = func('shortgs','modul',pain['throat'],pain['asscheeks'],pain['asshole'],pain['hips'],pain['thighs'],pain['legL'],pain['legR'],pain['feet'])
  938. paintmp4 = func('shortgs','modul',pain['toes'],pain['shoulders'],pain['armL'],pain['armR'],pain['hands'],pain['fingers'],pain['chest'],pain['breasts'])
  939. paintmp5 = func('shortgs','modul',pain['tongue'],pain['neck'],pain['back'],pain['nipples'],pain['ribs'],vgape * 8, agape * 10,spanked * 24)
  940. pain['total'] = func('shortgs','modul',paintmp1,paintmp2,paintmp3,paintmp4,paintmp5)
  941. if pain['total'] > 100: pain['total'] = 100
  942. pain['damage'] = pain['total']
  943. pain['relief'] = 0
  944. if alko > 9:
  945. pain['relief'] = 70
  946. elseif alko > 6:
  947. pain['relief'] = 40
  948. elseif alko > 3:
  949. pain['relief'] = 15
  950. end
  951. if StrongNarkota > 0:
  952. pain['relief'] = 90
  953. elseif nark > 0:
  954. pain['relief'] = 60
  955. elseif pain['killer'] > 12 and alko <= 9:
  956. pain['relief'] = 50
  957. end
  958. if pain['relief'] ! 0:
  959. if (pain['total'] / pain['relief']) > 0:
  960. pain['total'] = pain['total'] / pain['relief']
  961. elseif pain['total'] > 0:
  962. pain['total'] = 0
  963. end
  964. end
  965. if pain['total'] > 80:
  966. if (pcs_health * 5) >= healthmax: pcs_health = pcs_health * 20 / 100
  967. if (pcs_mood * 5) >= 100: pcs_mood = pcs_mood * 20 / 100
  968. elseif pain['total'] > 60:
  969. if (pcs_health * 5 / 2) >= healthmax: pcs_health = pcs_health * 40 / 100
  970. if (pcs_mood * 5 / 2) >= 100: pcs_mood = pcs_mood * 40 / 100
  971. elseif pain['total'] > 40:
  972. if (pcs_health * 5 / 3) >= healthmax: pcs_health = pcs_health * 60 / 100
  973. if (pcs_mood * 5 / 3) >= 100: pcs_mood = pcs_mood * 60 / 100
  974. elseif pain['total'] > 20:
  975. if (pcs_health * 5 / 4) >= healthmax: pcs_health = pcs_health * 80 / 100
  976. if (pcs_mood * 5 / 4) >= 100: pcs_mood = pcs_mood * 80 / 100
  977. elseif pain['total'] > 0:
  978. if (pcs_health * 10 / 9) >= healthmax: pcs_health = pcs_health * 90 / 100
  979. if (pcs_mood * 10 / 9) >= 100: pcs_mood = pcs_mood * 90 / 100
  980. end
  981. !!--------------------------pain calculation end--------------------------------
  982. !!update skills and attributes to pcs_ from there _lvl values plus adjustments based on condition
  983. gs 'stat_sklattrib_lvlset'
  984. !!Sleep variable cap
  985. if pcs_sleep > 100: pcs_sleep = 100
  986. if insleep = 0: gs 'stat_display'
  987. gs 'family_schedule'
  988. !!--------------------------Job Checks For Icons--------------------------------
  989. if (acting['shoot_day'] = daystart and actress_cast = 1) or (audition['day'] = daystart):
  990. acting['icon'] = 1
  991. else
  992. acting['icon'] = 0
  993. end
  994. if model_job_week < 2 and model['status'] = 1:
  995. model['icon'] = 1
  996. else
  997. model['icon'] = 0
  998. end
  999. if pfilmday[0] > 0:
  1000. pornstar['icon'] = 1
  1001. else
  1002. pornstar['icon'] = 0
  1003. end
  1004. !!-------------------------School grades and other checks----------------------
  1005. !! Having this for just the mornings means it is not always correct.
  1006. func('_difficulty','getmaxgrades')
  1007. if pcs_grades > max_grades: pcs_grades = max_grades
  1008. if pcs_grades < 0: pcs_grades = 0
  1009. --- stat ---------------------------------