widgets.tw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  1. :: sex_widgets[deprecated]
  2. <<widget 'breakHymen'>>
  3. <<set $pc.pcs_vag = 1>>
  4. <</widget>>
  5. <<widget 'insertionEffectApply'>>
  6. <<set _insertionEffectToApply = _args[0]>>
  7. <<switch _insertionEffectToApply.bodypart>>
  8. <<case 'vagina'>>
  9. <<set $pc.pcs_vag += _insertionEffectToApply.stretch ?? 0>>
  10. <<pain 'vagina' `_insertionEffectToApply.pain ?? 0`>>
  11. <</switch>>
  12. <</widget>>
  13. <<widget 'sex' container>>
  14. <<sexStart>>
  15. _contents
  16. <<sexEnd>>
  17. <</widget>>
  18. <<widget 'sexStart'>>
  19. <<set $sexFlags = {}>>
  20. <<set $sexEvents = []>>
  21. <</widget>>
  22. <<widget 'sexEnd'>>
  23. <<run $pc.sexEncounterAdd($time.now,$sexEvents)>>
  24. <<set $sexFlags = {}>>
  25. <<set $sexEvents = []>>
  26. <</widget>>
  27. <<widget 'anal'>>
  28. /*
  29. The main character gets fucked into the ass by a NPC.
  30. Arguments:
  31. 0: NPC
  32. 1: Flags
  33. 2: Print message
  34. */
  35. <<set _sexNCPId = _args[0] ?? _autoCapture.loadedNPCIds.last()>>
  36. <<set _sexFlags = $sexFlags>>
  37. <<set $sexEvents = []>>
  38. <<set _analFlags = _args[1]>>
  39. <<set _sexFlags.anal = _analFlags>>
  40. <<if !_analFlags.cum>>
  41. <<elseif typeof _analFlags.cum == 'string'>>
  42. <<set _sexFlags.cum = _analFlags.cum>>
  43. <<cum _analFlags.cum _sexNCPId>>
  44. <<else>>
  45. <<set _sexFlags.cum = 'rectum'>>
  46. <<cum _sexFlags.cum _sexNCPId>>
  47. <</if>>
  48. <!--<<arouse 'anal' 10 _sexFlags _sexNCPId _sexFlags>>-->
  49. <<insertion 'anal' 'penis' _sexNCPId _analFlags _args[2]>>
  50. <<run $sexEvents.push(Object.assign({},_sexFlags,{npc: _sexNCPId}))>>
  51. <<run $pc.sexStatInc('anal',_sexFlags.unaware ? 'unaware' : 'aware')>>
  52. <</widget>>
  53. <<widget 'anal_fist'>>
  54. /*
  55. The main character gets fucked into the ass by a NPC.
  56. Arguments:
  57. 0: NPC
  58. 1: Flags
  59. 2: Print message
  60. */
  61. <<set _sexNCPId = _args[0] ?? _autoCapture.loadedNPCIds.last()>>
  62. <<set _sexFlags = $sexFlags>>
  63. <<set $sexEvents = []>>
  64. <<set _analFlags = _args[1]>>
  65. <<set _sexFlags.anal = _analFlags>>
  66. <<insertion 'anal' 'fist' _sexNCPId _analFlags _args[2]>>
  67. <<run $sexEvents.push(Object.assign({},_sexFlags,{npc: _sexNCPId}))>>
  68. <<run $pc.sexStatInc('anal_fist',_sexFlags.unaware ? 'unaware' : 'aware')>>
  69. <</widget>>
  70. <<widget 'bj'>>
  71. /*
  72. Makes the main character give a NPC a bj.
  73. Arguments:
  74. 0: NPC
  75. 1: Cum:
  76. 0: Default. The NPC does not cum.
  77. 1: In the mouth.
  78. string: Bodypart
  79. 2: Control:
  80. 1: The main character controls what is happening.
  81. 2: The main character is in control, but is directed by the NPC. Default.
  82. 3: The NPC is in control.
  83. 3: Severety
  84. 1: Soft. The NPC doesn't want to make the main character too uncomfortable. Mostly licking the tip of the penis.
  85. 2: Medium. The NPC values his fun higher than the main characters comfort. Taking the whole penis, but no deep throat. Default.
  86. 3: Hard. Deep throat.
  87. */
  88. <<set _sexNCPId = _args[0] ?? _autoCapture.loadedNPCIds.last()>>
  89. <<set _sexFlags = $sexFlags>>
  90. <<set $sexEvents = []>>
  91. <<set _sexFlags.bj = _args[3] ?? 2>>
  92. <<if !_args[1]>>
  93. <<elseif typeof _args[1] == 'string'>>
  94. <<set _sexFlags.cum = _args[1]>>
  95. <<cum _sexFlags.cum _sexNCPId>>
  96. <<else>>
  97. <<set _sexFlags.cum = 'mouth'>>
  98. <<cum _sexFlags.cum _sexNCPId>>
  99. <</if>>
  100. <<arouse 'bj' 10>>
  101. <<run $sexEvents.push(Object.assign({},$sexFlags,{npc: _sexNCPId, control: _args[2] ?? 2}))>>
  102. <<run $pc.sexStatInc('bj',_sexFlags.unaware ? 'unaware' : 'aware')>>
  103. <</widget>>
  104. <<widget 'fuck'>>
  105. /*
  106. The main character gets fucked into the ass by a NPC.
  107. Arguments:
  108. 0: NPC
  109. 1: Flags
  110. 2: Print message
  111. */
  112. <<set _sexNCPId = _args[0] ?? _autoCapture.loadedNPCIds.last()>>
  113. <<set _sexFlags = $sexFlags>>
  114. <<set $sexEvents = []>>
  115. <<set _fuckFlags = _args[1]>>
  116. <<set _sexFlags.fuck = _fuckFlags>>
  117. <<if !_fuckFlags.cum>>
  118. <<elseif typeof _fuckFlags.cum == 'string'>>
  119. <<set _sexFlags.cum = _fuckFlags.cum>>
  120. <<cum _fuckFlags.cum _sexNCPId>>
  121. <<else>>
  122. <<set _sexFlags.cum = 'vagina'>>
  123. <<cum _sexFlags.cum _sexNCPId>>
  124. <</if>>
  125. <!--<<arouse 'anal' 10 _sexFlags _sexNCPId _sexFlags>>-->
  126. <<insertion 'vagina' 'penis' _sexNCPId _fuckFlags _args[2]>>
  127. <<run $sexEvents.push(Object.assign({},_sexFlags,{npc: _sexNCPId}))>>
  128. <<run $pc.sexStatInc('vaginal',_sexFlags.unaware ? 'unaware' : 'aware')>>
  129. <</widget>>
  130. <<widget 'vaginal_fist'>>
  131. /*
  132. The main character gets fucked into the ass by a NPC.
  133. Arguments:
  134. 0: NPC
  135. 1: Flags
  136. 2: Print message
  137. */
  138. <<set _sexNCPId = _args[0] ?? _autoCapture.loadedNPCIds.last()>>
  139. <<set _sexFlags = $sexFlags>>
  140. <<set $sexEvents = []>>
  141. <<set _vaginaFistFlags = _args[1]>>
  142. <<set _sexFlags.vaginaFist = _vaginaFistFlags>>
  143. <<insertion 'vagina' 'fist' _sexNCPId _vaginaFistFlags _args[2]>>
  144. <<run $sexEvents.push(Object.assign({},_sexFlags,{npc: _sexNCPId}))>>
  145. <<run $pc.sexStatInc('vaginal_fist',_sexFlags.unaware ? 'unaware' : 'aware')>>
  146. <</widget>>
  147. <!-- *********** Insertions ********** -->
  148. <<widget 'insertion'>>
  149. <<set _ins = {
  150. painInc: 0,
  151. arousalInc: 0
  152. }>>
  153. <<switch _args[0]>>
  154. <<case 'anal'>>
  155. <<set _ins.capacity = $pc.analCapacity>>
  156. <<set _ins.capacityGrace = 0>>
  157. <<set _ins.lubricationNatural = 0>>
  158. <<set _ins.hurtingBodyPart = 'butthole'>>
  159. <<case 'vagina'>>
  160. <<set _ins.capacity = $pc.vaginalCapacity>>
  161. <<set _ins.capacityGrace = 0.5>>
  162. <<set _ins.lubricationNatural = $pc.vaginalLubrication>>
  163. <<set _ins.hurtingBodyPart = 'vagina'>>
  164. <<if $pc.isVirgin>>
  165. <<set _ins.painInc += 0.5>>
  166. <<set _ins.virginityLost = true>>
  167. <</if>>
  168. <</switch>>
  169. <<switch _args[1]>>
  170. <<case 'penis'>>
  171. <<set _ins.npc = _args[2] ?? _autoCapture.loadedNPCIds.last()>>
  172. <<set _ins.size= $npcs.get(_ins.npc,'dick_size',3)>>
  173. <<case 'fist'>>
  174. <<set _ins.size= 6>>
  175. <<case 'toy'>>
  176. <</switch>>
  177. <<if _args[3].hard>>
  178. <<set _ins.painInc += 0.5>>
  179. <<set _ins.arousalInc += 0.25>>
  180. <</if>>
  181. <<set _ins.lube = _ins.lubricationNatural>>
  182. <<set _ins.size_difference = _ins.size - _ins.capacity>>
  183. <<set _ins.damage = Math.max(_ins.size_difference - _ins.lube - _ins.capacityGrace ?? 0, 0)>>
  184. <<set _ins.arousalSize = Math.pow(2,_ins.size_difference+_ins.arousalInc ?? 0) * 100>>
  185. <<set _ins.arousalDamage = _ins.damage > 0 ? -Math.pow(4,_ins.damage) * 100 : 0>>
  186. <<set _ins.arousal = Math.clamp(_ins.arousalSize + _ins.arousalDamage,-100,100)>>
  187. <<set _ins.pain = _ins.damage > 0 ? Math.pow(3,_ins.damage+_ins.painInc) : 0>>
  188. <<if _ins.pain > 0>>
  189. <<run $pc.painInc(_ins.hurtingBodyPart,'',_ins.pain)>>
  190. <</if>>
  191. <<switch _args[0]>>
  192. <<case 'anal'>>
  193. <<run $pc.analCapacityAdaptTo(_ins.size)>>
  194. <<case 'vagina'>>
  195. <<run $pc.vaginalCapacityAdaptTo(_ins.size)>>
  196. <</switch>>
  197. <<set $pc.horny += _ins.arousal>>
  198. <<if _args[4]>>
  199. <<set _ins.lang = new setup.Lang()>>
  200. <<switch _args[1]>>
  201. <<case 'penis'>>
  202. <<switch _args[0]>>
  203. <<case 'anal'>>
  204. <<set _ins.lang.start = "<<npc _ins.npc>><</npc>> pushes his <<penisSize _ins.size>> penis against your sphincter.">>
  205. <<case 'vagina'>>
  206. <<set _ins.lang.start = "<<npc _ins.npc>><</npc>> places his <<penisSize _ins.size>> penis next to your labia and begins to push.">>
  207. <</switch>>
  208. <<case 'fist'>>
  209. <<switch _args[0]>>
  210. <<case 'anal'>>
  211. <<set _ins.lang.start = "<<npc _ins.npc>><</npc>> pushes his fist against your sphincter.">>
  212. <<case 'vagina'>>
  213. <<set _ins.lang.start = "<<npc _ins.npc>><</npc>> places his fist next to your labia and begins to push.">>
  214. <</switch>>
  215. <</switch>>
  216. <<if _ins.virginityLost>>
  217. <<set _ins.lang.entry = "<<negative>>This is the first time for you. You feel a sharp pain as your hymen breaks.<</negative>>">>
  218. <<elseif _ins.size - _ins.capacity <= 0>>
  219. <<set _ins.lang.entry = "Being used to <<penisSize _ins.capacity>>, you have no problem handling him. He slides inside of you without any effort.">>
  220. <<elseif _ins.size - _ins.capacity <= _ins.capacityGrace>>
  221. <<set _ins.lang.entry = "You are used to slightly smaller genitals, but the difference isn't so big you can't handle him. He slides inside of you without much effort.">>
  222. <<else>>
  223. <<set _ins.lang.entry = "He is way bigger than you are accustomed to. Fitting anyhting bigger than a <<penisSize _ins.capacity>> penis is difficult for you.">>
  224. <<if _ins.lube>>
  225. <<if _ins.size - _ins.capacity - _ins.capacityGrace <= _ins.lube>>
  226. <<set _ins.lang.entry += "It is only thanks to the lubrication that he manages to push himself inside of you without much effort.">>
  227. <<else>>
  228. <<set _ins.lang.entry += "Even though you are lubricated it takes him some effort to push himself inside of you.">>
  229. <</if>>
  230. <<else>>
  231. <<set _ins.lang.entry += "He pushes himself painfully inside of you.">>
  232. <</if>>
  233. <</if>>
  234. <<set _ins.lang.feelingInside = "">>
  235. <<switch _args[1]>>
  236. <<case 'penis'>>
  237. <<set _ins.lang.feelingInside += "He pushes the complete length of his member inside of you.">>
  238. <<case 'fist'>>
  239. <<set _ins.lang.feelingInside += "He pushes the complete length of his arm inside of you.">>
  240. <</switch>>
  241. <<if _ins.size - _ins.capacity <= 0>>
  242. <<set _ins.lang.feelingInside += "He doesn't fill you completely, which makes the experience less intense for you.">>
  243. <<elseif _ins.size - _ins.capacity <= _ins.capacityGrace>>
  244. <<set _ins.lang.feelingInside += "He fills you completey. It's enough to be exciting but not so much it becomes painful.">>
  245. <<else>>
  246. <<set _ins.lang.feelingInside += "He fills you completely. You feel his dick painfully pressing against compressed flesh.">>
  247. <</if>>
  248. <<set _ins.lang.feelingInside += "After waiting for just a moment, he retracts a little, just to push himself back inside of you. He begins to fuck you like this.">>
  249. <<if _args[3].hard>>
  250. <<set _ins.lang.feelingInside += "And he fucks you hard, pushing himself violently into you again and again.">>
  251. <</if>>
  252. <<if _ins.pain >= 50>>
  253. <<set _ins.lang.feelingInside += "The pain is almost too much to bare. You feel like being ripped apart.">>
  254. <<elseif _ins.pain >= 30>>
  255. <<set _ins.lang.feelingInside += "The pain is terrible. It is a burns like fire.">>
  256. <<elseif _ins.pain >= 10>>
  257. <<set _ins.lang.feelingInside += "The pain is intense.">>
  258. <<elseif _ins.pain > 0>>
  259. <<set _ins.lang.feelingInside += "The pain is a minor inconvenience.">>
  260. <</if>>
  261. <<set _ins.lang.arousal = "">>
  262. <<if _ins.arousal < 0>>
  263. <<set _ins.lang.arousal += "<<negative>>There is no joy for you in this act. The pain eradicates any thought of pleasurable sex from your mind.<</negative>>">>
  264. <<elseif _ins.arousal <= 25>>
  265. <<set _ins.lang.arousal += "<<positive>>You manage to find a little excitement in this act.<</positive>>">>
  266. <<elseif _ins.arousal <= 50>>
  267. <<set _ins.lang.arousal += "<<positive 1>>You manage to enjoy this act.<</positive>>">>
  268. <<else>>
  269. <<set _ins.lang.arousal += "<<positive 2>>This act really excites you.<</positive>>">>
  270. <</if>>
  271. <<if _args[3].cum>>
  272. <<set _ins.lang.cum = "With a final push <<npc _ins.npc>><</npc>> cums inside of you. He slowly pulls his penis out of you and you feel a few drops of his sperm running down your thighs.">>
  273. <</if>>
  274. <<set _ins.lang.order = [['start','entry'],'feelingInside','arousal','cum']>>
  275. <<if _args[4] === true>>
  276. _ins.lang
  277. <</if>>
  278. <</if>>
  279. <<if false>>
  280. <<if $pc.horny >= 100>>
  281. <<orgasm 1>>
  282. <</if>>
  283. <<if _ins.size - _ins.capacity > 0>>
  284. You also feel that you are streteched, adapting to the new size.
  285. <</if>>
  286. </p>
  287. <</if>>
  288. <</widget>>
  289. <<widget 'orgasm'>>
  290. <<set $pc.horny = 0>>
  291. <<set $pc.mood += 50>>
  292. <<if _args[0]>>
  293. <<positive 2>>Your whole body shivers as you experience an orgasm.<</positive>>
  294. <</if>>
  295. <</widget>>
  296. <<widget 'penisSize'>>
  297. <<switch Math.floor(_args[0])>>
  298. <<case 0>>microscopic
  299. <<case 1>>tiny
  300. <<case 2>>small
  301. <<case 3>>average-sized
  302. <<case 4>>big
  303. <<case 5>>massive
  304. <<case 6>>monstrous
  305. <</switch>>
  306. <</widget>>
  307. <!-- *********** Situations ********** -->
  308. <<widget 'bound' container>>
  309. /*
  310. Sets the sex-flag bound.
  311. Keep in mind that this is assumed to be consensual unless a non-nonsensual flag is set as well.
  312. Arguments:
  313. 0: Severety
  314. 1: Light bondage. Could technically resist the act. E.g. the hands being tied behind your back while your legs are free would allow you to run.
  315. 2: Normal bondage (default). Can not resist the act, but could manage to escape the bondage if not actively hindered.
  316. 3: Heavy bondage. Completely helpless.
  317. */
  318. <<set $sexFlags ??= {}>>
  319. <<set $sexFlags.bound = _args[0] ?? 2>>
  320. _contents
  321. <<run delete $sexFlags.bound>>
  322. <</widget>>
  323. <<widget 'noncon' container>>
  324. /*
  325. Sets the sex-flag noncon. Sexual acts set with this flag qualify as rape.
  326. Arguments:
  327. 0: Severety
  328. 1: Reluctant. Main character isn't happy about the act but lets it happen.
  329. 2: Coerced (default). Main character is forced to participate by fear.
  330. 3: Forced. Main character has no way to resist (drugs, heavy bondage, etc.).
  331. */
  332. <<set $sexFlags ??= {}>>
  333. <<set $sexFlags.noncon = _args[0] ?? 2>>
  334. <<set $sexFlags.rape ??= 0>>
  335. <<set $sexFlags.rape += 1>>
  336. _contents
  337. <<set $sexFlags.rape -= 1>>
  338. <<run delete $sexFlags.noncon>>
  339. <</widget>>