willpower.qsrc 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  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. !!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] = 'cuni':
  86. gs 'willpower', 'calc'
  87. will_cost = 0
  88. if missCum >= timeTresh: will_calc += 100
  89. cuni_check = (stat['cuni'] + stat['cuni_give']) / 2
  90. if cuni_check <= 90:
  91. will_cost = (cuni_check + will_calc)/10
  92. else
  93. will_cost = (100 + will_calc)/10
  94. end
  95. killvar 'cuni_check'
  96. end
  97. if $ARGS[0] = 'sex':
  98. gs 'willpower', 'calc'
  99. will_cost = 0
  100. if stat['vaginal'] <= 90:
  101. will_cost = (stat['vaginal'] + will_calc)/10
  102. else
  103. will_cost = (100 + will_calc)/10
  104. end
  105. end
  106. if $ARGS[0] = 'anal':
  107. gs 'willpower', 'calc'
  108. will_cost = 0
  109. if missCum >= timeTresh: will_calc += 100
  110. if stat['anal'] <= 90:
  111. will_cost = (stat['anal'] + will_calc)/10
  112. else
  113. will_cost = (100 + will_calc)/10
  114. end
  115. end
  116. if $ARGS[0] = 'gangbang':
  117. gs 'willpower', 'calc'
  118. will_cost = 0
  119. if missCum >= timeTresh: will_calc += 100
  120. if stat['group'] <= 90:
  121. will_cost = (stat['group'] + will_calc)/10
  122. else
  123. will_cost = (100 + will_calc)/10
  124. end
  125. end
  126. if $ARGS[0] = 'prostitution':
  127. gs 'willpower', 'calc'
  128. will_cost = 0
  129. if missCum >= timeTresh: will_calc += 100
  130. prost_will = pav_prostitute + city_prostitute + oldtown_prostitute + village_prostitute
  131. if prost_will <= 90:
  132. will_cost = (prost_will + will_calc)/10
  133. else
  134. will_cost = (100 + will_calc)/10
  135. end
  136. end
  137. if $ARGS[0] = 'swallow':
  138. gs 'willpower', 'calc'
  139. will_cost = 0
  140. if trt_cumeater = 1 or cumloc[12] > 0:
  141. will_cost = (100 + will_calc)/10
  142. else
  143. will_cost = (10 + will_calc)/10
  144. end
  145. end
  146. !! no stat for this currently so just a baseline figure and reduction if cum already inside
  147. if $ARGS[0] = 'cum_inside':
  148. gs 'willpower', 'calc'
  149. will_cost = 0
  150. if missCum >= timeTresh: will_calc += 100
  151. if cumloc[0] <= 0:
  152. will_cost = (10 + will_calc)/10
  153. else
  154. will_cost = (100 + will_calc)/10
  155. end
  156. end
  157. !! requires the skill to be named with the _lvl postfix
  158. if $ARGS[0] = 'skill':
  159. gs 'willpower', 'calc'
  160. will_cost = 0
  161. if $ARGS[0] = 'inhib_lvl':
  162. will_cost = (pcs_inhib + will_calc)/10
  163. else
  164. dynamic 'will_cost = <<$ARGS[1]>> + will_calc)/10'
  165. end
  166. end
  167. if $ARGS[0] = 'rape':
  168. gs 'willpower', 'calc'
  169. will_cost = 0
  170. if missCum >= timeTresh: will_calc += 100
  171. if rape = 0:
  172. will_cost = (5 + will_calc)/10
  173. else
  174. will_cost = (100 + rape + will_calc)/10
  175. end
  176. end
  177. if $ARGS[0] = 'drink':
  178. gs 'willpower', 'calc'
  179. will_cost = 0
  180. if alko > 10:
  181. will_cost = (40 + will_calc)/10
  182. elseif alko > 6:
  183. will_cost = (100 + will_calc)/10
  184. elseif alko > 3:
  185. will_cost = (80 + will_calc)/10
  186. else
  187. will_cost = (10 + will_calc)/10
  188. end
  189. end
  190. !!Drug needs already included in the will_calc so just a small base cost here
  191. if $ARGS[0] = 'drugs':
  192. gs 'willpower', 'calc'
  193. will_cost = 0
  194. will_cost = (20 + will_calc)/10
  195. end
  196. !!There is no related stat so just a base cost of 6
  197. if $ARGS[0] = 'crime':
  198. gs 'willpower', 'calc'
  199. will_cost = 0
  200. will_cost = (60 + will_calc)/10
  201. end
  202. if $ARGS[0] = 'exhib':
  203. gs 'willpower', 'calc'
  204. will_cost = 0
  205. if Exhibitionist_lvl = 3:
  206. will_cost = (0 + will_calc)/10
  207. elseif Exhibitionist_lvl = 2:
  208. will_cost = (1 + will_calc)/10
  209. elseif Exhibitionist_lvl = 1:
  210. will_cost = (2 + will_calc)/10
  211. elseif pcs_inhib > 70:
  212. will_cost = (3 + will_calc)/10
  213. else
  214. will_cost = (pcs_inhib + will_calc)/10
  215. end
  216. end
  217. !!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
  218. if $ARGS[0] = 'sleep':
  219. gs 'willpower', 'calc'
  220. will_cost = 0
  221. if pcs_sleep <= 5: will_cost = will_calc/10
  222. end
  223. !!modifiers for drink an drugs
  224. if $ARGS[0] = 'dnd':
  225. will_dnd = 0
  226. if alko > 10:
  227. will_dnd += 80
  228. elseif alko > 6:
  229. will_dnd += 40
  230. elseif alko > 3:
  231. will_dnd += 20
  232. end
  233. !!cigarettes
  234. if smokerNeed > 10: will_dnd += 10
  235. !!weed
  236. if jointhigh > 0: will_dnd -= 10
  237. !!amphetamines
  238. if amphWithdrawl > 2:
  239. will_dnd += 40
  240. elseif amphHigh > 0:
  241. will_dnd += 60
  242. end
  243. !!heroine
  244. if SLomka > 0:
  245. will_dnd += 80
  246. elseif StrongNarkota > 0:
  247. will_dnd += 50
  248. end
  249. !!cocaine
  250. if narkoman = 1:
  251. will_dnd += 40
  252. elseif nark < 0:
  253. will_dnd -= 20
  254. end
  255. end
  256. if $ARGS[0] = 'resist': pcs_willpwr -= will_cost
  257. if $ARGS[0] = 'force':
  258. pcs_willpwr -= will_cost
  259. will_counter += 1
  260. if will_counter > 10: pcs_will += 1
  261. end
  262. --- willpower ---------------------------------