craft.js 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. // Crafting
  2. /*jshint multistr:true*/
  3. jewelryMods =["nipplerings","collar","headband","bellybuttonstud","clitcockring"];
  4. function Craft()
  5. {
  6. if ($("#craft_buttons").is(":visible")) {
  7. $("#camp_feed").html("");
  8. return;
  9. }
  10. if ($("#women_buttons").is(":visible")) resetRival();
  11. $("#camp_feed").html(
  12. "<div id='craft_buttons' class='push--top'></div>\
  13. <div id='craft_display'></div>");
  14. // Nipple Rings
  15. if (player.Mods.craftnipplerings > 0) {
  16. $("#craft_buttons").append("<button id='craft_btn_1' class='btn btn-woman push--right' title='Craft Nipple Rings'>Nipple Rings</button>");
  17. $("#craft_btn_1").click(
  18. function() {
  19. if (player.metal == 0) $("#craft_display").append("<p>You need metal to make this</p>");
  20. else CraftIt("Nipple Rings", "nipplerings", 1, "craftNippleRingsYou", "craftNippleRingsWoman");
  21. }
  22. );
  23. }
  24. // Collar
  25. if (player.Mods.craftcollar > 0) {
  26. $("#craft_buttons").append("<button id='craft_btn_2' class='btn btn-woman push--right' title='Craft a Torc Collar'>Torc</button>");
  27. $("#craft_btn_2").click(
  28. function() {
  29. if (player.metal == 0) $("#craft_display").append("<p>You need metal to make this</p>");
  30. else if (player.goods == 0) $("#craft_display").append("<p>You need a pretty gem to make this</p>");
  31. else CraftIt("Torc (Collar)", "collar", 1, "craftCollarYou", "craftCollarWoman");
  32. }
  33. );
  34. }
  35. // Head Band
  36. if (player.Mods.craftheadband > 0) {
  37. $("#craft_buttons").append("<button id='craft_btn_3' class='btn btn-woman push--right' title='Craft a Headband'>Headband</button>");
  38. $("#craft_btn_3").click(
  39. function(){
  40. if (player.metal == 0) $("#craft_display").append("<p>You need metal to make this</p>");
  41. else if (player.goods == 0) $("#craft_display").append("<p>You need a pretty gem to make this</p>");
  42. else CraftIt("Headband", "headband", 1, "craftHeadbandYou", "craftHeadbandWoman");
  43. }
  44. );
  45. }
  46. // Belly button Stud
  47. if (player.Mods.craftbellybuttonstud > 0) {
  48. $("#craft_buttons").append("<button id='craft_btn_4' class='btn btn-woman push--right' title='Craft a Belly Button Stud'>Belly Button Stud</button>");
  49. $("#craft_btn_4").click(
  50. function() {
  51. if (player.goods == 0) $("#craft_display").append("<p>You need a pretty gem to make this</p>");
  52. else CraftIt("Belly Button Stud", "bellybuttonstud", 1, "craftBellyButtonStudYou", "craftBellyButtonStudWoman");
  53. }
  54. );
  55. }
  56. // Clit/Cock Ring
  57. if (player.Mods.craftclitcockring > 0) {
  58. $("#craft_buttons").append("<button id='craft_btn_5' class='btn btn-woman push--right' title='Craft Clit/Cock Ring'>Clit/Cock Ring</button>");
  59. $("#craft_btn_5").click(
  60. function() {
  61. if (player.metal == 0) $("#craft_display").append("<p>You need metal to make this</p>");
  62. else if (player.goods == 0) $("#craft_display").append("<p>You need a pretty gem to make this</p>");
  63. else CraftIt("Clit Cock Ring", "clitcockring", 1, "craftClitCockRingYou", "craftClitCockRingWoman");
  64. }
  65. );
  66. }
  67. // Bracelet (left)
  68. if (player.Mods.craftleftbracelet > 0) {
  69. $("#craft_buttons").append("<button id='craft_btn_6' class='btn btn-woman push--right' title='Craft Red Bracelet'>Red Bracelet</button>");
  70. $("#craft_btn_6").click(
  71. function() {
  72. if (player.metal == 0) $("#craft_display").append("<p>You need metal to make this</p>");
  73. else CraftIt("Red Bracelet", "leftbracelet", 2, "craftLeftBraceletYou", "craftLeftBraceletWoman");
  74. }
  75. );
  76. }
  77. }
  78. function CraftIt(desc, itm, limit, actionyou, actionwoman)
  79. {
  80. $("#output").html(desc);
  81. $("#output").append("<h2>Who you make for?</h2>\
  82. <div id='craft_buttons' class='push--top'>");
  83. if (player.items[itm] < limit) {
  84. $("#craft_buttons").append("<button id='craft_button_you' class='btn btn-woman push--right'>You</button></div>");
  85. $("#craft_button_you").click(function(){
  86. fBefore = player.isFemale();
  87. eval(actionyou + "()");
  88. });
  89. }
  90. $.each(player.women, function( index, value ) {
  91. if (player.women[index].items[itm] < limit) {
  92. if (player.women[index].isFemale()) $("#craft_buttons").append("<button id='woman_button_"+index+"' class='btn btn-woman push--right'>"+value.name+"</button>");
  93. else $("#craft_buttons").append("<button id='woman_button_"+index+"' class='btn btn-man push--right'>"+value.name+"</button>");
  94. $("#woman_button_"+index).click(function(){
  95. if ($("#woman_craft_buttons").is(":visible")) {
  96. $("#craft_button_Woman").unbind('click').click(function(){
  97. eval(actionwoman + "(" + index + ")");
  98. });
  99. } else {
  100. $("#craft_buttons").append("<div id='woman_craft_buttons' class='push--top'>\
  101. <button id='craft_button_Woman' class='btn btn-woman push--right'>Choose</button>\</div>");
  102. $("#craft_button_Woman").click(function(){
  103. eval(actionwoman + "(" + index + ")");
  104. });
  105. }
  106. rival = player.women[index];
  107. fBefore = rival.isFemale();
  108. $(".stats").show();
  109. $("#otherstats").show();
  110. redraw();
  111. });
  112. }
  113. });
  114. $("#craft_buttons").append("<button id='craft_button_noone' class='btn btn-woman push--right'>No-one</button></div>");
  115. $("#craft_button_noone").click(function(){
  116. Camp();
  117. Craft();
  118. });
  119. }
  120. // Nipple Rings
  121. function craftNippleRingsYou()
  122. {
  123. player.metal -= 1;
  124. player.items.nipplerings = 1;
  125. player.changeNatural("orientation", -5);
  126. player.orientation -= 5;
  127. player.capTraits();
  128. redraw();
  129. Message("ShowCamp();Craft()",
  130. "<h1>Nipple Rings</h1>\
  131. <p>You make the rings and with a sharp bone needle pierce your nipples and fit the rings!</p>");
  132. }
  133. function craftNippleRingsWoman(index)
  134. {
  135. player.metal -= 1;
  136. rival = player.women[index];
  137. rival.items.nipplerings = 1;
  138. rival.changeNatural("orientation", 5);
  139. rival.orientation += 5;
  140. rival.capTraits();
  141. redraw();
  142. Message("ShowCamp();Craft()",
  143. "<h1>Nipple Rings</h1>\
  144. <p>You make the rings and with a sharp bone needle pierce " + rival.name + " nipples and fit the rings!</p>");
  145. }
  146. // Collar
  147. function craftCollarYou()
  148. {
  149. player.metal -= 1;
  150. player.goods -= 1;
  151. player.items.collar = 1;
  152. player.changeNatural("submissiveness", -5);
  153. player.submissiveness -= 5;
  154. player.capTraits();
  155. player.calcPhysique();
  156. redraw();
  157. Message("ShowCamp();Craft()",
  158. "<h1>Torc</h1>\
  159. <p>You make the torc and fit it around you neck, you feel more commanding!</p>");
  160. }
  161. function craftCollarWoman(index)
  162. {
  163. player.metal -= 1;
  164. player.goods -= 1;
  165. rival = player.women[index];
  166. rival.items.collar = 1;
  167. rival.changeNatural("submissiveness", 5);
  168. rival.submissiveness += 5;
  169. rival.capTraits();
  170. rival.calcPhysique();
  171. redraw();
  172. Message("ShowCamp();Craft()",
  173. "<h1>Torc</h1>\
  174. <p>You make the torc at fit it around " + rival.name + "'s neck, marking them as yours!</p>");
  175. }
  176. // Head band
  177. function craftHeadbandYou()
  178. {
  179. player.metal -= 1;
  180. player.goods -= 1;
  181. player.items.headband = 1;
  182. player.changeNatural("allure", -5);
  183. player.allure -= 5;
  184. player.capTraits();
  185. player.calcPhysique();
  186. redraw();
  187. Message("ShowCamp();Craft()",
  188. "<h1>Headband</h1>\
  189. <p>You make the headband and wear it, you stand out more!</p>");
  190. }
  191. function craftHeadbandWoman(index)
  192. {
  193. player.metal -= 1;
  194. player.goods -= 1;
  195. rival = player.women[index];
  196. rival.items.headband = 1;
  197. rival.changeNatural("allure", 5);
  198. rival.allure += 5;
  199. rival.capTraits();
  200. rival.calcPhysique();
  201. redraw();
  202. Message("ShowCamp();Craft()",
  203. "<h1>Torc</h1>\
  204. <p>You make the headband and put it on " + rival.name + "'s head!</p>");
  205. }
  206. // Belly Button Stud
  207. function craftBellyButtonStudYou()
  208. {
  209. player.goods -= 1;
  210. player.items.bellybuttonstud = 1;
  211. player.changeNatural("maternalism", -5);
  212. player.maternalism -= 5;
  213. player.capTraits();
  214. player.calcPhysique();
  215. redraw();
  216. Message("ShowCamp();Craft()",
  217. "<h1>Belly Button Stud</h1>\
  218. <p>You make the stud and with a sharp bone needle pierce your belly button and fit the stud.</p>");
  219. }
  220. function craftBellyButtonStudWoman(index)
  221. {
  222. player.goods -= 1;
  223. rival = player.women[index];
  224. rival.items.bellybuttonstud = 1;
  225. rival.changeNatural("maternalism", 5);
  226. rival.maternalism += 5;
  227. rival.capTraits();
  228. rival.calcPhysique();
  229. redraw();
  230. Message("ShowCamp();Craft()",
  231. "<h1>Belly Button Stud</h1>\
  232. <p>ou make the stud and with a sharp bone needle pierce " + rival.name + "'s belly button and fit the stud.</p>");
  233. }
  234. // Clit cock ring
  235. function craftClitCockRingYou()
  236. {
  237. player.metal -= 1;
  238. player.items.clitcockring = 1;
  239. player.changeNatural("orientation", -5);
  240. player.orientation -= 5;
  241. player.capTraits();
  242. redraw();
  243. if (player.hasCock()) {
  244. Message("ShowCamp();Craft()",
  245. "<h1>Cock Ring</h1>\
  246. <p>You make the ring and with a sharp bone needle pierce your cock and fit the ring!</p>");
  247. } else {
  248. Message("ShowCamp();Craft()",
  249. "<h1>Clit Ring</h1>\
  250. <p>You make the ring and with a sharp bone needle pierce your clit and fit the ring!</p>");
  251. }
  252. }
  253. function craftClitCockRingWoman(index)
  254. {
  255. player.metal -= 1;
  256. rival = player.women[index];
  257. rival.items.clitcockring = 1;
  258. rival.changeNatural("orientation", 5);
  259. rival.orientation += 5;
  260. rival.capTraits();
  261. redraw();
  262. if (rival.hasCock()) {
  263. Message("ShowCamp();Craft()",
  264. "<h1>Cock Ring</h1>\
  265. <p>You make the ring and with a sharp bone needle pierce " + rival.name + " cock and fit the ring!</p>");
  266. } else {
  267. Message("ShowCamp();Craft()",
  268. "<h1>Clit/Cock Ring</h1>\
  269. <p>You make the ring and with a sharp bone needle pierce " + rival.name + " clit and fit the ring!</p>");
  270. }
  271. }
  272. // Red Bracelet
  273. function craftLeftBraceletYou()
  274. {
  275. player.goods -= 1;
  276. player.metal -= 1;
  277. player.items.leftbracelet += 1;
  278. player.changeNatural("maternalism", 5);
  279. player.maternalism += 5;
  280. player.capTraits();
  281. player.calcPhysique();
  282. redraw();
  283. Message("ShowCamp();Craft()",
  284. "<h1>Red Bracelet</h1>\
  285. <p>You make the bracelet and put it on your wrist.</p>");
  286. }
  287. function craftLeftBraceletWoman(index)
  288. {
  289. player.goods -= 1;
  290. player.metal -= 1;
  291. rival = player.women[index];
  292. rival.items.leftbracelet += 1;
  293. rival.changeNatural("maternalism", 5);
  294. rival.maternalism += 5;
  295. rival.capTraits();
  296. rival.calcPhysique();
  297. player.changeNatural("maternalism", 10);
  298. player.maternalism += 10;
  299. player.capTraits();
  300. player.calcPhysique();
  301. redraw();
  302. Message("ShowCamp();Craft()",
  303. "<h1>Belly Button Stud</h1>\
  304. <p>You make the bracelet and put it on " + rival.name + "'s wrist.</p>");
  305. }