1
0

willpower.qsrc 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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] = 'humiliation':
  138. gs 'willpower', 'calc'
  139. will_cost = 0
  140. if missCum >= timeTresh: will_calc += 100
  141. if stat['humiliation'] <= 90:
  142. will_cost = (stat['humiliation'] + will_calc)/10
  143. else
  144. will_cost = (100 + will_calc)/10
  145. end
  146. end
  147. if $ARGS[0] = 'swallow':
  148. gs 'willpower', 'calc'
  149. will_cost = 0
  150. if trt_cumeater = 1 or cumloc[12] > 0:
  151. will_cost = (100 + will_calc)/10
  152. else
  153. will_cost = (10 + will_calc)/10
  154. end
  155. end
  156. !! no stat for this currently so just a baseline figure and reduction if cum already inside
  157. if $ARGS[0] = 'cum_inside':
  158. gs 'willpower', 'calc'
  159. will_cost = 0
  160. if missCum >= timeTresh: will_calc += 100
  161. if cumloc[0] <= 0:
  162. will_cost = (10 + will_calc)/10
  163. else
  164. will_cost = (100 + will_calc)/10
  165. end
  166. end
  167. !! requires the skill to be named with the _lvl postfix
  168. if $ARGS[0] = 'skill':
  169. gs 'willpower', 'calc'
  170. will_cost = 0
  171. if $ARGS[0] = 'inhib_lvl':
  172. will_cost = (pcs_inhib + will_calc)/10
  173. else
  174. dynamic 'will_cost = <<$ARGS[1]>> + will_calc)/10'
  175. end
  176. end
  177. if $ARGS[0] = 'rape':
  178. gs 'willpower', 'calc'
  179. will_cost = 0
  180. if missCum >= timeTresh: will_calc += 100
  181. if rape = 0:
  182. will_cost = (5 + will_calc)/10
  183. else
  184. will_cost = (100 + rape + will_calc)/10
  185. end
  186. end
  187. if $ARGS[0] = 'drink':
  188. gs 'willpower', 'calc'
  189. will_cost = 0
  190. if alko > 10:
  191. will_cost = (40 + will_calc)/10
  192. elseif alko > 6:
  193. will_cost = (100 + will_calc)/10
  194. elseif alko > 3:
  195. will_cost = (80 + will_calc)/10
  196. else
  197. will_cost = (10 + will_calc)/10
  198. end
  199. end
  200. !!Drug needs already included in the will_calc so just a small base cost here
  201. if $ARGS[0] = 'drugs':
  202. gs 'willpower', 'calc'
  203. will_cost = 0
  204. will_cost = (20 + will_calc)/10
  205. end
  206. !!There is no related stat so just a base cost of 6
  207. if $ARGS[0] = 'crime':
  208. gs 'willpower', 'calc'
  209. will_cost = 0
  210. will_cost = (60 + will_calc)/10
  211. end
  212. if $ARGS[0] = 'exhib':
  213. gs 'willpower', 'calc'
  214. will_cost = 0
  215. if Exhibitionist_lvl = 3:
  216. will_cost = (0 + will_calc)/10
  217. elseif Exhibitionist_lvl = 2:
  218. will_cost = (1 + will_calc)/10
  219. elseif Exhibitionist_lvl = 1:
  220. will_cost = (2 + will_calc)/10
  221. elseif pcs_inhib > 70:
  222. will_cost = (3 + will_calc)/10
  223. else
  224. will_cost = (pcs_inhib + will_calc)/10
  225. end
  226. end
  227. !!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
  228. if $ARGS[0] = 'sleep':
  229. gs 'willpower', 'calc'
  230. will_cost = 0
  231. if pcs_sleep <= 5: will_cost = will_calc/10
  232. end
  233. !!modifiers for drink an drugs
  234. if $ARGS[0] = 'dnd':
  235. will_dnd = 0
  236. if alko > 10:
  237. will_dnd += 80
  238. elseif alko > 6:
  239. will_dnd += 40
  240. elseif alko > 3:
  241. will_dnd += 20
  242. end
  243. !!cigarettes
  244. if smokerNeed > 10: will_dnd += 10
  245. !!weed
  246. if jointhigh > 0: will_dnd -= 10
  247. !!amphetamines
  248. if amphWithdrawl > 2:
  249. will_dnd += 40
  250. elseif amphHigh > 0:
  251. will_dnd += 60
  252. end
  253. !!heroine
  254. if SLomka > 0:
  255. will_dnd += 80
  256. elseif StrongNarkota > 0:
  257. will_dnd += 50
  258. end
  259. !!cocaine
  260. if narkoman = 1:
  261. will_dnd += 40
  262. elseif nark < 0:
  263. will_dnd -= 20
  264. end
  265. end
  266. if $ARGS[0] = 'resist': pcs_willpwr -= will_cost
  267. if $ARGS[0] = 'force':
  268. pcs_willpwr -= will_cost
  269. will_counter += 1
  270. if will_counter > 10: pcs_will += 1
  271. end
  272. --- willpower ---------------------------------