1
0

willpower.qsrc 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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', '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. !!The value returned as will_cost can be used to inform the player of cost and limit actions
  16. !!To apply the cost just call gs 'willpower', 'resist' or gs 'willpower', 'force'
  17. !!Force is for Sveta forcing someone else and will slowly increase the will stat, otherwise its the same as resist
  18. if $ARGS[0] = 'calc':
  19. gs 'willpower', 'dnd'
  20. will_calc = will_dnd
  21. !!fatigue
  22. if pcs_sleep < 5:
  23. will_calc += 50
  24. elseif pcs_sleep < 10:
  25. will_calc += 25
  26. elseif pcs_sleep < 20:
  27. will_calc += 10
  28. elseif pcs_sleep < 30:
  29. will_calc += 5
  30. end
  31. !!hunger
  32. if pcs_energy < 5:
  33. will_calc += 50
  34. elseif pcs_energy < 10:
  35. will_calc += 25
  36. elseif pcs_energy < 20:
  37. will_calc += 10
  38. elseif pcs_energy < 30:
  39. will_calc += 5
  40. end
  41. !!thirst
  42. if pcs_hydra < 5:
  43. will_calc += 50
  44. elseif pcs_hydra < 10:
  45. will_calc += 25
  46. elseif pcs_hydra < 20:
  47. will_calc += 10
  48. elseif pcs_hydra < 30:
  49. will_calc += 5
  50. end
  51. !!Very horny
  52. if pcs_horny >= 90: will_calc += 10
  53. !!Bad syphilis, you is mental
  54. if Sifilis >= 50: will_calc += 100
  55. !!feeling sick
  56. if sick > 72:
  57. will_calc += 35
  58. elseif sick > 48:
  59. will_calc += 20
  60. elseif sick > 24:
  61. will_calc += 10
  62. elseif sick > 1:
  63. will_calc += 5
  64. end
  65. end
  66. if $ARGS[0] = 'hj':
  67. gs 'willpower', 'calc'
  68. will_cost = 0
  69. if stat['hj'] <= 90:
  70. will_cost = (stat['hj'] + will_calc)/10
  71. else
  72. will_cost = (100 + will_calc)/10
  73. end
  74. end
  75. if $ARGS[0] = 'bj':
  76. gs 'willpower', 'calc'
  77. will_cost = 0
  78. if missCum >= timeTresh: will_calc += 100
  79. if stat['bj'] <= 90:
  80. will_cost = (stat['bj'] + will_calc)/10
  81. else
  82. will_cost = (100 + will_calc)/10
  83. end
  84. end
  85. if $ARGS[0] = 'sex':
  86. gs 'willpower', 'calc'
  87. will_cost = 0
  88. if stat['vaginal'] <= 90:
  89. will_cost = (stat['vaginal'] + will_calc)/10
  90. else
  91. will_cost = (100 + will_calc)/10
  92. end
  93. end
  94. if $ARGS[0] = 'anal':
  95. gs 'willpower', 'calc'
  96. will_cost = 0
  97. if missCum >= timeTresh: will_calc += 100
  98. if stat['anal'] <= 90:
  99. will_cost = (stat['anal'] + will_calc)/10
  100. else
  101. will_cost = (100 + will_calc)/10
  102. end
  103. end
  104. if $ARGS[0] = 'gangbang':
  105. gs 'willpower', 'calc'
  106. will_cost = 0
  107. if missCum >= timeTresh: will_calc += 100
  108. if stat['group'] <= 90:
  109. will_cost = (stat['group'] + will_calc)/10
  110. else
  111. will_cost = (100 + will_calc)/10
  112. end
  113. end
  114. if $ARGS[0] = 'prostitution':
  115. gs 'willpower', 'calc'
  116. will_cost = 0
  117. if missCum >= timeTresh: will_calc += 100
  118. prost_will = pav_prostitute + city_prostitute + oldtown_prostitute + village_prostitute
  119. if prost_will <= 90:
  120. will_cost = (prost_will + will_calc)/10
  121. else
  122. will_cost = (100 + will_calc)/10
  123. end
  124. end
  125. if $ARGS[0] = 'swallow':
  126. gs 'willpower', 'calc'
  127. will_cost = 0
  128. if trt_cumeater = 0:
  129. will_cost = (10 + will_calc)/10
  130. else
  131. will_cost = (100 + will_calc)/10
  132. end
  133. end
  134. !! no stat for this currently so just a baseline figure and reduction if cum already inside
  135. if $ARGS[0] = 'cum_inside':
  136. gs 'willpower', 'calc'
  137. will_cost = 0
  138. if missCum >= timeTresh: will_calc += 100
  139. if cumloc[0] <= 0:
  140. will_cost = (10 + will_calc)/10
  141. else
  142. will_cost = (100 + will_calc)/10
  143. end
  144. end
  145. !! requires the skill to be named with the _lvl postfix
  146. if $ARGS[0] = 'skill':
  147. gs 'willpower', 'calc'
  148. will_cost = 0
  149. if $ARGS[0] = 'inhib_lvl':
  150. will_cost = (pcs_inhib + will_calc)/10
  151. else
  152. dynamic 'will_cost = <<$ARGS[1]>> + will_calc)/10'
  153. end
  154. end
  155. if $ARGS[0] = 'rape':
  156. gs 'willpower', 'calc'
  157. will_cost = 0
  158. if missCum >= timeTresh: will_calc += 100
  159. if rape = 0:
  160. will_cost = (5 + will_calc)/10
  161. else
  162. will_cost = (100 + rape + will_calc)/10
  163. end
  164. end
  165. if $ARGS[0] = 'drink':
  166. gs 'willpower', 'calc'
  167. will_cost = 0
  168. if alko > 10:
  169. will_cost = (40 + will_calc)/10
  170. elseif alko > 6:
  171. will_cost = (100 + will_calc)/10
  172. elseif alko > 3:
  173. will_cost = (80 + will_calc)/10
  174. else
  175. will_cost = (10 + will_calc)/10
  176. end
  177. end
  178. !!Drug needs already included in the will_calc so just a small base cost here
  179. if $ARGS[0] = 'drugs':
  180. gs 'willpower', 'calc'
  181. will_cost = 0
  182. will_cost = (20 + will_calc)/10
  183. end
  184. !!There is no related stat so just a base cost of 6
  185. if $ARGS[0] = 'crime':
  186. gs 'willpower', 'calc'
  187. will_cost = 0
  188. will_cost = (60 + will_calc)/10
  189. end
  190. if $ARGS[0] = 'exhib':
  191. gs 'willpower', 'calc'
  192. will_cost = 0
  193. if Exhibitionist_lvl = 3:
  194. will_cost = (0 + will_calc)/10
  195. elseif Exhibitionist_lvl = 2:
  196. will_cost = (1 + will_calc)/10
  197. elseif Exhibitionist_lvl = 1:
  198. will_cost = (2 + will_calc)/10
  199. elseif pcs_inhib > 70:
  200. will_cost = (3 + will_calc)/10
  201. else
  202. will_cost = (pcs_inhib + will_calc)/10
  203. end
  204. end
  205. !!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
  206. if $ARGS[0] = 'sleep':
  207. gs 'willpower', 'calc'
  208. will_cost = 0
  209. if pcs_sleep <= 5: will_cost = will_calc/10
  210. end
  211. !!modifiers for drink an drugs
  212. if $ARGS[0] = 'dnd':
  213. will_dnd = 0
  214. if alko > 10:
  215. will_dnd += 80
  216. elseif alko > 6:
  217. will_dnd += 40
  218. elseif alko > 3:
  219. will_dnd += 20
  220. end
  221. !!cigarettes
  222. if smokerNeed > 10: will_dnd += 10
  223. !!weed
  224. if jointhigh > 0: will_dnd -= 10
  225. !!amphetamines
  226. if amphWithdrawl > 2:
  227. will_dnd += 40
  228. elseif amphHigh > 0:
  229. will_dnd += 60
  230. end
  231. !!heroine
  232. if SLomka > 0:
  233. will_dnd += 80
  234. elseif StrongNarkota > 0:
  235. will_dnd += 50
  236. end
  237. !!cocaine
  238. if narkoman = 1:
  239. will_dnd += 40
  240. elseif nark < 0:
  241. will_dnd -= 20
  242. end
  243. end
  244. if $ARGS[0] = 'resist': pcs_willpwr -= will_cost
  245. if $ARGS[0] = 'force':
  246. pcs_willpwr -= will_cost
  247. will_counter += 1
  248. if will_counter > 10: pcs_will += 1
  249. end
  250. --- willpower ---------------------------------