stat.qsrc 40 KB

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