willpower.qsrc 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. # willpower
  2. !!To use call with gs 'willpower', '<type>'
  3. !!type is the nature of the demand and can be any of the following:
  4. !!
  5. !!Sex acts, this is for the cost to refuse advances or force another to partake
  6. !!'hj', 'bj', 'cuni', 'sex', 'anal', 'gangbang', 'prostitution', 'swallow', 'cum_inside'
  7. !!Bridging a gap in skill, for succeeding when not quite meeting the required skill/attribute, must include skill with _lvl postfix in $ARGS[1]
  8. !!'skill'
  9. !!Standing up to unwanted sex
  10. !!'rape'
  11. !!Refusing peer pressure
  12. !!'drink', 'drugs', 'crime', 'exhib'
  13. !!Forcing Sveta to stay awake
  14. !!'sleep'
  15. !!If no other option fits
  16. !!'misc'
  17. !!The value returned as will_cost can be used to inform the player of cost and limit actions
  18. !!To apply the cost just call gs 'willpower', 'resist' or gs 'willpower', 'force'
  19. !!Force is for Sveta forcing someone else and will slowly increase the will stat, otherwise its the same as resist
  20. !!If sveta forces herself to do something you can also use gs 'willpower', 'force', 'self' instead of 'resist'. This option is only available to avoid some confusion if sveta isn''t resisting
  21. if $ARGS[0] = 'calc':
  22. gs 'willpower', 'dnd'
  23. will_calc = will_dnd
  24. !!fatigue
  25. if pcs_sleep < 5:
  26. will_calc += 50
  27. elseif pcs_sleep < 10:
  28. will_calc += 25
  29. elseif pcs_sleep < 20:
  30. will_calc += 10
  31. elseif pcs_sleep < 30:
  32. will_calc += 5
  33. end
  34. !!hunger
  35. if pcs_energy < 5:
  36. will_calc += 50
  37. elseif pcs_energy < 10:
  38. will_calc += 25
  39. elseif pcs_energy < 20:
  40. will_calc += 10
  41. elseif pcs_energy < 30:
  42. will_calc += 5
  43. end
  44. !!thirst
  45. if pcs_hydra < 5:
  46. will_calc += 50
  47. elseif pcs_hydra < 10:
  48. will_calc += 25
  49. elseif pcs_hydra < 20:
  50. will_calc += 10
  51. elseif pcs_hydra < 30:
  52. will_calc += 5
  53. end
  54. !!Very horny
  55. if pcs_horny >= 90: will_calc += 10
  56. !!Bad syphilis, you is mental
  57. if Sifilis >= 50: will_calc += 100
  58. !!feeling sick
  59. if sick > 72:
  60. will_calc += 35
  61. elseif sick > 48:
  62. will_calc += 20
  63. elseif sick > 24:
  64. will_calc += 10
  65. elseif sick > 1:
  66. will_calc += 5
  67. end
  68. end
  69. if $ARGS[0] = 'hj':
  70. gs 'willpower', 'calc'
  71. will_cost = 0
  72. if stat['hj'] <= 90:
  73. will_cost = (stat['hj'] + will_calc)/10
  74. else
  75. will_cost = (100 + will_calc)/10
  76. end
  77. end
  78. if $ARGS[0] = 'bj':
  79. gs 'willpower', 'calc'
  80. will_cost = 0
  81. if missCum >= timeTresh: will_calc += 100
  82. if stat['bj'] <= 90:
  83. will_cost = (stat['bj'] + will_calc)/10
  84. else
  85. will_cost = (100 + will_calc)/10
  86. end
  87. end
  88. if $ARGS[0] = 'cuni':
  89. gs 'willpower', 'calc'
  90. will_cost = 0
  91. if missCum >= timeTresh: will_calc += 100
  92. cuni_check = (stat['cuni'] + stat['cuni_give']) / 2
  93. if cuni_check <= 90:
  94. will_cost = (cuni_check + will_calc)/10
  95. else
  96. will_cost = (100 + will_calc)/10
  97. end
  98. killvar 'cuni_check'
  99. end
  100. if $ARGS[0] = 'sex':
  101. gs 'willpower', 'calc'
  102. will_cost = 0
  103. if stat['vaginal'] <= 90:
  104. will_cost = (stat['vaginal'] + will_calc)/10
  105. else
  106. will_cost = (100 + will_calc)/10
  107. end
  108. end
  109. if $ARGS[0] = 'anal':
  110. gs 'willpower', 'calc'
  111. will_cost = 0
  112. if missCum >= timeTresh: will_calc += 100
  113. if stat['anal'] <= 90:
  114. will_cost = (stat['anal'] + will_calc)/10
  115. else
  116. will_cost = (100 + will_calc)/10
  117. end
  118. end
  119. if $ARGS[0] = 'gangbang':
  120. gs 'willpower', 'calc'
  121. will_cost = 0
  122. if missCum >= timeTresh: will_calc += 100
  123. if stat['group'] <= 90:
  124. will_cost = (stat['group'] + will_calc)/10
  125. else
  126. will_cost = (100 + will_calc)/10
  127. end
  128. end
  129. if $ARGS[0] = 'prostitution':
  130. gs 'willpower', 'calc'
  131. will_cost = 0
  132. if missCum >= timeTresh: will_calc += 100
  133. prost_will = pav_prostitute + city_prostitute + oldtown_prostitute + village_prostitute
  134. if prost_will <= 90:
  135. will_cost = (prost_will + will_calc)/10
  136. else
  137. will_cost = (100 + will_calc)/10
  138. end
  139. end
  140. if $ARGS[0] = 'humiliation':
  141. gs 'willpower', 'calc'
  142. will_cost = 0
  143. if missCum >= timeTresh: will_calc += 100
  144. if stat['humiliation'] <= 90:
  145. will_cost = (stat['humiliation'] + will_calc)/10
  146. else
  147. will_cost = (100 + will_calc)/10
  148. end
  149. end
  150. if $ARGS[0] = 'swallow':
  151. gs 'willpower', 'calc'
  152. will_cost = 0
  153. if trt_cumeater = 1 or cumloc[12] > 0:
  154. will_cost = (100 + will_calc)/10
  155. else
  156. will_cost = (10 + will_calc)/10
  157. end
  158. end
  159. !! no stat for this currently so just a baseline figure and reduction if cum already inside
  160. if $ARGS[0] = 'cum_inside':
  161. gs 'willpower', 'calc'
  162. will_cost = 0
  163. if missCum >= timeTresh: will_calc += 100
  164. if cumloc[0] <= 0:
  165. will_cost = (10 + will_calc)/10
  166. else
  167. will_cost = (100 + will_calc)/10
  168. end
  169. end
  170. !! requires the skill to be named with the _lvl postfix
  171. if $ARGS[0] = 'skill':
  172. gs 'willpower', 'calc'
  173. will_cost = 0
  174. if $ARGS[0] = 'inhib_lvl':
  175. will_cost = (pcs_inhib + will_calc)/10
  176. else
  177. dynamic 'will_cost = <<$ARGS[1]>> + will_calc)/10'
  178. end
  179. end
  180. if $ARGS[0] = 'rape':
  181. gs 'willpower', 'calc'
  182. will_cost = 0
  183. if missCum >= timeTresh: will_calc += 100
  184. if rape = 0:
  185. will_cost = (5 + will_calc)/10
  186. else
  187. will_cost = (100 + rape + will_calc)/10
  188. end
  189. end
  190. if $ARGS[0] = 'drink':
  191. gs 'willpower', 'calc'
  192. will_cost = 0
  193. if alko > 10:
  194. will_cost = (20 + will_calc + (alcohol_exp * 40))/10
  195. elseif alko > 6:
  196. will_cost = (80 + will_calc + (alcohol_exp * 40))/10
  197. elseif alko > 3:
  198. will_cost = (60 + will_calc + (alcohol_exp * 40))/10
  199. else
  200. will_cost = (10 + will_calc + (alcohol_exp * 10))/10
  201. end
  202. end
  203. !!Drug needs already included in the will_calc so just a small base cost here
  204. if $ARGS[0] = 'drugs':
  205. gs 'willpower', 'calc'
  206. will_cost = 0
  207. if addictive_trait_lvl = 3:
  208. will_cost = (100 + will_calc)/10
  209. elseif addictive_trait_lvl = 2:
  210. will_cost = (40 + will_calc)/10
  211. elseif addictive_trait_lvl = 1:
  212. will_cost = (20 + will_calc)/10
  213. else
  214. will_cost = (10 + will_calc)/10
  215. end
  216. end
  217. !!There is no related stat so just a base cost of 6
  218. if $ARGS[0] = 'crime':
  219. gs 'willpower', 'calc'
  220. will_cost = 0
  221. will_cost = (60 + will_calc)/10
  222. end
  223. if $ARGS[0] = 'exhib':
  224. gs 'willpower', 'calc'
  225. will_cost = 0
  226. if Exhibitionist_lvl = 3:
  227. will_cost = (0 + will_calc)/10
  228. elseif Exhibitionist_lvl = 2:
  229. will_cost = (1 + will_calc)/10
  230. elseif Exhibitionist_lvl = 1:
  231. will_cost = (2 + will_calc)/10
  232. elseif pcs_inhib > 70:
  233. will_cost = (3 + will_calc)/10
  234. else
  235. will_cost = (pcs_inhib + will_calc)/10
  236. end
  237. end
  238. !!this is to force you to stay wake so will cost nothing if you have more than 5 sleep, it has no base cost as there will always be a sleep cost in calc
  239. if $ARGS[0] = 'sleep':
  240. gs 'willpower', 'calc'
  241. will_cost = 0
  242. if pcs_sleep <= 5: will_cost = will_calc/10
  243. end
  244. !!Choose this if nothing else fits
  245. if $ARGS[0] = 'misc':
  246. gs 'willpower', 'calc'
  247. will_cost = 0
  248. will_cost = (10 + will_calc)/10
  249. end
  250. !!modifiers for drink an drugs
  251. if $ARGS[0] = 'dnd':
  252. will_dnd = 0
  253. if alko > 10:
  254. will_dnd += 80
  255. elseif alko > 6:
  256. will_dnd += 40
  257. elseif alko > 3:
  258. will_dnd += 20
  259. end
  260. !!cigarettes
  261. if smokerNeed > 10: will_dnd += 10
  262. !!weed
  263. if jointhigh > 0: will_dnd -= 10
  264. !!amphetamines
  265. if amphWithdrawl > 2:
  266. will_dnd += 40
  267. elseif amphHigh > 0:
  268. will_dnd += 60
  269. end
  270. !!heroine
  271. if SLomka > 0:
  272. will_dnd += 80
  273. elseif StrongNarkota > 0:
  274. will_dnd += 50
  275. end
  276. !!cocaine
  277. if narkoman = 1:
  278. will_dnd += 40
  279. elseif nark < 0:
  280. will_dnd -= 20
  281. end
  282. end
  283. if $ARGS[0] = 'resist' or ($ARGS[0] = 'force' and $ARGS[1] = 'self'): pcs_willpwr -= will_cost
  284. if $ARGS[0] = 'force' and $ARGS[1] ! 'self':
  285. pcs_willpwr -= will_cost
  286. will_counter += 1
  287. if will_counter > 10: willpowermax += 1
  288. end
  289. --- willpower ---------------------------------