1
0

willpower.qsrc 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  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 = ((100 - stat['hj']) + will_calc)/10
  71. else
  72. will_cost = (10 + 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 = ((100 - stat['bj']) + will_calc)/10
  81. else
  82. will_cost = (10 + 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 = ((100 - stat['vaginal']) + will_calc)/10
  90. else
  91. will_cost = (10 + 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 = ((100 - stat['anal']) + will_calc)/10
  100. else
  101. will_cost = (10 + 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 = ((100 - stat['group']) + will_calc)/10
  110. else
  111. will_cost = (10 + 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 = ((100 - prost_will) + will_calc)/10
  121. else
  122. will_cost = (10 + 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 = (100 + will_calc)/10
  130. else
  131. will_cost = (10 + 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 = (100 + will_calc)/10
  141. else
  142. will_cost = (10 + 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. dynamic 'will_cost = <<$ARGS[1]>> + will_calc)/10'
  150. end
  151. if $ARGS[0] = 'rape':
  152. gs 'willpower', 'calc'
  153. will_cost = 0
  154. if missCum >= timeTresh: will_calc += 100
  155. if rape = 0:
  156. will_cost = (5 + will_calc)/10
  157. else
  158. will_cost = (100 + rape + will_calc)/10
  159. end
  160. end
  161. if $ARGS[0] = 'drink':
  162. gs 'willpower', 'calc'
  163. will_cost = 0
  164. if alko > 10:
  165. will_cost = (60 + will_calc)/10
  166. elseif alko > 6:
  167. will_cost = (100 + will_calc)/10
  168. elseif alko > 3:
  169. will_cost = (80 + will_calc)/10
  170. end
  171. end
  172. !!Drug needs already included in the will_calc so just a small base cost here
  173. if $ARGS[0] = 'drugs':
  174. gs 'willpower', 'calc'
  175. will_cost = 0
  176. will_cost = (20 + will_calc)/10
  177. end
  178. !!There is no related stat so just a base cost of 6
  179. if $ARGS[0] = 'crime':
  180. gs 'willpower', 'calc'
  181. will_cost = 0
  182. will_cost = (60 + will_calc)/10
  183. end
  184. if $ARGS[0] = 'exhib':
  185. gs 'willpower', 'calc'
  186. will_cost = 0
  187. if Exhibitionist_lvl = 3:
  188. will_cost = (0 + will_calc)/10
  189. elseif Exhibitionist_lvl = 2:
  190. will_cost = (1 + will_calc)/10
  191. elseif Exhibitionist_lvl = 1:
  192. will_cost = (2 + will_calc)/10
  193. elseif pcs_inhib > 70:
  194. will_cost = (3 + will_calc)/10
  195. else
  196. will_cost = (100 - pcs_inhib + will_calc)/10
  197. end
  198. end
  199. !!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
  200. if $ARGS[0] = 'sleep':
  201. gs 'willpower', 'calc'
  202. will_cost = 0
  203. if pcs_sleep <= 5: will_cost = will_calc/10
  204. end
  205. !!modifiers for drink an drugs
  206. if $ARGS[0] = 'dnd':
  207. will_dnd = 0
  208. if alko > 10:
  209. will_dnd += 80
  210. elseif alko > 6:
  211. will_dnd += 40
  212. elseif alko > 3:
  213. will_dnd += 20
  214. end
  215. !!cigarettes
  216. if smokerNeed > 10: will_dnd += 10
  217. !!amphetamines
  218. if amphWithdrawl > 2:
  219. will_dnd += 40
  220. elseif amphHigh > 0:
  221. will_dnd += 60
  222. end
  223. !!heroine
  224. if SLomka > 0:
  225. will_dnd += 80
  226. elseif StrongNarkota > 0:
  227. will_dnd += 50
  228. end
  229. !!cocaine
  230. if narkoman = 1:
  231. will_dnd += 40
  232. elseif nark < 0:
  233. will_dnd -= 20
  234. end
  235. end
  236. if $ARGS[0] = 'resist': pcs_willpwr -= will_cost
  237. if $ARGS[0] = 'force':
  238. pcs_willpwr -= will_cost
  239. will_counter += 1
  240. if will_counter > 10: pcs_will += 1
  241. end
  242. --- willpower ---------------------------------