willpower.tw 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944
  1. :: willpower[include]
  2. <<set $here = 'willpower'>>
  3. <<set $ARGS = $location_var[$here]>>
  4. <!-- !!To use it call it with gs 'willpower', 'action', 'type'-->
  5. <!-- !!Action: Determines what action sveta is resisting, forcing somebody to do or forcing herself to do-->
  6. <!-- !!List of actions:-->
  7. <!-- !! 'voyeur', 'flash', 'mast', 'hj', 'bj', 'cuni', 'sex', 'anal', 'group', 'gangbang', 'prostitution', 'swallow', 'cum_inside', 'cum_inside_anal', 'rape',-->
  8. <!-- !! 'kiss', 'humiliation', 'footjob', 'titjob', 'trib', 'rimming', 'BDSM', 'pee', 'cum_outside', 'drink', 'drugs', 'crime', 'exhib', 'sleep', 'chore'-->
  9. <!-- !! there is also 'foreplay' for things like touching and fondling-->
  10. <!-- !! and two special cases 'misc' and 'skill'-->
  11. <!-- !! 'chore' is meant to be used for menial tasks that should not greatly affect willpower max, only drain from the pool-->
  12. <!-- !!Type: Determines what kind of willpower check sveta needs to do ('resist', 'force', 'self').-->
  13. <!-- !! -'resist' is used if sveta is resisting to do the 'action' somebody else wants her to do.-->
  14. <!-- !! -'force' is used if sveta forces somebody else to do the 'action'.-->
  15. <!-- !! -'self' should be used if sveta forces herself to do the 'action' (this should be used only in rare occasions)-->
  16. <!-- !!Example 1: Sveta is forcing somebody to perform a blowjob: gs 'willpower', 'bj', 'force'-->
  17. <!-- !!Example 2: Sveta is resisting doing drugs: gs 'willpower', 'drugs', 'resist'-->
  18. <!-- !!You can modify the difficulty of the check with adding an additional argument at the end. You can either add an 'easy' or a 'hard' to modify the difficulty.-->
  19. <!-- !!Example 1: Sveta is resisting doing drugs, a weak outcast is pressuring her to use them: gs 'willpower', 'drugs', 'resist', 'easy'-->
  20. <!-- !!Example 2: Sveta is resisting doing drugs, a group of gopniks are pressuring her to use them: gs 'willpower', 'drugs', 'resist', 'hard'-->
  21. <!-- !!There are two special cases: 'misc' and 'skill'-->
  22. <!-- !!'skill': Bridging a gap in skill for doing something, for succeeding when not quite meeting the required skill/attribute: gs 'willpower', '<skill>_lvl'-->
  23. <!-- !!Example for 'skill': gs 'willpower', 'skill', 'resist', 'pcs_makupskl_lvl' for a willpower check regarding something with pcs_makupskl_lvl (you can also apply 'easy' or 'hard' difficulty to a skill check)-->
  24. <!-- !!'misc': Use this 'action' if no other 'action' fits the scene. You can set three difficulty levels for this check 'easy', 'medium', 'hard' (Difficulty is only for 'misc' checks)-->
  25. <!-- !!To call 'misc' do the following: gs 'willpower', 'misc', 'type', 'difficulty'-->
  26. <!-- !!Example 1 for 'misc': Sveta wants to bring herself to slap a weak looking nerd: gs 'willpower', 'misc', 'self', 'easy'-->
  27. <!-- !!Example 2 for 'misc': Sveta wants to force Artem to go to Vitek and call him an asshole: gs 'willpower', 'misc', 'force', 'hard'-->
  28. <!-- !!After Sveta has taken the willpower action the cost must be paid with: gs 'willpower', 'pay', 'type'-->
  29. <!-- !!Example: Sveta has to pay for resisting to do a blowjob: gs 'willpower', 'pay', 'resist'-->
  30. <!-- !!WARNING: When adding new options include gs 'willpower', 'difficulty', '<<$ARGS[2]>>' at the end of the ARGS to apply easy or hard.-->
  31. <!-- !!WARNING: If you have two or more actions that need willpower at the same time, you have to recalculate the willpower cost before the costs are payed (see Code Example 2)-->
  32. <!-- !{ Code Example 1 (one action needs willpower)
  33. gs 'willpower', 'misc', 'self', 'hard'
  34. if will_cost <= willpower:
  35. act 'Kick him in the balls (<<will_cost>> Willpower)':
  36. gs 'willpower', 'pay', 'self'
  37. 'Event text'
  38. act 'Next action': gt 'farawayistan'
  39. end
  40. else
  41. act 'Kick him in the balls (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don't have enough willpower to use this action.</font>'
  42. end
  43. } -->
  44. <!-- !{ Code Example 2 (several actions need willpower)
  45. gs 'willpower', 'misc', 'self', 'hard'
  46. if will_cost <= willpower:
  47. act 'Kick him in the balls (<<will_cost>> Willpower)':
  48. gs 'willpower', 'misc', 'self', 'hard' <- recalculate the willpower cost here
  49. gs 'willpower', 'pay', 'self'
  50. 'Event text'
  51. act 'Next action': gt 'farawayistan'
  52. end
  53. else
  54. act 'Kick him in the balls (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don't have enough willpower to use this action.</font>'
  55. end
  56. gs 'willpower', 'misc', 'self', 'medium'
  57. if will_cost <= willpower:
  58. act 'Slap him across the face (<<will_cost>> Willpower)':
  59. gs 'willpower', 'misc', 'self', 'medium' <- recalculate the willpower cost here
  60. gs 'willpower', 'pay', 'self'
  61. 'Event text'
  62. act 'Next action': gt 'farawayistan'
  63. end
  64. else
  65. act 'Slap him across the face (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don't have enough willpower to use this action.</font>'
  66. end
  67. } -->
  68. <<switch $location_var[$here][0]>>
  69. <<case 'cost'>>
  70. <<if typeof $location_var[$here][1] == 'object'>>
  71. <<gs $here $location_var[$here][1][0] $location_var[$here][1][1] $location_var[$here][1][2] $location_var[$here][1][3]>>
  72. <<else>>
  73. <<gs $here $location_var[$here][1] $location_var[$here][2] $location_var[$here][3] $location_var[$here][4]>>
  74. <</if>>
  75. <<set $result = Math.round($will_cost)>>
  76. <<case 'calc'>>
  77. <<gs 'willpower' 'dnd'>>
  78. <<set $will_calc = $will_dnd>>
  79. <!-- !!fatigue-->
  80. <<if $pc.pcs_sleep < 5>>
  81. <<set $will_calc += 50>>
  82. <<elseif $pc.pcs_sleep < 10>>
  83. <<set $will_calc += 25>>
  84. <<elseif $pc.pcs_sleep < 20>>
  85. <<set $will_calc += 10>>
  86. <<elseif $pc.pcs_sleep < 30>>
  87. <<set $will_calc += 5>>
  88. <</if>>
  89. <!-- !!exhaustion (stamina)-->
  90. <<if $pc.pcs_stam <= 0>>
  91. <<set $will_calc += 10>>
  92. <<elseif $pc.pcs_stam < $pc.stammax / 5>>
  93. <<set $will_calc += 5>>
  94. <</if>>
  95. <!-- !!hunger-->
  96. <<if $pc.pcs_energy < 5>>
  97. <<set $will_calc += 50>>
  98. <<elseif $pc.pcs_energy < 10>>
  99. <<set $will_calc += 25>>
  100. <<elseif $pc.pcs_energy < 20>>
  101. <<set $will_calc += 10>>
  102. <<elseif $pc.pcs_energy < 30>>
  103. <<set $will_calc += 5>>
  104. <</if>>
  105. <!-- !!thirst-->
  106. <<if $pc.pcs_hydra < 5>>
  107. <<set $will_calc += 50>>
  108. <<elseif $pc.pcs_hydra < 10>>
  109. <<set $will_calc += 25>>
  110. <<elseif $pc.pcs_hydra < 20>>
  111. <<set $will_calc += 10>>
  112. <<elseif $pc.pcs_hydra < 30>>
  113. <<set $will_calc += 5>>
  114. <</if>>
  115. <!-- !!Bad syphilis, you is mental-->
  116. <<if getvar("$Sifilis") >= 50>>
  117. <<setn $will_calc += 100>>
  118. <</if>>
  119. <!-- !!feeling sick-->
  120. <<if getvar("$sick") > 72>>
  121. <<set $will_calc += 35>>
  122. <<elseif getvar("$sick") > 48>>
  123. <<set $will_calc += 20>>
  124. <<elseif getvar("$sick") > 24>>
  125. <<set $will_calc += 10>>
  126. <<elseif getvar("$sick") > 1>>
  127. <<set $will_calc += 5>>
  128. <</if>>
  129. <<set $will_calc += $pc.painTotal>>
  130. <!-- !! Modifier becuse of arousal only used for sex acts-->
  131. <<set $will_arousal_mod = Math.max(Math.min(($pc.horny - 50)/2,25),-25)>>
  132. <<case 'voyeur'>>
  133. <<gs 'willpower' 'calc'>>
  134. <<if $location_var[$here][1] == 'self'>>
  135. <<if $pc.sexStat('voyeur') + $pc.sexStat('voyeur_sex') <= 90>>
  136. <<set $will_cost = (100 - $pc.sexStat('voyeur') - $pc.sexStat('voyeur_sex') + $will_calc - $will_arousal_mod) / 10>>
  137. <<else>>
  138. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  139. <</if>>
  140. <<elseif $location_var[$here][1] == 'force'>>
  141. <<if $pc.sexStat('voyeur') + $pc.sexStat('voyeur_sex') <= 40>>
  142. <<set $will_cost = (110 - $will_enforced - $pc.sexStat('voyeur') - $pc.sexStat('voyeur_sex') + $will_calc - $will_arousal_mod) / 10>>
  143. <<else>>
  144. <<set $will_cost = (70 - $will_enforced + $will_calc - $will_arousal_mod) / 10>>
  145. <</if>>
  146. <<else>>
  147. <<if $pc.sexStat('voyeur') + $pc.sexStat('voyeur_sex') <= 90>>
  148. <<set $will_cost = (10 + $pc.sexStat('voyeur') + $pc.sexStat('voyeur_sex') + $will_calc + $will_arousal_mod) / 10>>
  149. <<else>>
  150. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  151. <</if>>
  152. <</if>>
  153. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  154. <<case 'flash'>>
  155. <<gs 'willpower' 'calc'>>
  156. <<if $location_var[$here][1] == 'self'>>
  157. <<if $pc.sexStat('flash') + ($pc.sexStat('flashlite') / 2) <= 90>>
  158. <<set $will_cost = (100 - $pc.sexStat('flash') - ($pc.sexStat('flashlite') / 2) + $will_calc - $will_arousal_mod) / 10>>
  159. <<else>>
  160. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  161. <</if>>
  162. <<elseif $location_var[$here][1] == 'force'>>
  163. <<if $pc.sexStat('flash') + ($pc.sexStat('flashlite') / 2) <= 40>>
  164. <<set $will_cost = (110 - $will_enforced - $pc.sexStat('flash') - ($pc.sexStat('flashlite') / 2) + $will_calc - $will_arousal_mod) / 10>>
  165. <<else>>
  166. <<set $will_cost = (70 - $will_enforced + $will_calc - $will_arousal_mod) / 10>>
  167. <</if>>
  168. <<else>>
  169. <<if $pc.sexStat('flash') + ($pc.sexStat('flashlite') / 2) <= 90>>
  170. <<set $will_cost = (10 + $pc.sexStat('flash') + ($pc.sexStat('flashlite') / 2) + $will_calc + $will_arousal_mod) / 10>>
  171. <<else>>
  172. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  173. <</if>>
  174. <</if>>
  175. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  176. <<case 'mast'>>
  177. <<gs 'willpower' 'calc'>>
  178. <<if $location_var[$here][1] == 'self'>>
  179. <<if $pc.sexStat('mast') <= 90>>
  180. <<set $will_cost = (100 - $pc.sexStat('mast') + $will_calc - $will_arousal_mod) / 10>>
  181. <<else>>
  182. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  183. <</if>>
  184. <<elseif $location_var[$here][1] == 'force'>>
  185. <<if $pc.sexStat('mast') <= 40>>
  186. <<set $will_cost = (110 - $will_enforced - $pc.sexStat('mast') + $will_calc - $will_arousal_mod) / 10>>
  187. <<else>>
  188. <<set $will_cost = (70 - $will_enforced + $will_calc - $will_arousal_mod) / 10>>
  189. <</if>>
  190. <<else>>
  191. <<if $pc.sexStat('mast') <= 90>>
  192. <<set $will_cost = (10 + $pc.sexStat('mast') + $will_calc + $will_arousal_mod) / 10>>
  193. <<else>>
  194. <<set $will_cost = (100 + $will_calc) / 10>>
  195. <</if>>
  196. <</if>>
  197. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  198. <<case 'hj'>>
  199. <<gs 'willpower' 'calc'>>
  200. <<if $location_var[$here][1] == 'self'>>
  201. <<if $missCum >= $timeTresh>>
  202. <<set $will_calc = 0>>
  203. <</if>>
  204. <<if $pc.sexStat('hj') <= 90>>
  205. <<set $will_cost = (100 - $pc.sexStat('hj') + $will_calc - $will_arousal_mod) / 10>>
  206. <<else>>
  207. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  208. <</if>>
  209. <<elseif $location_var[$here][1] == 'force'>>
  210. <<if $pc.sexStat('hj') <= 40>>
  211. <<set $will_cost = (110 - $will_enforced - $pc.sexStat('hj') + $will_calc - $will_arousal_mod) / 10>>
  212. <<else>>
  213. <<set $will_cost = (70 - $will_enforced + $will_calc - $will_arousal_mod) / 10>>
  214. <</if>>
  215. <<else>>
  216. <<if $missCum >= $timeTresh>>
  217. <<setn $will_calc += 100>>
  218. <</if>>
  219. <<if $pc.sexStat('hj') <= 90>>
  220. <<set $will_cost = (10 + $pc.sexStat('hj') + $will_calc + $will_arousal_mod) / 10>>
  221. <<else>>
  222. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  223. <</if>>
  224. <</if>>
  225. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  226. <<case 'bj'>>
  227. <<gs 'willpower' 'calc'>>
  228. <<if $location_var[$here][1] == 'self'>>
  229. <<if $missCum >= $timeTresh>>
  230. <<set $will_calc = 0>>
  231. <</if>>
  232. <<if $pc.sexStat('bj') <= 90>>
  233. <<set $will_cost = (100 - $pc.sexStat('bj') + $will_calc - $will_arousal_mod) / 10>>
  234. <<else>>
  235. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  236. <</if>>
  237. <<elseif $location_var[$here][1] == 'force'>>
  238. <<if $pc.sexStat('bj') <= 40>>
  239. <<set $will_cost = (110 - $will_enforced - $pc.sexStat('bj') + $will_calc - $will_arousal_mod) / 10>>
  240. <<else>>
  241. <<set $will_cost = (70 - $will_enforced + $will_calc - $will_arousal_mod) / 10>>
  242. <</if>>
  243. <<else>>
  244. <<if $missCum >= $timeTresh>>
  245. <<setn $will_calc += 100>>
  246. <</if>>
  247. <<if $pc.sexStat('bj') <= 90>>
  248. <<set $will_cost = (10 + $pc.sexStat('bj') + $will_calc + $will_arousal_mod) / 10>>
  249. <<else>>
  250. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  251. <</if>>
  252. <</if>>
  253. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  254. <<case 'cuni'>>
  255. <<gs 'willpower' 'calc'>>
  256. <<set $cuni_check = ($pc.sexStat('cuni') + $pc.sexStat('cuni_give')) / 2>>
  257. <<if $location_var[$here][1] == 'self'>>
  258. <<if getvar("$cuni_check") <= 90>>
  259. <<set $will_cost = (100 - $cuni_check + $will_calc - $will_arousal_mod) / 10>>
  260. <<else>>
  261. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  262. <</if>>
  263. <<elseif $location_var[$here][1] == 'force'>>
  264. <<if getvar("$cuni_check") <= 40>>
  265. <<set $will_cost = (110 - $will_enforced - $cuni_check + $will_calc - $will_arousal_mod) / 10>>
  266. <<else>>
  267. <<set $will_cost = (70 - $will_enforced + $will_calc - $will_arousal_mod) / 10>>
  268. <</if>>
  269. <<else>>
  270. <<if getvar("$cuni_check") <= 90>>
  271. <<set $will_cost = (10 + $cuni_check + $will_calc + $will_arousal_mod) / 10>>
  272. <<else>>
  273. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  274. <</if>>
  275. <</if>>
  276. <<set $cuni_check to null>>
  277. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  278. <<case 'sex' 'vaginal'>>
  279. <<gs 'willpower' 'calc'>>
  280. <<if $location_var[$here][1] == 'self'>>
  281. <<if $missCum >= $timeTresh>>
  282. <<set $will_calc = 0>>
  283. <</if>>
  284. <<if $pc.sexStat('vaginal') <= 90>>
  285. <<set $will_cost = (100 - $pc.sexStat('vaginal') + $will_calc - $will_arousal_mod) / 10>>
  286. <<else>>
  287. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  288. <</if>>
  289. <<elseif $location_var[$here][1] == 'force'>>
  290. <<if $pc.sexStat('vaginal') <= 40>>
  291. <<set $will_cost = (110 - $will_enforced - $pc.sexStat('vaginal') + $will_calc - $will_arousal_mod) / 10>>
  292. <<else>>
  293. <<set $will_cost = (70 - $will_enforced + $will_calc - $will_arousal_mod) / 10>>
  294. <</if>>
  295. <<else>>
  296. <<if $missCum >= $timeTresh>>
  297. <<setn $will_calc += 100>>
  298. <</if>>
  299. <<if $pc.sexStat('vaginal') <= 90>>
  300. <<set $will_cost = (10 + $pc.sexStat('vaginal') + $will_calc + $will_arousal_mod) / 10>>
  301. <<else>>
  302. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  303. <</if>>
  304. <</if>>
  305. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  306. <<case 'anal'>>
  307. <<gs 'willpower' 'calc'>>
  308. <<if $location_var[$here][1] == 'self'>>
  309. <<if $missCum >= $timeTresh>>
  310. <<set $will_calc = 0>>
  311. <</if>>
  312. <<if $pc.sexStat('anal') <= 90>>
  313. <<set $will_cost = (100 - $pc.sexStat('anal') + $will_calc - $will_arousal_mod) / 10>>
  314. <<else>>
  315. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  316. <</if>>
  317. <<elseif $location_var[$here][1] == 'force'>>
  318. <<if $pc.sexStat('anal') <= 40>>
  319. <<set $will_cost = (160 - $will_enforced * 2 - $pc.sexStat('anal') + $will_calc - $will_arousal_mod) / 10>>
  320. <<else>>
  321. <<set $will_cost = (120 - $will_enforced * 2 + $will_calc - $will_arousal_mod) / 10>>
  322. <</if>>
  323. <<else>>
  324. <<if $missCum >= $timeTresh>>
  325. <<setn $will_calc += 100>>
  326. <</if>>
  327. <<if $pc.sexStat('anal') <= 90>>
  328. <<set $will_cost = (10 + $pc.sexStat('anal') + $will_calc + $will_arousal_mod) / 10>>
  329. <<else>>
  330. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  331. <</if>>
  332. <</if>>
  333. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  334. <<case 'gangbang' 'group'>>
  335. <<gs 'willpower' 'calc'>>
  336. <<if $location_var[$here][1] == 'self'>>
  337. <<if $missCum >= $timeTresh>>
  338. <<set $will_calc = 0>>
  339. <</if>>
  340. <<if getvar("$gang") <= 90>>
  341. <<set $will_cost = (100 - $gang + $will_calc - $will_arousal_mod) / 10>>
  342. <<else>>
  343. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  344. <</if>>
  345. <<elseif $location_var[$here][1] == 'force'>>
  346. <<if getvar("$gang") <= 40>>
  347. <<set $will_cost = (160 - $will_enforced * 2 - $gang + $will_calc - $will_arousal_mod) / 10>>
  348. <<else>>
  349. <<set $will_cost = (120 - $will_enforced * 2 + $will_calc - $will_arousal_mod) / 10>>
  350. <</if>>
  351. <<else>>
  352. <<if $missCum >= $timeTresh>>
  353. <<setn $will_calc += 100>>
  354. <</if>>
  355. <<if getvar("$gang") <= 90>>
  356. <<set $will_cost = (10 + $gang + $will_calc + $will_arousal_mod) / 10>>
  357. <<else>>
  358. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  359. <</if>>
  360. <</if>>
  361. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  362. <<case 'prostitution'>>
  363. <<gs 'willpower' 'calc'>>
  364. <<if $location_var[$here][1] == 'self'>>
  365. <<if $missCum >= $timeTresh>>
  366. <<set $will_calc = 0>>
  367. <</if>>
  368. <<if getvar("$slutty") <= 90>>
  369. <<set $will_cost = (100 - $slutty + $will_calc - $will_arousal_mod) / 10>>
  370. <<else>>
  371. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  372. <</if>>
  373. <<elseif $location_var[$here][1] == 'force'>>
  374. <<if getvar("$slutty") <= 40>>
  375. <<set $will_cost = (160 - $will_enforced * 2 - $slutty + $will_calc - $will_arousal_mod) / 10>>
  376. <<else>>
  377. <<set $will_cost = (120 - $will_enforced * 2 + $will_calc - $will_arousal_mod) / 10>>
  378. <</if>>
  379. <<else>>
  380. <<if $missCum >= $timeTresh>>
  381. <<setn $will_calc += 100>>
  382. <</if>>
  383. <<set $prost_will = $pc.fame('pav_prostitute') + $pc.fame('city_prostitute') + $pc.fame('pushkin_prostitute') + $pc.fame('village_prostitute') + $slutty / 2>>
  384. <<if getvar("$prost_will") <= 90>>
  385. <<set $will_cost = (10 + $prost_will + $will_calc + $will_arousal_mod) / 10>>
  386. <<else>>
  387. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  388. <</if>>
  389. <<set $prost_will to null>>
  390. <</if>>
  391. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  392. <<case 'humiliation'>>
  393. <<gs 'willpower' 'calc'>>
  394. <<if $location_var[$here][1] == 'self'>>
  395. <<if $missCum >= $timeTresh>>
  396. <<set $will_calc = 0>>
  397. <</if>>
  398. <<if $pc.sexStat('humiliation') <= 90>>
  399. <<set $will_cost = (100 - $pc.sexStat('humiliation') + $will_calc - $will_arousal_mod) / 10>>
  400. <<else>>
  401. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  402. <</if>>
  403. <<elseif $location_var[$here][1] == 'force'>>
  404. <<set $will_cost = (120 - $will_enforced * 2 + $will_calc - $will_arousal_mod) / 10>>
  405. <<else>>
  406. <<if $missCum >= $timeTresh>>
  407. <<setn $will_calc += 100>>
  408. <</if>>
  409. <<if $pc.sexStat('humiliation') <= 90>>
  410. <<set $will_cost = (10 + $pc.sexStat('humiliation') + $will_calc + $will_arousal_mod) / 10>>
  411. <<else>>
  412. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  413. <</if>>
  414. <</if>>
  415. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  416. <<case 'footjob'>>
  417. <<gs 'willpower' 'calc'>>
  418. <<if $location_var[$here][1] == 'self'>>
  419. <<if $pc.sexStat('footjob') <= 90>>
  420. <<set $will_cost = (100 - $pc.sexStat('footjob') + $will_calc - $will_arousal_mod) / 10>>
  421. <<else>>
  422. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  423. <</if>>
  424. <<elseif $location_var[$here][1] == 'force'>>
  425. <<if $pc.sexStat('footjob') <= 40>>
  426. <<set $will_cost = (110 - $will_enforced - $pc.sexStat('footjob') + $will_calc - $will_arousal_mod) / 10>>
  427. <<else>>
  428. <<set $will_cost = (70 - $will_enforced + $will_calc - $will_arousal_mod) / 10>>
  429. <</if>>
  430. <<else>>
  431. <<if $pc.sexStat('footjob') <= 90>>
  432. <<set $will_cost = (10 + $pc.sexStat('footjob') + $will_calc + $will_arousal_mod) / 10>>
  433. <<else>>
  434. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  435. <</if>>
  436. <</if>>
  437. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  438. <<case 'titjob'>>
  439. <<gs 'willpower' 'calc'>>
  440. <<if $location_var[$here][1] == 'self'>>
  441. <<if $pc.sexStat('titjob') <= 90>>
  442. <<set $will_cost = (100 - $pc.sexStat('titjob') + $will_calc - $will_arousal_mod) / 10>>
  443. <<else>>
  444. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  445. <</if>>
  446. <<elseif $location_var[$here][1] == 'force'>>
  447. <<if $pc.sexStat('titjob') <= 40>>
  448. <<set $will_cost = (110 - $will_enforced - $pc.sexStat('titjob') + $will_calc - $will_arousal_mod) / 10>>
  449. <<else>>
  450. <<set $will_cost = (70 - $will_enforced + $will_calc - $will_arousal_mod) / 10>>
  451. <</if>>
  452. <<else>>
  453. <<if $pc.sexStat('titjob') <= 90>>
  454. <<set $will_cost = (10 + $pc.sexStat('titjob') + $will_calc + $will_arousal_mod) / 10>>
  455. <<else>>
  456. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  457. <</if>>
  458. <</if>>
  459. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  460. <<case 'trib'>>
  461. <<gs 'willpower' 'calc'>>
  462. <<if $location_var[$here][1] == 'self'>>
  463. <<if $pc.sexStat('trib') <= 90>>
  464. <<set $will_cost = (100 - $pc.sexStat('trib') + $will_calc - $will_arousal_mod) / 10>>
  465. <<else>>
  466. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  467. <</if>>
  468. <<elseif $location_var[$here][1] == 'force'>>
  469. <<if $pc.sexStat('trib') <= 40>>
  470. <<set $will_cost = (110 - $will_enforced - $pc.sexStat('trib') + $will_calc - $will_arousal_mod) / 10>>
  471. <<else>>
  472. <<set $will_cost = (70 - $will_enforced + $will_calc - $will_arousal_mod) / 10>>
  473. <</if>>
  474. <<else>>
  475. <<if $pc.sexStat('trib') <= 90>>
  476. <<set $will_cost = (10 + $pc.sexStat('trib') + $will_calc + $will_arousal_mod) / 10>>
  477. <<else>>
  478. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  479. <</if>>
  480. <</if>>
  481. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  482. <<case 'rimming'>>
  483. <<gs 'willpower' 'calc'>>
  484. <<set $rimming_check = ($pc.sexStat('rimming') + $pc.sexStat('rimming_give')) / 2>>
  485. <<if $location_var[$here][1] == 'self'>>
  486. <<if getvar("$rimming_check") <= 90>>
  487. <<set $will_cost = (100 - $rimming_check + $will_calc - $will_arousal_mod) / 10>>
  488. <<else>>
  489. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  490. <</if>>
  491. <<elseif $location_var[$here][1] == 'force'>>
  492. <<if getvar("$rimming_check") <= 40>>
  493. <<set $will_cost = (110 - $will_enforced - $rimming_check + $will_calc - $will_arousal_mod) / 10>>
  494. <<else>>
  495. <<set $will_cost = (70 - $will_enforced + $will_calc - $will_arousal_mod) / 10>>
  496. <</if>>
  497. <<else>>
  498. <<if getvar("$rimming_check") <= 90>>
  499. <<set $will_cost = (10 + $rimming_check + $will_calc + $will_arousal_mod) / 10>>
  500. <<else>>
  501. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  502. <</if>>
  503. <</if>>
  504. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  505. <<case 'BDSM'>>
  506. <<gs 'willpower' 'calc'>>
  507. <!-- ! It seems to me like 'force' should strictly be BDSM_give, and resist strictly BDSM.-->
  508. <!-- !bdsm_check = (stat['BDSM'] + stat['BDSM_give']) / 2-->
  509. <!-- ! Also, this category could benifit from sum, dom, maso, bound inclusion in some way-->
  510. <!-- !bdsm_exp = (maso['exp'] + bound['exp'] + sub['exp'] + maso['exp'])/4-->
  511. <<if $location_var[$here][1] == 'self'>>
  512. <<if ($pc.sexStat('BDSM') + $pc.sexStat('BDSM_give')) / 2 <= 90>>
  513. <<set $will_cost = (100 - (($pc.sexStat('BDSM') + $pc.sexStat('BDSM_give')) / 2) + $will_calc - $will_arousal_mod) / 10>>
  514. <<else>>
  515. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  516. <</if>>
  517. <<elseif $location_var[$here][1] == 'force'>>
  518. <<if $pc.sexStat('BDSM_give') <= 40>>
  519. <<set $will_cost = (160 - $will_enforced - $pc.sexStat('BDSM_give') + $will_calc - $will_arousal_mod) / 10>>
  520. <<else>>
  521. <<set $will_cost = (120 - $will_enforced + $will_calc - $will_arousal_mod) / 10>>
  522. <</if>>
  523. <<else>>
  524. <<if $pc.sexStat('BDSM') <= 90>>
  525. <<set $will_cost = (10 + $pc.sexStat('BDSM') + $will_calc + $will_arousal_mod) / 10>>
  526. <<else>>
  527. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  528. <</if>>
  529. <</if>>
  530. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  531. <<case 'cum_outside'>>
  532. <<gs 'willpower' 'calc'>>
  533. <!-- ! I'm including internal stats, since it makes sense those would influence Sveta''s willingness to being cum on-->
  534. <<set $cum_check = facial + frot + (swallow) + ($pcs_cp_safe_known + $pcs_cp_notsafe_known + $pcs_cp_risky_known) + (pcs_acp_known)>>
  535. <<if $location_var[$here][1] == 'self'>>
  536. <<if $missCum >= $timeTresh>>
  537. <<set $will_calc = 0>>
  538. <</if>>
  539. <<if $pc.cumAtLocation(1) + $pc.cumAtLocation(2) + $pc.cumAtLocation(4) + $pc.cumAtLocation(5) + $pc.cumAtLocation(6) + $pc.cumAtLocation(7) + $pc.cumAtLocation(8) + $pc.cumAtLocation(9) + $pc.cumAtLocation(10) + $pc.cumAtLocation(11) + $pc.cumAtLocation(13) + $pc.cumAtLocation(14) + $pc.cumAtLocation(15) + $pc.cumAtLocation(16) > 0 or getvar("$cum_check") > 90>>
  540. <<set $will_cost = (10 + $cum_check + $will_calc - $will_arousal_mod) / 10>>
  541. <<else>>
  542. <<set $will_cost = (100 + $will_calc - $will_arousal_mod) / 10>>
  543. <</if>>
  544. <<elseif $location_var[$here][1] == 'force'>>
  545. <<set $will_cost = (120 - $will_enforced * 2 + $will_calc - $will_arousal_mod) / 10>>
  546. <<else>>
  547. <<if $missCum >= $timeTresh>>
  548. <<setn $will_calc += 100>>
  549. <</if>>
  550. <<if $pc.cumAtLocation(1) + $pc.cumAtLocation(2) + $pc.cumAtLocation(4) + $pc.cumAtLocation(5) + $pc.cumAtLocation(6) + $pc.cumAtLocation(7) + $pc.cumAtLocation(8) + $pc.cumAtLocation(9) + $pc.cumAtLocation(10) + $pc.cumAtLocation(11) + $pc.cumAtLocation(13) + $pc.cumAtLocation(14) + $pc.cumAtLocation(15) + $pc.cumAtLocation(16) > 0 or getvar("$cum_check") > 90>>
  551. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  552. <<else>>
  553. <<set $will_cost = (10 + $cum_check + $will_calc + $will_arousal_mod) / 10>>
  554. <</if>>
  555. <</if>>
  556. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  557. <<case 'swallow'>>
  558. <<gs 'willpower' 'calc'>>
  559. <<if $location_var[$here][1] == 'self'>>
  560. <<if $missCum >= $timeTresh>>
  561. <<set $will_calc = 0>>
  562. <</if>>
  563. <<if $pc.trait('cumeater') == 1 or $pc.cumAtLocation(12) > 0>>
  564. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  565. <<else>>
  566. <<set $will_cost = (100 + $will_calc - $will_arousal_mod) / 10>>
  567. <</if>>
  568. <<elseif $location_var[$here][1] == 'force'>>
  569. <<set $will_cost = (80 - $will_enforced - $pc.trait('cumeater') * 10 + $will_calc - $will_arousal_mod) / 10>>
  570. <<else>>
  571. <<if $missCum >= $timeTresh>>
  572. <<setn $will_calc += 100>>
  573. <</if>>
  574. <<if $pc.trait('cumeater') == 1 or $pc.cumAtLocation(12) > 0>>
  575. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  576. <<else>>
  577. <<set $will_cost = (10 + $will_calc + $will_arousal_mod) / 10>>
  578. <</if>>
  579. <</if>>
  580. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  581. <<case 'cum_inside'>>
  582. <<gs 'willpower' 'calc'>>
  583. <<set $creampie_count = $pcs_cp_safe_known + $pcs_cp_notsafe_known + $pcs_cp_risky_known>>
  584. <<if $location_var[$here][1] == 'self'>>
  585. <<if $missCum >= $timeTresh>>
  586. <<set $will_calc = 0>>
  587. <</if>>
  588. <<if $pc.cumAtLocation(0) > 0 or getvar("$creampie_count") > 90>>
  589. <<set $will_cost = (10 + $creampie_count + $will_calc - $will_arousal_mod) / 10>>
  590. <<else>>
  591. <<set $will_cost = (100 + $will_calc - $will_arousal_mod) / 10>>
  592. <</if>>
  593. <<elseif $location_var[$here][1] == 'force'>>
  594. <<set $will_cost = (120 - $will_enforced * 2 + $will_calc - $will_arousal_mod) / 10>>
  595. <<else>>
  596. <<if $missCum >= $timeTresh>>
  597. <<setn $will_calc += 100>>
  598. <</if>>
  599. <<if $pc.cumAtLocation(0) > 0 or getvar("$creampie_count") > 90>>
  600. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  601. <<else>>
  602. <<set $will_cost = (10 + $creampie_count + $will_calc + $will_arousal_mod) / 10>>
  603. <</if>>
  604. <</if>>
  605. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  606. <<case 'cum_inside_anal'>>
  607. <<gs 'willpower' 'calc'>>
  608. <<if $location_var[$here][1] == 'self'>>
  609. <<if $missCum >= $timeTresh>>
  610. <<set $will_calc = 0>>
  611. <</if>>
  612. <<if $pc.cumAtLocation(3) > 0 or getvar("$pcs_acp_known") > 90>>
  613. <<set $will_cost = (10 + $pcs_acp_known + $will_calc - $will_arousal_mod) / 10>>
  614. <<else>>
  615. <<set $will_cost = (100 + $will_calc - $will_arousal_mod) / 10>>
  616. <</if>>
  617. <<elseif $location_var[$here][1] == 'force'>>
  618. <<set $will_cost = (120 - $will_enforced * 2 + $will_calc - $will_arousal_mod) / 10>>
  619. <<else>>
  620. <<if $missCum >= $timeTresh>>
  621. <<setn $will_calc += 100>>
  622. <</if>>
  623. <<if $pc.cumAtLocation(3) > 0 or getvar("$pcs_acp_known") > 90>>
  624. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  625. <<else>>
  626. <<set $will_cost = (10 + $pcs_acp_known + $will_calc + $will_arousal_mod) / 10>>
  627. <</if>>
  628. <</if>>
  629. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  630. <<case 'kiss'>>
  631. <<gs 'willpower' 'calc'>>
  632. <<if $location_var[$here][1] == 'self'>>
  633. <<if $pc.sexStat('kiss') <= 90>>
  634. <<set $will_cost = (100 - $pc.sexStat('kiss') + $will_calc - $will_arousal_mod) / 10>>
  635. <<else>>
  636. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  637. <</if>>
  638. <<elseif $location_var[$here][1] == 'force'>>
  639. <<if $pc.sexStat('kiss') <= 40>>
  640. <<set $will_cost = (110 - $will_enforced - $pc.sexStat('kiss') + $will_calc - $will_arousal_mod) / 10>>
  641. <<else>>
  642. <<set $will_cost = (70 - $will_enforced + $will_calc - $will_arousal_mod) / 10>>
  643. <</if>>
  644. <<else>>
  645. <<if $pc.sexStat('kiss') <= 90>>
  646. <<set $will_cost = (10 + $pc.sexStat('kiss') + $will_calc + $will_arousal_mod) / 10>>
  647. <<else>>
  648. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  649. <</if>>
  650. <</if>>
  651. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  652. <<case 'foreplay'>>
  653. <<gs 'willpower' 'calc'>>
  654. <<if $location_var[$here][1] == 'self'>>
  655. <<if ($pc.sexStat('foreplay') + stat['foreplay_give']) / 2>>
  656. <<set $will_cost = (100 - (($pc.sexStat('foreplay') + $pc.sexStat('foreplay_give')) / 2) + $will_calc - $will_arousal_mod) / 10>>
  657. <<else>>
  658. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  659. <</if>>
  660. <<elseif $location_var[$here][1] == 'force'>>
  661. <<if $pc.sexStat('foreplay_give') <= 40>>
  662. <<set $will_cost = (110 - $will_enforced - $pc.sexStat('foreplay_give') + $will_calc - $will_arousal_mod) / 10>>
  663. <<else>>
  664. <<set $will_cost = (70 - $will_enforced + $will_calc - $will_arousal_mod) / 10>>
  665. <</if>>
  666. <<else>>
  667. <<if $pc.sexStat('foreplay') <= 90>>
  668. <<set $will_cost = (10 + $pc.sexStat('foreplay') + $will_calc + $will_arousal_mod) / 10>>
  669. <<else>>
  670. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  671. <</if>>
  672. <</if>>
  673. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  674. <<case 'pee'>>
  675. <<gs 'willpower' 'calc'>>
  676. <!-- ! Same as with BDSM concerning 'force' and 'resist'-->
  677. <!-- !pee_check = (stat['pee'] + stat['pee_give']) / 2-->
  678. <<if $location_var[$here][1] == 'self'>>
  679. <<if ($pc.sexStat('pee') + $pc.sexStat('pee_give')) / 2 <= 90>>
  680. <<set $will_cost = (100 - (($pc.sexStat('pee') + $pc.sexStat('pee_give')) / 2) + $will_calc - $will_arousal_mod) / 10>>
  681. <<else>>
  682. <<set $will_cost = (10 + $will_calc - $will_arousal_mod) / 10>>
  683. <</if>>
  684. <<elseif $location_var[$here][1] == 'force'>>
  685. <<if $pc.sexStat('pee_give') <= 40>>
  686. <<set $will_cost = (160 - $will_enforced - $pc.sexStat('pee_give') + $will_calc - $will_arousal_mod) / 10>>
  687. <<else>>
  688. <<set $will_cost = (120 - $will_enforced + $will_calc - $will_arousal_mod) / 10>>
  689. <</if>>
  690. <<else>>
  691. <<if $pc.sexStat('pee') <= 90>>
  692. <<set $will_cost = (10 + $pc.sexStat('pee') + $will_calc + $will_arousal_mod) / 10>>
  693. <<else>>
  694. <<set $will_cost = (100 + $will_calc + $will_arousal_mod) / 10>>
  695. <</if>>
  696. <</if>>
  697. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  698. <<case 'skill'>>
  699. <!-- !! requires the skill to be named with the _lvl postfix-->
  700. <<gs 'willpower' 'calc'>>
  701. <<if $location_var[$here][1] == 'resist' or $location_var[$here][1] == 'force' or $location_var[$here][1] == 'self'>>
  702. <<if $location_var[$here][2] == 'inhib_lvl'>>
  703. <<set $will_cost = (100 - $pc.pcs_inhib + $will_calc) / 10>>
  704. <<else>>
  705. <<set $will_cost = (100 - $ARGS[2] + $will_calc)/10>>
  706. <</if>>
  707. <<gs 'willpower' 'difficulty' '$ARGS[3]'>>
  708. <<else>>
  709. <<if $location_var[$here][1] == 'inhib_lvl'>>
  710. <<set $will_cost = (100 - $pc.pcs_inhib + $will_calc) / 10>>
  711. <<else>>
  712. <<set will_cost = (100 - $ARGS[1] + will_calc)/10>>
  713. <</if>>
  714. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  715. <</if>>
  716. <<case 'rape'>>
  717. <<gs 'willpower' 'calc'>>
  718. <<if $location_var[$here][1] == 'self'>>
  719. <<if $missCum >= $timeTresh>>
  720. <<set $will_calc = 0>>
  721. <</if>>
  722. <<set $will_cost = (100 + $will_calc - $will_arousal_mod) / 10>>
  723. <<elseif $location_var[$here][1] == 'force'>>
  724. <<set $will_cost = (200 - $will_enforced * 2 + $will_calc - $will_arousal_mod) / 10>>
  725. <<else>>
  726. <<if $missCum >= $timeTresh>>
  727. <<setn $will_calc += 100>>
  728. <</if>>
  729. <<if getvar("$rape") == 0>>
  730. <<set $will_cost = (10 + $will_calc + $will_arousal_mod) / 10>>
  731. <<else>>
  732. <<set $will_cost = (100 + $rape + $will_calc + $will_arousal_mod) / 10>>
  733. <</if>>
  734. <</if>>
  735. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  736. <<case 'drink'>>
  737. <<gs 'willpower' 'calc'>>
  738. <<if $location_var[$here][1] == 'self'>>
  739. <<set $will_cost = (60 - $alcohol_exp * 40 + $will_calc) / 10>>
  740. <<elseif $location_var[$here][1] == 'force'>>
  741. <<set $will_cost = (100 - $will_enforced - $alcohol_exp * 30 + $will_calc) / 10>>
  742. <<else>>
  743. <<if $pc.alko > 10>>
  744. <<set $will_cost = (20 + $alcohol_exp * 10 + $will_calc) / 10>>
  745. <<elseif $pc.alko > 6>>
  746. <<set $will_cost = (80 + $alcohol_exp * 40 + $will_calc) / 10>>
  747. <<elseif $pc.alko > 3>>
  748. <<set $will_cost = (60 + $alcohol_exp * 30 + $will_calc) / 10>>
  749. <<else>>
  750. <<set $will_cost = (10 + $alcohol_exp * 20 + $will_calc) / 10>>
  751. <</if>>
  752. <</if>>
  753. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  754. <<case 'drugs'>>
  755. <!-- !!Drug needs already included in the will_calc so just a small base cost here-->
  756. <<gs 'willpower' 'calc'>>
  757. <<if $location_var[$here][1] == 'self'>>
  758. <<set $will_cost = (100 - $addictive_trait_lvl * 30 + $will_calc) / 10>>
  759. <<elseif $location_var[$here][1] == 'force'>>
  760. <<set $will_cost = (100 - $will_enforced - $addictive_trait_lvl * 10 + $will_calc) / 10>>
  761. <<else>>
  762. <<if getvar("$addictive_trait_lvl") > 0>>
  763. <<set $will_cost = ($addictive_trait_lvl * 30 + $will_calc) / 10>>
  764. <<else>>
  765. <<set $will_cost = (10 + $will_calc) / 10>>
  766. <</if>>
  767. <</if>>
  768. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  769. <<case 'crime'>>
  770. <<gs 'willpower' 'calc'>>
  771. <<if $location_var[$here][0] == 'force'>>
  772. <<set $will_cost = (80 - $will_enforced + $will_calc) / 10>>
  773. <<else>>
  774. <<set $will_cost = (60 + $will_calc) / 10>>
  775. <</if>>
  776. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  777. <<case 'exhib'>>
  778. <<gs 'willpower' 'calc'>>
  779. <<if $location_var[$here][1] == 'self'>>
  780. <<set $will_cost = (100 - getvar('$Exhibitionist_lvl') * 20 - $pc.pcs_inhib / 5 + $will_calc) / 10>>
  781. <<elseif $location_var[$here][1] == 'force'>>
  782. <<set $will_cost = (100 - $will_enforced - getvar('$Exhibitionist_lvl') * 10 + $will_calc) / 10>>
  783. <<else>>
  784. <<set $will_cost = (getvar('$Exhibitionist_lvl') * 25 + $pc.pcs_inhib / 4 + $will_calc) / 10>>
  785. <</if>>
  786. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  787. <<case 'sleep'>>
  788. <!-- !!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-->
  789. <<gs 'willpower' 'calc'>>
  790. <<set $will_cost = 0>>
  791. <<if $pc.pcs_sleep <= 5>>
  792. <<set $will_cost = $will_calc / 10>>
  793. <</if>>
  794. <!-- !! Not sure if this one belongs. It doesn''t look like it's used anywhere.-->
  795. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  796. <<case 'misc' 'chore'>>
  797. <!-- !!Choose this if nothing else fits and for chore which is same thing but without gains for max willpower-->
  798. <<gs 'willpower' 'calc'>>
  799. <<if $location_var[$here][1] == 'force'>>
  800. <<if $location_var[$here][2] == 'easy'>>
  801. <<set $will_cost = (60 - $will_enforced + $will_calc) / 10>>
  802. <<elseif $location_var[$here][2] == 'hard'>>
  803. <<set $will_cost = (90 - $will_enforced + $will_calc) / 10>>
  804. <<else>>
  805. <<set $will_cost = (70 - $will_enforced + $will_calc) / 10>>
  806. <</if>>
  807. <<else>>
  808. <<if $location_var[$here][2] == 'easy'>>
  809. <<set $will_cost = (10 + $will_calc) / 10>>
  810. <<elseif $location_var[$here][2] == 'hard'>>
  811. <<set $will_cost = (40 + $will_calc) / 10>>
  812. <<else>>
  813. <<set $will_cost = (20 + $will_calc) / 10>>
  814. <</if>>
  815. <</if>>
  816. <<gs 'willpower' 'difficulty' $ARGS[2]>>
  817. <<case 'choreSchool'>>
  818. <<set _schoolDifficulty = 'medium'>>
  819. <<if $quest('school').func('isGroupMember','gopniks') and $pc.trait('nerd_status') == 0>>
  820. <<set _schoolDifficulty = 'hard'>>
  821. <<elseif $pc.trait('nerd_status') > 0>>
  822. <<set _schoolDifficulty = 'easy'>>
  823. <</if>>
  824. <<gs 'willpower' 'chore' 'self' _schoolDifficulty>>
  825. <<switch $pc.trait('nerd_status')>>
  826. <<case 2>>
  827. <<set $will_cost = $will_cost / 2>>
  828. <<case 3>>
  829. <<set $will_cost = 0>>
  830. <</switch>>
  831. <<case 'dnd'>>
  832. <!-- !!modifiers for drink an drugs-->
  833. <<set $will_dnd = 0>>
  834. <<if $pc.alko > 10>>
  835. <<set $will_dnd += 160>>
  836. <<elseif $pc.alko > 6>>
  837. <<set $will_dnd += 80>>
  838. <<elseif $pc.alko > 3>>
  839. <<set $will_dnd += 30>>
  840. <</if>>
  841. <!-- !!cigarettes-->
  842. <<if getvar("$smokerNeed") > 10>>
  843. <<setn $will_dnd += 10>>
  844. <</if>>
  845. <!-- !!weed-->
  846. <<if getvar("$jointhigh") > 0>>
  847. <<setn $will_dnd -= 10>>
  848. <</if>>
  849. <!-- !!amphetamines-->
  850. <<if getvar("$amphWithdrawl") > 2>>
  851. <<set $will_dnd += 40>>
  852. <<elseif getvar("$amphHigh") > 0>>
  853. <<set $will_dnd += 80>>
  854. <</if>>
  855. <!-- !!heroine-->
  856. <<if getvar("$SLomka") > 0>>
  857. <<set $will_dnd += 100>>
  858. <<elseif $pc.strongNarkota > 0>>
  859. <<set $will_dnd += 60>>
  860. <</if>>
  861. <!-- !!cocaine-->
  862. <<if getvar("$pc.narkoman") == 1>>
  863. <<set $will_dnd += 60>>
  864. <<elseif $pc.nark < 0>>
  865. <<set $will_dnd -= 20>>
  866. <</if>>
  867. <<case 'difficulty'>>
  868. <!-- !!Multiplier to make willpower cost more. Use if all total costs need adjusting.-->
  869. <<set $will_cost = $will_cost * 3 / 2>>
  870. <<if $location_var[$here][1] == 'easy'>>
  871. <<set $will_cost = $will_cost * 2 / 3>>
  872. <<if getvar("$will_cost") < 5>>
  873. <<set $will_cost = 5>>
  874. <</if>>
  875. <<elseif $location_var[$here][1] == 'hard'>>
  876. <<set $will_cost = $will_cost * 3 / 2>>
  877. <<if getvar("$will_cost") < 7>>
  878. <<set $will_cost = 7>>
  879. <</if>>
  880. <<else>>
  881. <<if getvar("$will_cost") < 6>>
  882. <<set $will_cost = 6>>
  883. <</if>>
  884. <</if>>
  885. <<if getvar("$cheatWillpower") == 1>>
  886. <<set $will_cost = 0>>
  887. <</if>>
  888. <<case 'pay'>>
  889. <<set _will_cost = $location_var[$here][1]>>
  890. <<if _will_cost < 1 and getvar("$cheatWillpower") == 0>>
  891. <<set $will_cost = 1>>
  892. <</if>>
  893. <<set $pc.willpower -= _will_cost>>
  894. <<if $location_var[$here][1] == 'force'>>
  895. <<if $pc.willpowermax < 150>>
  896. <<set $pc.will_counter+= 10>>
  897. <</if>>
  898. <<if getvar("$will_enforced") < 20>>
  899. <<setn $will_enforced += 1>>
  900. <</if>>
  901. <<elseif $location_var[$here][1] != 'chore'>>
  902. <<if $pc.willpowermax < 150>>
  903. <<set $pc.will_counter+= 1>>
  904. <</if>>
  905. <</if>>
  906. <<if getvar("$will_counter") >= 20>>
  907. <<set $pc.will_counter= 0>> <<setn $pc.willpowermax += 1>>
  908. <</if>>
  909. <</switch>>