willpower.qsrc 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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 stat['bj'] <= 90:
  156. will_cost = ((100 - stat['bj']) + will_calc)/10
  157. else
  158. will_cost = (10 + 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 stat['bj'] <= 90:
  188. if Exhibitionist_lvl = 3:
  189. will_cost = (0 + will_calc)/10
  190. elseif Exhibitionist_lvl = 2:
  191. will_cost = (1 + will_calc)/10
  192. elseif Exhibitionist_lvl = 1:
  193. will_cost = (2 + will_calc)/10
  194. elseif pcs_inhib > 70:
  195. will_cost = (3 + will_calc)/10
  196. else
  197. will_cost = (100 - pcs_inhib + will_calc)/10
  198. end
  199. end
  200. !!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
  201. if $ARGS[0] = 'sleep':
  202. gs 'willpower', 'calc'
  203. will_cost = 0
  204. if pcs_sleep <= 5: will_cost = will_calc/10
  205. end
  206. !!modifiers for drink an drugs
  207. if $ARGS[0] = 'dnd':
  208. will_dnd = 0
  209. if alko > 10:
  210. will_dnd += 80
  211. elseif alko > 6:
  212. will_dnd += 40
  213. elseif alko > 3:
  214. will_dnd += 20
  215. end
  216. !!cigarettes
  217. if smokerNeed > 10: will_dnd += 10
  218. !!amphetamines
  219. if amphWithdrawl > 2:
  220. will_dnd += 40
  221. elseif amphHigh > 0:
  222. will_dnd += 60
  223. end
  224. !!heroine
  225. if SLomka > 0:
  226. will_dnd += 80
  227. elseif StrongNarkota > 0:
  228. will_dnd += 50
  229. end
  230. !!cocaine
  231. if narkoman = 1:
  232. will_dnd += 40
  233. elseif nark < 0:
  234. will_dnd -= 20
  235. end
  236. end
  237. if $ARGS[0] = 'resist': pcs_willpwr -= will_cost
  238. if $ARGS[0] = 'force':
  239. pcs_willpwr -= will_cost
  240. will_counter += 1
  241. if will_counter > 10: pcs_will += 1
  242. end
  243. --- willpower ---------------------------------