1
0

stat.qsrc 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131
  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 >= 75 and KatjaKnowBJ ! 1: KatjaKnowBJ = 1
  73. if pav_slut >= 125 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. if hypnoAddict = 1 and pcs_horny < 30:
  175. pcs_horny = 30
  176. elseif hypnoAddict = 2 and pcs_horny < 50:
  177. pcs_horny = 50
  178. end
  179. if cumloc[0] = 1 or cumloc[3] = 1 or hypnoAddict = 0:
  180. killvar 'missCum'
  181. elseif missCum > timeTresh:
  182. if pcs_horny < 90: pcs_horny = 90
  183. if preziktype = 0: prezikcount = prezik
  184. if preziktype = 2: preziksabo = prezik
  185. prezik = 0
  186. preziktype = 1
  187. end
  188. !!!!!!!!!!!
  189. !!!TIME!!!
  190. !!!!!!!!!!!
  191. if nminut ! minut or nhour ! hour:
  192. ! Zero totminut will be at New Years Eve of 2015
  193. prevtotmin = totminut
  194. ! Years since 2015 in days
  195. totminut = (year - 2015) * 365
  196. ! Days this year
  197. if month > 1 : totminut += 31 & ! Jan
  198. if month > 2 : totminut += 28 & ! Feb
  199. if month > 3 : totminut += 31 & ! Mar
  200. if month > 4 : totminut += 30 & ! Apr
  201. if month > 5 : totminut += 31 & ! May
  202. if month > 6 : totminut += 30 & ! Jun
  203. if month > 7 : totminut += 31 & ! Jul
  204. if month > 8 : totminut += 31 & ! Aug
  205. if month > 9 : totminut += 30 & ! Sep
  206. if month > 10: totminut += 31 & ! Oct
  207. if month > 11: totminut += 30 & ! Nov
  208. if month > 12: totminut += 31 & ! Dec
  209. if month > 13: totminut += 31 & ! Jan rollover sanity check
  210. totminut += day
  211. ! Hours
  212. totminut = totminut * 24 + hour
  213. ! Minutes
  214. totminut = totminut * 60 + minut + sec / 60
  215. nminut = minut
  216. nhour = hour
  217. end
  218. ! Execute time based spells
  219. gs 'spellTimer', prevtotmin, totminut
  220. ! Determine Incoming Telephone Calls
  221. gs 'telefon', 'IncomingCheck', prevtotmin, totminut
  222. !! deodorant
  223. if deodorant_on = 1 and totminut > deodorant_time: gs 'sweat', 'remove_deo'
  224. !!painkiller
  225. if pain['killer'] > 0:
  226. if pain['killer'] = 1: pain_timer = totminut - 2
  227. pain['killer'] = totminut - pain_timer
  228. if pain['killer'] >= 243: pain['killer'] = 0
  229. end
  230. ! WD: 'daystart' Should start at 1
  231. if daystart = 0: daystart = 1
  232. !!Gaping of vagina recovery time
  233. if vgape > 0:
  234. if vgapetime = 0: vgapetime = totminut
  235. if (vgapetime + 60) <= totminut:vgape -= 1 & vgapetime = 0
  236. end
  237. !!Gaping of anus recovery time
  238. if agape > 0:
  239. if agapetime = 0: agapetime = totminut
  240. if (agapetime + 90) <= totminut:agape -= 1 & agapetime = 0
  241. end
  242. !!Recovery from spanking - will be superseded by pain system
  243. if spanked > 0:
  244. if spankedtime = 0: spankedtime = totminut
  245. if (spankedtime + 2040) <= totminut:spanked -= 1 & spankedtime = 0
  246. end
  247. !! Orgasmic cooldown
  248. if orgasmic ! 0:
  249. if orgasmic < totminut - 30: orgasmic = 0 & pcs_horny = 0
  250. end
  251. !!!!!!!!!!!!!!! Heels pain and skill gain
  252. !! This compares the player heels skill to the skill required to wear any heels the player
  253. !! currently wears. If the skill needed is greater than the player currently possesses,
  254. !! the pain in the feet increases and the player earns heels skill. If the skill required
  255. !! is lower, the player might still get experience, depending on how much greater the
  256. !! player skill is.
  257. !! Variables
  258. !! pcs_heels is the main heels skill
  259. !! heels_exp is used when the player gains experience using heels
  260. !! heels_deg is used when the player neglects their heels
  261. !! PShoHeels tracks the height of the heels currently worn
  262. !! heelsminut tracks when the heels skill was last changed
  263. !! heelsRequiredskill substitutes PShoHeels to allow comparison with pcs_heels
  264. !! heelsSkilldiff tracks difference between the players current and skill required by heels
  265. !! Required skill for various heel sizes
  266. !! 1 flats - 0
  267. !! 2 low heel - 5
  268. !! 3 Mid heel - 15
  269. !! 4 High heel - 25
  270. !! 5 ultra high heel - 40
  271. !! 6 fetish heel - 60
  272. !! Only run if at least X minutes have passed since last time
  273. if totminut >= heelsminut + 120:
  274. heelsminut = totminut
  275. !! Only check experience and pain gain and if the player wears heels, flats give nothing
  276. if PShoHeels > 1:
  277. if PShoHeels = 2:
  278. heelsRequiredskill = 5
  279. elseif PShoHeels = 3:
  280. heelsRequiredskill = 15
  281. elseif PShoHeels = 4:
  282. heelsRequiredskill = 25
  283. elseif PShoHeels = 5:
  284. heelsRequiredskill = 40
  285. elseif PShoHeels = 6:
  286. heelsRequiredskill = 60
  287. end
  288. !! stat is called a lot, there should be a limit to how much exp and pain you can accumulate...
  289. !! If the player skill is below the required skill, give heel_exp and apply ache
  290. if pcs_heels < heelsRequiredskill:
  291. heelsSkilldiff = heelsRequiredskill - pcs_heels
  292. if heelsSkilldiff <= 5:
  293. heels_exp += rand(3,6)
  294. if pain['feet'] < 40: gs 'pain', rand(0,1), 'feet', 'ache'
  295. elseif heelsSkilldiff <= 10:
  296. heels_exp += rand(5,9)
  297. if pain['feet'] < 50: gs 'pain', rand(0,2), 'feet', 'ache'
  298. elseif heelsSkilldiff <= 15:
  299. heels_exp += rand(7,12)
  300. if pain['feet'] < 60: gs 'pain', rand(1,3), 'feet', 'ache'
  301. elseif heelsSkilldiff <= 20:
  302. heels_exp += rand(9,15)
  303. if pain['feet'] < 70: gs 'pain', rand(2,4), 'feet', 'ache'
  304. elseif heelsSkilldiff > 20:
  305. heels_exp += rand(12,20)
  306. if pain['feet'] < 80: gs 'pain', rand(3,5), 'feet', 'ache'
  307. end
  308. !! Player skill is equal to or higher than the required skill
  309. !! Maybe have excessive skill result in no gain, or even a degrading skill?
  310. else
  311. heelsSkilldiff = pcs_heels - heelsRequiredskill
  312. if heelsSkilldiff <= 5:
  313. heels_exp += rand(3,6)
  314. elseif heelsSkilldiff <= 10:
  315. heels_exp += rand(2,4)
  316. elseif heelsSkilldiff <= 15:
  317. heels_exp += rand(1,2)
  318. elseif heelsSkilldiff <= 20:
  319. heels_exp += 0
  320. elseif heelsSkilldiff > 20:
  321. heels_deg -= rand(0,1)
  322. end
  323. end
  324. !! If not wearing heels, degrade heels skill
  325. else
  326. heels_deg -= rand(0,1)
  327. end
  328. !!Bimbo shoe check so bonus will be applied
  329. if PShoStyle = 2: bimbosh = 1
  330. if PShoStyle ! 2: bimbosh = 0
  331. end
  332. !!!!!!!!!!!!!!! End heels
  333. if sec >= 60:
  334. :loopsec
  335. minut += 1
  336. sec -= 60
  337. if sec >= 60:jump 'loopsec'
  338. end
  339. if minut >= 60:
  340. :loopmin
  341. hour += 1
  342. minut -= 60
  343. if SbrosNerdism = 1:pcs_nerd = pcs_sprt / 10 - orgasm
  344. if pcs_nerd < 0:pcs_nerd = 0
  345. if obkvsdam > 0:obkvsdam = rand(2, 5)
  346. if scpopt > 1: scpopt = 0
  347. if insleep = 1:
  348. if amphHigh > 0:
  349. pcs_energy -= (4 / amphetamineBonus + succublvl/2)
  350. pcs_hydra -= (8 / amphetamineBonus + succublvl/2)
  351. else
  352. pcs_energy -= (4 * amphetamineBonus + succublvl/2)
  353. pcs_hydra -= (8 * amphetamineBonus + succublvl/2)
  354. end
  355. pcs_stam += stammax / 10
  356. pcs_sleep -= 4
  357. if alko > 0: alko -= 1
  358. pcs_willpower_feeder += willpowermax*4
  359. pcs_willpwr += pcs_willpower_feeder/100
  360. pcs_willpower_feeder = pcs_willpower_feeder mod 100
  361. else
  362. if amphHigh > 0:
  363. pcs_energy -= (8 / amphetamineBonus + succublvl)
  364. pcs_hydra -= (16 / amphetamineBonus + succublvl)
  365. else
  366. pcs_energy -= (8 * amphetamineBonus + succublvl)
  367. pcs_hydra -= (16 * amphetamineBonus + succublvl)
  368. end
  369. pcs_stam += stammax / 20
  370. pcs_sleep -= 4
  371. pcs_willpower_feeder += willpowermax*4/3
  372. pcs_willpwr += pcs_willpower_feeder/100
  373. pcs_willpower_feeder = pcs_willpower_feeder mod 100
  374. end
  375. if pcs_willpwr > willpowermax: pcs_willpwr = willpowermax
  376. if pcs_willpwr < 20: will_degrade += 1
  377. if will_degrade >= 20: willpowermax -= 1 & will_degrade = 0
  378. if pcs_stam > stammax: pcs_stam = stammax
  379. gs 'femcyc'
  380. if hypnoAddict > 0:dynamic $hypnoAddiction
  381. !!mana regen
  382. pcs_mana += manamax / 20
  383. if alko > 0 and alkoblock = 0:
  384. if alko >= 6:
  385. if pcs_run > 0: run_deg -= 1
  386. if vball_lvl >= 50: vball_deg -= 1
  387. if alko >= 10:
  388. if pcs_stren > 10: stren_deg -= 1
  389. if pcs_vital > 10: vital_deg -= 1
  390. if pcs_intel > 10: intel_deg -= 1
  391. alko -= rand (0,1)
  392. end
  393. end
  394. alko -= rand (0,1)
  395. elseif alko < 0:
  396. alko = 0
  397. end
  398. !!!!!!!!!!!!!
  399. !!!Avtoboy!!!
  400. !!!!!!!!!!!!!
  401. if hour >= 8 and hour <= 23 and NPCnum > 10 and insleep = 0:
  402. :markturnirotbort
  403. xf = 0
  404. :markturnirotbortt
  405. xf += 1
  406. turnirFighter[xf] = rand(2, NPCnum)
  407. if xf < 2:jump 'markturnirotbortt'
  408. if turnirFighter[1] = turnirFighter[2]:jump 'markturnirotbort'
  409. a = turnirFighter[1]
  410. i = turnirFighter[2]
  411. NoView = 1
  412. gs 'Autofight'
  413. end
  414. !!!!!!!!!!!!!
  415. if shame > 0:shame -= 1 & pcs_mood -= 5
  416. if smoker >= 20 and NarkImmune = 0: smokerNeed += 1
  417. if smokerNeed > 10 and InSleep = 0 and pcs_mood > 20 and NarkImmune = 0: pcs_mood -= pcs_mood / 10
  418. if smokerNeed > 300:smokerNeed = 0 & smoker = 0
  419. if StrongNarkota > 0:pcs_mood -= (40 / StrongNarkota) & StrongNarkota -= 1
  420. if amphWithdrawl >= 5: amphWithdrawl += 1 & pcs_mood -= (amphWithdrawl / 5)
  421. if amphHigh > 0:
  422. if amphWithdrawl < 2: amphWithdrawl = 2
  423. amphetamineBonus = 3
  424. amphHigh -= 4
  425. pcs_mood += (2 * amphHigh)
  426. elseif amphHigh <= 0 and amphWithdrawl = 2:
  427. if amphIntake > 0:
  428. amphIntake -= 1
  429. else
  430. amphWithdrawl = 0
  431. end
  432. amphHigh = 0
  433. amphetamineBonus = 2
  434. pcs_mood -= pcs_mood / 10
  435. elseif amphIntake > 0:
  436. amphWithdrawl += 1
  437. elseif amphHigh = 0 and amphWithdrawl = 0:
  438. amphetamineBonus = 1
  439. end
  440. if amphWithdrawl > 169: amphWithdrawl = 1 & amphetamineBonus = 1 & amphCount = 0
  441. if SLomka > 0 and pcs_mood > 10:SLomka += 1 & pcs_mood -= pcs_mood / 10
  442. if SLomka > 100 and StrongNarkota <= 0:SLomka = 0 & SNarkTimes = 0
  443. if jointhigh > 0: jointhigh -= 1
  444. if narkoman = 1 and narkday ! daystart:
  445. pcs_health -= 5
  446. if pcs_mood > 40:
  447. pcs_mood -= 40
  448. else
  449. pcs_mood = 5
  450. end
  451. end
  452. if $pantyworntype = 'none' and PCloPants > 0 and PCloPanties = 0 and $clothingworntype ! 'nude':mosol += 1
  453. if mosol >= 50: pcs_mood -= 5
  454. if mosol >= 30 and pain['pubic'] < 80: gs 'pain', 1, 'pubic', 'ache'
  455. if pcs_energy > 100:
  456. fat += (pcs_energy - 100) / 4
  457. pcs_energy = 100
  458. elseif pcs_energy <= (10 + vitalbuf / 25) and fat > (2 + vitalbuf / 25):
  459. pcs_energy += 6
  460. fat -= 2
  461. end
  462. if pcs_hydra > 200: pcs_hydra = 200
  463. if mosol > 0:
  464. if $pantyworntype ! 'none' or $clothingworntype = 'nude' or PCloPanties = 1:mosol -= rand(0,1)
  465. end
  466. if pcs_lipbalm > 0:pcs_lipbalm -= 1
  467. if sickstage = 1:sick += 1 & sicktimer += 1
  468. if sickstage = 1 and sicktimer >= 80:sicktimer = 0 & sickstage = 2
  469. if sickstage = 2 and sick > 0:sick -= 1
  470. if sickstage = 2 and sick <= 0:sick = 0 & sickstage = 0
  471. if perkice > 0:perkice -= 1
  472. if frost > 0:frost -= 1
  473. if KGOLpers > 0:
  474. if KGHP < KGHPMAX:KGHP += 10
  475. if KGMana < KGManaMax:KGMana += 10
  476. end
  477. !! pain[0] = pain['total'] , pain[1] = pain['damage'] , pain[2] = pain['relief']
  478. i = arrsize('pain')
  479. :statpainloop
  480. if i > 0:
  481. i -= 1
  482. pain[i] -= rand(0,1)
  483. if pain[i] < 0: pain[i] = 0
  484. jump 'statpainloop'
  485. end
  486. !! Panty happiness gain
  487. if pcs_mood < 60 and $pantyworntype = 'kats': pcs_mood += 2
  488. if pcs_mood < 60 and $braworntype = 'kats': pcs_mood += 2
  489. !!Arousal adjustments
  490. if ($pantyworntype = 'exhibitionist' and $braworntype = 'exhibitionist') and pcs_horny < 25:
  491. pcs_horny += 10
  492. elseif pcs_horny < 10 and ($pantyworntype = 'exhibitionist' or $braworntype = 'exhibitionist'):
  493. pcs_horny += 5
  494. end
  495. if aphrodisiac_timer >= 1:
  496. if pcs_horny < 80:
  497. pcs_horny = 80
  498. else
  499. pcs_horny += 10
  500. end
  501. aphrodisiac_timer -= 1
  502. end
  503. if $pantyworntype ! 'none' and clit_size >= 25 and pcs_horny < 60:pcs_horny += 20
  504. if insleep = 0:
  505. gs 'sweat', 'add', rand(0,1)
  506. if temper >= 20: gs 'sweat', 'add', rand(0,1)
  507. end
  508. ! vovan edition, from 1.2.5
  509. if huntersAndreisex > 0: huntersAndreisex -= 1
  510. if huntersSergeisex > 0: huntersSergeisex -= 1
  511. if huntersIgorsex > 0: huntersIgorsex -= 1
  512. if huntslutsex > 0: huntslutsex -= 1
  513. if mira_go_blok > 0: mira_go_blok -= 1
  514. if mira_no_home > 0: mira_no_home -= 1
  515. gs 'traits', 'hourly'
  516. if (hour mod 2) = 0: gs 'outdoors', 'weather'
  517. if minut >= 60:jump 'loopmin'
  518. end
  519. if hour >= 24: gs 'cikl'
  520. if minut < 10:
  521. $nilmin = '0'
  522. else
  523. $nilmin = ''
  524. end
  525. if kid > 0:
  526. i = arrsize('yearkid')
  527. :LoopKidAgeCounter
  528. if i >= 0:
  529. if yearkid[i] = year + 1 and monthkid[i] = month and daykid[i] = day: msg'It is <<$kidname[i]>>''s birthday today.'
  530. i -= 1
  531. jump 'LoopKidAgeCounter'
  532. end
  533. end
  534. if pcs_nerd > 0:
  535. if lastreadday = daystart:
  536. !!<font color="green">You are completely healthy shine and a healthy glow.</font>
  537. pcs_mood = 100
  538. SbrosNerdism = 0
  539. $mudnerd = '<font color="green">You are lost in a fantasy after reading a book.</font>'
  540. end
  541. if lastreadday + 1 = daystart:
  542. SbrosNerdism = 0
  543. $mudnerd = '<font color="black">You are a little bored and want to plunge into a book.</font>'
  544. end
  545. if lastreadday + 2 = daystart:
  546. SbrosNerdism = 0
  547. if pcs_mood > 50:pcs_mood -= 10
  548. $mudnerd = '<font color="red">You really want to read something.</font>'
  549. end
  550. if lastreadday + 3 <= daystart:
  551. if pcs_mood > 10:pcs_mood -= 10
  552. SbrosNerdism = 1
  553. $mudnerd = '<font color="red"><b>You have an incredibly strong desire to read!!!</b></font>'
  554. end
  555. else
  556. SbrosNerdism = 0
  557. $mudnerd = ''
  558. end
  559. if bimbolevel > 0:
  560. if bimbowithdrawal = 0:
  561. $bimbostatus = '<font color = #FF1493>You''re, like, super hawt today.</font>'
  562. $bimbo_tooltip = 'You''re, like, super hawt today.'
  563. elseif bimbowithdrawal = 1:
  564. $bimbostatus = '<font color="green">You feel, like, kind of lame today.</font>'
  565. $bimbo_tooltip = 'You feel, like, kind of lame today.'
  566. elseif bimbowithdrawal < 4:
  567. $bimbostatus = '<font color="grey">You feel, like, totally lame today.</font>'
  568. $bimbo_tooltip = 'You feel, like, totally lame today.'
  569. elseif bimbowithdrawal < 6:
  570. if pcs_mood > 50: pcs_mood -= 10
  571. $bimbostatus = '<font color="red">You really feel, like, awful today.</font>'
  572. $bimbo_tooltip = 'You really feel, like, awful today.'
  573. elseif bimbowithdrawal >= 6:
  574. if pcs_mood > 10: pcs_mood -= 10
  575. $bimbostatus= '<font color="red"><b>You feel that, like, horrible today!</b></font>'
  576. $bimbo_tooltip = 'You feel that, like, horrible today!'
  577. end
  578. if bimbowithdrawal > 30:
  579. bimbowithdrawal = 0
  580. bimbo = 0
  581. bimbolevel = 0
  582. $stat_msg += '<BR>You suddenly feel as if your head is clear, instead of filled with pink thoughts.'
  583. end
  584. else
  585. bimbowithdrawal = 0
  586. $bimbostatus = ''
  587. end
  588. !
  589. ! WD: Triggers every 15 minutes if not sleeping
  590. ! Update to remove long iterations on loading saves from previous versions
  591. ! Do Nothing if sleeping, invalid Trig15Minute value or more than 6 hours 16 minute pass
  592. if InSleep ! 0 or Trig15Minute > totminut or (totminut - Trig15Minute) >= 376:
  593. set Trig15Minute = totminut
  594. ! More than 15 minutes since last check
  595. else
  596. if (totminut - Trig15Minute) >= 15:
  597. ! begin Loop
  598. :Trig15MinuteLoop
  599. ! Horny Actions
  600. if pcs_horny > 100:
  601. set Trig15Minute = totminut
  602. else
  603. set Trig15Minute += 15
  604. ! WD: Fix vibrator arousal to trigger every 15 minutes, moved from 'time' location
  605. if vibratorin = 1:pcs_horny += rand(1, 5)
  606. ! WD: Fixed Piecing arousal to trigger every 15 minutes, instead of once per day
  607. if pcs_horny < 70:
  608. hornystat = 0
  609. if pirsF > 0 and pirsF < 10000:hornystat += 1
  610. if pirsG > 0 and pirsG < 10000:hornystat += 1
  611. hornyStat = hornystat * 4
  612. if pirsA > 0 and pirsA < 10000:hornystat += 1
  613. if pirsB > 0 and pirsB < 10000:hornystat += 1
  614. if pirsC > 0 and pirsC < 10000:hornystat += 1
  615. if pirsD > 0 and pirsD < 10000:hornystat += 1
  616. if pirsE > 0 and pirsE < 10000:hornystat += 1
  617. if pirsN > 0 and pirsN < 10000:hornystat += 1
  618. set pcs_horny += hornyStat / 4 + rand(1,4) <= hornyStat mod 4 & ! Apply 1/4 of value on average
  619. end
  620. ! WD: Clothing
  621. if CloStyle = 4 and pcs_horny < 70:set pcs_horny += rand(0, 2)
  622. if (PCloSkirt > 5 or PCloPants > 5) and pcs_horny < 50:set pcs_horny += rand(0, 1)
  623. if PCloTopCut = 4 and pcs_horny < 50:set pcs_horny += rand(0, 1)
  624. end
  625. !!SECTION: Bimbo (15 minute interval update checks)
  626. if bimbolevel = 2:
  627. if pcs_mood < 100:pcs_mood += ((pcs_mood / 100) * (rand(0,1)))
  628. if pcs_horny < 25:pcs_horny = 25
  629. if pcs_horny < 100:pcs_horny += 1
  630. end
  631. if bimbolevel = 3:
  632. if (pcs_mood < 100):pcs_mood += ((pcs_mood / 100) * (rand(0,2)))
  633. if pcs_horny < 50:pcs_horny = 50
  634. if pcs_horny < 100:pcs_horny += 2
  635. end
  636. !! This is the Succubus non-direct injection (pun intented) sex to sexnutrition and the sexnutrition conversion handling
  637. if succubusflag = 1:
  638. if pcs_horny < 50: pcs_horny = 50
  639. if pcs_horny < 100: pcs_horny += succublvl
  640. if succhungry > 0:
  641. pcs_energy -= succhungry * succublvl
  642. pcs_hydra -= succhungry * succublvl
  643. pcs_sleep -= succhungry * succublvl
  644. end
  645. cumres_idx = arrpos('sparrloc',12)
  646. if cumres_idx >= 0 and sparrvol[cumres_idx] > 0:sexnutrition += 4 & gs 'cum_cleanup', 'cleanloc', 12
  647. cumres_idx = arrpos('sparrloc',0)
  648. if cumres_idx >= 0 and cumsumvag > 0:sexnutrition += cumsumvag * 4 & gs 'cum_cleanup', 'cleanloc', 0
  649. if cumres_idx >= 0 and cumsumass > 0:sexnutrition += cumsumass * 4 & gs 'cum_cleanup', 'cleanloc', 3
  650. if arrsize('sparrvol') > 0:
  651. suctempi = -1
  652. :SuccAbsorbLoop
  653. suctempi += 1
  654. if suctempi <= 1 or suctempi = 4 or suctempi >= 8:
  655. if suctempi = 12: jump 'SuccAbsorbLoop'
  656. suctemparr = arrpos('sparrloc',suctempi)
  657. if suctemparr >= 0 and sparrloc[suctemparr] = suctempi and sparrvol[suctemparr] > 0:
  658. sexnutrition += succublvl * 5
  659. cumsumbod -= sparrvol[suctemparr]
  660. succubxp += 2
  661. sucabscum = 1
  662. gs 'cum_cleanup', 'cleandeposit', suctemparr
  663. cumloc[suctempi] = 0
  664. spdirty = 0
  665. cumloc[1] = 0
  666. cumloc[2] = 0
  667. cumloc[4] = 0
  668. cumloc[5] = 0
  669. cumloc[6] = 0
  670. cumloc[7] = 0
  671. cumloc[11] = 0
  672. cumloc[14] = 0
  673. !! debug code $stat_msg += '<BR>Absorb ext <<sexnutrition>>'
  674. end
  675. end
  676. if suctempi < 17:jump 'SuccAbsorbLoop'
  677. end
  678. if suclezsex < lesbian:
  679. sexnutrition += succublvl * 20
  680. suclezsex = lesbian
  681. succubxp += 3
  682. sucabslez = 1
  683. end
  684. if sexnutrition > 0:
  685. if sucskill >= 3 and succublvl >= 2: sexnutrition += (sexnutrition * 2) / 10
  686. if sucabslez = 1 and sucabscum = 1:
  687. $sucabs1 = 'absorbed energy from the woman you had sex with'
  688. $sucabs2 = ' and you '
  689. $sucabs3 = 'absorb the semen in your body'
  690. elseif sucabscum = 1:
  691. $sucabs3 = 'absorb the semen in your body'
  692. elseif sucabslez = 1:
  693. $sucabs1 = 'absorbed energy from the woman you had sex with'
  694. else
  695. !!Debug code
  696. $stat_msg += '<BR>SOMETHING HAPPENED!'
  697. end
  698. $stat_msg += '<BR>You <<$sucabs1>><<$sucabs2>><<$sucabs3>>, gaining nourishment.'
  699. sucabslez = 0 & sucabscum = 0
  700. $sucabs1 = '' & $sucabs2 = '' & $sucabs3 = ''
  701. if (pcs_mood < 100): pcs_mood += ((pcs_mood / 100) * 5)
  702. if pcs_energy > 100: entemp = (pcs_energy - 100)
  703. if sucexcess < 0 and sexnutrition > 20 and pcs_energy > 30:
  704. if sexnutrition - 20 >= (0 - sucexcess) * 2:
  705. sexnutrition += sucexcess * 2
  706. sucexcess = 0
  707. else
  708. sucexcess += (sexnutrition - 20) / 2
  709. sexnutrition = 20
  710. end
  711. end
  712. pcs_energy += sexnutrition / 2
  713. pcs_hydra += sexnutrition
  714. pcs_sleep += sexnutrition / 20
  715. if succhungry > 0: succhungry = 0
  716. sexnutrition = 0
  717. if pcs_energy > 100: sucexcess += (pcs_energy - entemp - 100) & pcs_energy = 100 + entemp & killvar 'entemp'
  718. end
  719. end
  720. !! safeguards to prevent bimbolevel from going above or below its intended limits
  721. if bimbolevel > 3: bimbolevel = 3
  722. if bimbolevel < 0: bimbolevel = 0
  723. ! do loop
  724. if (totminut - Trig15Minute) >= 15:jump 'Trig15MinuteLoop'
  725. end
  726. end
  727. !!!!!!!!!!!!!
  728. !!!ENERGY!!!
  729. !!!!!!!!!!!!!
  730. if succubusflag = 1:
  731. if pcs_energy < 0:
  732. if salo >= 1:
  733. if cheatNoFat = 0: salo -= 2
  734. pcs_energy += 8 + succublvl
  735. else
  736. pcs_energy += 8 + succublvl
  737. sucexcess -= (8 + succublvl) * (6 - succublvl)
  738. end
  739. end
  740. if pcs_health < 0:
  741. pcs_health = 10
  742. sucexcess -= 25 * (9 - succublvl)
  743. end
  744. if pcs_willpwr < 0:
  745. pcs_willpwr = 10
  746. sucexcess -= 20 * (9 - succublvl)
  747. sucpowzeroed = 4
  748. end
  749. end
  750. if pcs_sleep < 0:
  751. pcs_sleep = 0
  752. pcs_mood -= 5
  753. end
  754. if pcs_energy < 0:
  755. pcs_energy = 0
  756. pcs_health -= 5
  757. if salo = 0 and pcs_stren + pcs_vital > 0:
  758. stren_deg -= 1
  759. vital_deg -= 1
  760. pcs_energy += 8
  761. elseif salo = 0 and pcs_stren + pcs_vital <= 0:
  762. if Enable_nogameover = 0 :
  763. over = 3
  764. if $loc ! 'gameover': gt 'gameover'
  765. exit
  766. else
  767. $stat_msg += '<BR><font color=red><B>You starved to death, but Cheat Mode keeps you Alive.</B></font>'
  768. salo = 1
  769. end
  770. elseif salo > 0:
  771. if cheatNoFat = 0: salo -= 1
  772. pcs_energy += 8
  773. end
  774. end
  775. if pcs_hydra <= 0:
  776. pcs_hydra = 1
  777. pcs_health -= 5
  778. end
  779. !!Set hydra_check value
  780. hydra_check = pcs_hydra
  781. if pcs_mood <= 0:
  782. pcs_mood = 1
  783. pcs_health -= 5
  784. end
  785. if pcs_health < 0:
  786. if Enable_nogameover = 0 :
  787. over = 1
  788. if $loc ! 'gameover': gt 'gameover'
  789. exit & !nogameover by illume
  790. else
  791. $stat_msg += '<BR><font color=red><B>You died from injuries, but Cheat Mode keeps you Alive.</B></font>'
  792. pcs_health = 0
  793. end
  794. end
  795. if pcs_willpwr <= 0 :
  796. !this will set willpower to 0 correctly; then check mana =1 for insane-gameover(pcs_willpwr=0&mana=1).
  797. if pcs_mood <= 1:
  798. if Enable_nogameover = 0 :
  799. over = 2
  800. if $loc ! 'gameover': gt 'gameover'
  801. exit & !nogameover by illume
  802. else
  803. $stat_msg += '<BR><font color=red><B>You are insane, but Cheat Mode keeps you Alive.</B></font>'
  804. !pcs_mood already checked for >=1 in line 1113 if pcs_mood <= 0, no need to set another one
  805. end
  806. end
  807. pcs_willpwr = 0
  808. end
  809. !!cars-increase/depressed mood after orgasm/rape
  810. if rape > 0 and rape ! rape_count and orgasm = orgasm_count:
  811. pcs_mood = 10
  812. rape_count = rape
  813. elseif orgasm > 0 and orgasm ! orgasm_count:
  814. pcs_mood = 100
  815. orgasm_count = orgasm
  816. elseif rape > 0 and rape ! rape_count and orgasm > 0 and orgasm ! orgasm_count:
  817. pcs_mood = 100
  818. orgasm_count = orgasm
  819. rape_count = rape
  820. end
  821. !!Health, Willpower, Auto Birth Control pregnancy check
  822. gs 'body'
  823. if pcs_health >= healthmax:
  824. $pcs_health = '<font color="green">You are very healthy.</font>'
  825. elseif pcs_health >= healthmax * 75 / 100:
  826. $pcs_health = '<font color=#0064FF>You are healthy.</font>'
  827. elseif pcs_health >= healthmax * 50 / 100:
  828. $pcs_health = '<font color="brown">You are not healthy.</font>'
  829. elseif pcs_health >= healthmax * 25 / 100:
  830. $pcs_health = '<font color="red">You are sick.</font>'
  831. else
  832. $pcs_health = '<font color="red">You are on the verge of death.</font>'
  833. end
  834. if pcs_willpwr >= willpowermax:
  835. $pcs_willpwr = '<font color="green">You feel in charge of your actions.</font>'
  836. elseif pcs_willpwr >= willpowermax * 75 / 100:
  837. $pcs_willpwr = '<font color=#0064FF>You are mostly in control.</font>'
  838. elseif pcs_willpwr >= willpowermax * 50 / 100:
  839. $pcs_willpwr = '<font color="brown">You might have to make some concessions.</font>'
  840. elseif pcs_willpwr >= willpowermax * 25 / 100:
  841. $pcs_willpwr = '<font color="red">You will have to toe the line.</font>'
  842. else
  843. $pcs_willpwr = '<font color="red">You are completely at our people''s mercy.</font>'
  844. end
  845. !!stop auto birth control pill taking if the player believes they are pregnant or are pregnant
  846. if (thinkpreg = 1 or knowpreg = 1) and tabletkicheck = 1: tabletkicheck = 0
  847. !!Mood
  848. if cheatNoMood = 0:
  849. maxmood = 100 - moodmodifier
  850. if pcs_mood > 100:
  851. pcs_mood = 100
  852. elseif pcs_mood < 0:
  853. pcs_mood = 0
  854. !! 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
  855. end
  856. else
  857. pcs_mood = 100
  858. end
  859. if pcs_mood >= 80:
  860. $pcs_mood = '<font color="green">You are in a great mood.</font>'
  861. elseif pcs_mood >= 60:
  862. $pcs_mood = '<font color=#0064FF>You are in a good mood.</font>'
  863. elseif pcs_mood >= 40:
  864. $pcs_mood = '<font color="brown">You are in an OK mood.</font>'
  865. elseif pcs_mood >= 20:
  866. $pcs_mood = '<font color="orange">You are in a bad mood.</font>'
  867. elseif pcs_mood >= 5:
  868. $pcs_mood = '<font color="red">You are in a terrible mood.</font>'
  869. else
  870. $pcs_mood = '<font color="red">You are really depressed and need to improve your mood.</font>'
  871. end
  872. if pcs_energy >= 80:
  873. $pcs_energy = '<font color="green">You couldn''t eat one more bite.</font>'
  874. elseif pcs_energy >= 40:
  875. $pcs_energy = '<font color=#0064FF>You''re not really hungry, but a small snack would be very welcome.</font>'
  876. elseif pcs_energy >= 8:
  877. $pcs_energy = '<font color="brown">You are hungry.</font>'
  878. else
  879. $pcs_energy = '<font color="red">You are very hungry.</font>'
  880. end
  881. if pcs_hydra >= 80:
  882. $pcs_hydra = '<font color="green">You are not thirsty at all.</font>'
  883. elseif pcs_hydra >= 40:
  884. $pcs_hydra = '<font color=#0064FF>You are slightly thirsty.</font>'
  885. elseif pcs_hydra >= 8:
  886. $pcs_hydra = '<font color="brown">You are thirsty.</font>'
  887. else
  888. $pcs_hydra = '<font color="red">You are very thirsty.</font>'
  889. end
  890. if pcs_sleep >= 80:
  891. $pcs_sleep = '<font color="green">You are well rested.</font>'
  892. elseif pcs_sleep >= 40:
  893. $pcs_sleep = '<font color=#0064FF>You are slightly tired.</font>'
  894. elseif pcs_sleep >= 8:
  895. $pcs_sleep = '<font color="brown">You are tired.</font>'
  896. else
  897. $pcs_sleep = '<font color="red">You are very tired.</font>'
  898. end
  899. 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:
  900. !!absence from work in a factory in Pavlovsk
  901. FabrikaProgul += 1
  902. FabrikaProgulDay = day
  903. end
  904. if hotelroom > 0:
  905. if hotelroom1day = daystart: $stat_msg += '<BR>You have 1 night left on your hotel booking.'
  906. if hotelroom1day < daystart and hour <= 11: $stat_msg += '<BR>Your hotel booking has expired and you cannot return to your room after 11:00'
  907. if hotelroom1day < daystart and hour > 11: hotelroom = 0
  908. end
  909. if hour >= 8 and hour < 14 and week < 6 and StoryLine > 0 and SchoolAtestat = 0 and kanikuli = 0 and schoolProgulDay ! daystart:
  910. !!absence from school
  911. schoolprogul += 1
  912. schoolProgulDay = daystart
  913. end
  914. if cumcondslip <= 0: cumcondslip_deep = 0
  915. !!Sex stat update
  916. stat['mast'] += mastr & mastr = 0
  917. stat['hj'] += hj & hj = 0
  918. stat['bj'] += bj & bj = 0
  919. stat['vaginal'] += sex & sex = 0
  920. stat['anal'] += anal & anal = 0
  921. stat['cuni'] += kuni & kuni = 0
  922. stat['anal_strap_give'] += pegging & pegging = 0
  923. !!Pain calculation
  924. paintmp1 = func('shortgs','modul',pain['head'],pain['hair'],pain['ears'],pain['eyebrows'],pain['eyes'],pain['cheeks'],pain['nose'],pain['mouth'])
  925. paintmp2 = func('shortgs','modul',pain['tummy'],pain['pubic'],pain['vaginal'],pain['labia'],pain['clitoris'],pain['urethra'],pain['cervix'],pain['lips'])
  926. paintmp3 = func('shortgs','modul',pain['throat'],pain['asscheeks'],pain['asshole'],pain['hips'],pain['thighs'],pain['legL'],pain['legR'],pain['feet'])
  927. paintmp4 = func('shortgs','modul',pain['toes'],pain['shoulders'],pain['armL'],pain['armR'],pain['hands'],pain['fingers'],pain['chest'],pain['breasts'])
  928. paintmp5 = func('shortgs','modul',pain['tongue'],pain['neck'],pain['back'],pain['nipples'],pain['ribs'],vgape * 8, agape * 10,spanked * 24)
  929. pain['total'] = func('shortgs','modul',paintmp1,paintmp2,paintmp3,paintmp4,paintmp5)
  930. if pain['total'] > 100: pain['total'] = 100
  931. pain['damage'] = pain['total']
  932. pain['relief'] = 0
  933. if alko > 9:
  934. pain['relief'] = 70
  935. elseif alko > 6:
  936. pain['relief'] = 40
  937. elseif alko > 3:
  938. pain['relief'] = 15
  939. end
  940. if StrongNarkota > 0:
  941. pain['relief'] = 90
  942. elseif nark > 0:
  943. pain['relief'] = 60
  944. elseif pain['killer'] > 12 and alko <= 9:
  945. pain['relief'] = 50
  946. end
  947. if pain['relief'] ! 0:
  948. if (pain['total'] / pain['relief']) > 0:
  949. pain['total'] = pain['total'] / pain['relief']
  950. elseif pain['total'] > 0:
  951. pain['total'] = 0
  952. end
  953. end
  954. if pain['total'] > 80:
  955. if (pcs_health * 5) >= healthmax: pcs_health = pcs_health * 20 / 100
  956. if (pcs_mood * 5) >= 100: pcs_mood = pcs_mood * 20 / 100
  957. elseif pain['total'] > 60:
  958. if (pcs_health * 5 / 2) >= healthmax: pcs_health = pcs_health * 40 / 100
  959. if (pcs_mood * 5 / 2) >= 100: pcs_mood = pcs_mood * 40 / 100
  960. elseif pain['total'] > 40:
  961. if (pcs_health * 5 / 3) >= healthmax: pcs_health = pcs_health * 60 / 100
  962. if (pcs_mood * 5 / 3) >= 100: pcs_mood = pcs_mood * 60 / 100
  963. elseif pain['total'] > 20:
  964. if (pcs_health * 5 / 4) >= healthmax: pcs_health = pcs_health * 80 / 100
  965. if (pcs_mood * 5 / 4) >= 100: pcs_mood = pcs_mood * 80 / 100
  966. elseif pain['total'] > 0:
  967. if (pcs_health * 10 / 9) >= healthmax: pcs_health = pcs_health * 90 / 100
  968. if (pcs_mood * 10 / 9) >= 100: pcs_mood = pcs_mood * 90 / 100
  969. end
  970. !!--------------------------pain calculation end--------------------------------
  971. !!update skills and attributes to pcs_ from there _lvl values plus adjustments based on condition
  972. gs 'stat_sklattrib_lvlset'
  973. !!Sleep variable cap
  974. if pcs_sleep > 100: pcs_sleep = 100
  975. if insleep = 0: gs 'stat_display'
  976. --- stat ---------------------------------