woman.js 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. //Woman Functions
  2. /*jshint multistr:true*/
  3. // Get an unused name for a new woman, to limit cases of the same name being randomly chosen
  4. function getUnusedFemaleName() {
  5. var ntry = 0;
  6. var str = "";
  7. var nok;
  8. var usedNames = [...player.women];
  9. if(player!==leader){
  10. usedNames = usedNames.concat(leader.women);
  11. usedNames.push(player);
  12. }
  13. while (ntry < 5) { // try 5 times
  14. nok = true;
  15. str = randomFemaleName();
  16. for (var i = 0; i < usedNames.length; i += 1 ) {
  17. if (usedNames[i].name == str) {
  18. nok = false;
  19. break;
  20. }
  21. }
  22. if (nok === true) break;
  23. ntry += 1;
  24. }
  25. return str;
  26. }
  27. function displayWomen(){
  28. function displayWoman(index){
  29. rival = leader.women[index];
  30. var options = ""
  31. if(leader===player){
  32. options += " <button id='fuck_button' class='btn'>Fuck</button> ";
  33. if(leader.women[index].allowForage==true){
  34. options +=" <button id='let_forage_button' class='btn'>Stop Letting Forage</btn> ";
  35. }else{
  36. options +=" <button id='let_forage_button' class='btn'>Start Letting Forage</btn> ";
  37. }
  38. if(rival.masculinity()<leader.masculinity()){
  39. options +=" <button id='punish_woman_button' class='btn'>Punish</button>";
  40. }
  41. if((rival.masculinity()>leader.masculinity() || rival.isMale()) && (rival.dysphoria>0)){
  42. options += "&nbsp; <button id='challenge_woman_button' class='btn'>Challenge</btn> ";
  43. }
  44. if((rival.masculinity()>(leader.masculinity()*1.25))&&leader.isFemale()&&rival.isMale() && (rival.physique.penis<8) && (player.physique.breasts>4)){
  45. options += "&nbsp; <button id='submit_woman_button' class='btn'>Submit</btn> ";
  46. }
  47. }else{//Give player social options.
  48. if((rival!==player)&&(!player.socialActivity)){
  49. if((rival.isFemale()&&player.orientation<65)||(rival.isMale()&&player.orientation>45)){
  50. options += " <button id='social_flirt_button' class='btn'>Flirt</button>";
  51. }
  52. if(player.dysphoria<15&&((rival.isFemale()&&player.orientation<65)||(rival.isMale()&&player.orientation>45))){
  53. options += " <button id='social_seduce_button' class='btn'>Seduce</button>";
  54. }
  55. if(player.dysphoria>20){
  56. options += " <button id='social_complain_button' class='btn'>Complain</button>";
  57. }
  58. if(player.dysphoria<15 && player.domesticity>rival.domesticity){
  59. options += " <button id='social_teach_button' class='btn'>Teach</button>";
  60. }
  61. }
  62. }
  63. var socialOpts = {"flirt":"flirtWoman","seduce":"seduceWoman", "complain":"complainToOther", "teach":"teachWoman"};
  64. $("#woman_options").html(options);
  65. for(var opt in socialOpts){
  66. $("#social_"+opt+"_button").click({i:index,display:displayWoman,option:socialOpts[opt]},function(evt){
  67. player.socialActivity=evt.data.option;
  68. player.socialTarget=leader.women[evt.data.i];
  69. evt.data.display(evt.data.i);
  70. });
  71. };
  72. $("#punish_woman_button").click(index,function(evt){
  73. var response = "";
  74. rival=leader.women[evt.data];
  75. if(!rival.naughty){
  76. response = `"Why you punish?" ${rival.name} cry. "Me been good woman!"`;
  77. rival.dysphoria+=15;
  78. }else{
  79. response = `"Me sorry!" ${rival.name} cry, begging you to stop. "I be good from now on."`;
  80. rival.dysphoria-=getRandomInt(5,17);
  81. }
  82. var activity = `<p>Face stern, you call ${rival.name} over to face you.</p><p>"You have been bad!" you tell ${rival.youhimher}, "Now I punish you."</p>\
  83. <p>${rival.YouHeShe} protest, but you clan leader, so ${rival.youheshe} must obey when you pull her over knee and slap bottom. Soon ${rival.youheshe} crying womanly tears.</p>\
  84. <p>${response}</p>\
  85. <p>When you feel ${rival.youheshe} punished enough, you let ${rival.youhimher} off lap to rub sore bottom.</p>`;
  86. EndRound(Message(NextWindow,activity));
  87. });
  88. $("#let_forage_button").click({i:index,display:displayWoman},function(evt){
  89. console.log(evt.data);
  90. leader.women[evt.data.i].allowForage = !leader.women[evt.data.i].allowForage;
  91. evt.data.display(evt.data.i);
  92. });
  93. $("#fuck_button").click(index,function(evt){
  94. leader.women[evt.data].activity="";
  95. //leader.women[evt.data].fornicate();
  96. var activities = leader.fuckCharacter(leader.women[evt.data],true);
  97. leader.women[evt.data].doneTo=activities[1];
  98. console.log(activities[0]);
  99. EndRound(Message(NextWindow,activities[0],false,leader.women[evt.data]));
  100. //resetRival();
  101. $("#camp_feed").html("");
  102. });
  103. $("#submit_woman_button").click(index,function(evt){
  104. rival = player.women[evt.data];
  105. var newName = getUnusedFemaleName();
  106. makeLeader(player,rival,true,newName);
  107. player.dysphoria=3*player.masculinity()+10*player.Mods.ironwill;
  108. AVATAR_TRAITS.forEach(x=>player[x]<50?eatStatNut(player,x,getRandomInt(15,35)):eatStatNut(player,x,getRandomInt(5,20)));
  109. EndRound(Message(NextWindow,`<h1>Submit</h1><p>You try to be good leader and clanfather, but it is not working. Look at your body, it is soft and womanly. How can you be father when you not have man parts anymore? You look at ${rival.name}. He taken as woman, but instead become strong man. Maybe you not supposed to be clan father after all. Maybe your place is clanmother and woman to strong leader?</p><p>${rival.name} surprised when you drop to knees and take his man-thing in mouth, but soon he happily accept your submission. Now you not clan leader anymore. You just clan leader\'s woman like all the others. He thrust in and out of your hungry fuckhole, breeding you into new clan mother.</p><p>You not sure if this was best idea, but it is done. He is leader now, and will not give that up without fight.</p>`));
  110. });
  111. $("#challenge_woman_button").click(index,function(evt){
  112. var w = player.women[evt.data];
  113. function startFight(){
  114. function chVictory(){
  115. rival.dysphoria-=15;
  116. if(rival.dysphoria>0){rival.dysphoria=0;}
  117. EndRound(Message(NextWindow,`<h1>Victory</h1><p>Soon ${rival.heshe} no resist your powerful changra as you turn her into back into docile woman. You clanfather here, she your woman. Is good to remind her this. Soon she docile and happy like all the rest.</p>`));
  118. }
  119. function chDefeat(){
  120. var newName = getUnusedFemaleName();
  121. var oldName=player.name;
  122. makeLeader(player,rival,true,newName);
  123. player.dysphoria=3*player.masculinity()+10*player.Mods.ironwill;
  124. /*$.each(AVATAR_TRAITS, function(index, trait) {
  125. player.natural[trait] = player[trait];
  126. });*/
  127. EndRound(Message(NextWindow,`<h1>Defeat!</h1><p>"Ha!" say ${rival.name}. "You try make me your woman, but you wrong. You no man, you woman now. I call you ${newName}."</p>\
  128. <p>You try resist, say name is ${oldName}, not ${newName}, but it no use. Your changra slow, weak. It no listen when you try become man again. He man now, though. Can no fight him anymore, no resist. Only let him take you as woman and try escape later.</p>`));
  129. }
  130. rival = w;
  131. EncounterNamedRival(rival);
  132. for(var s in rival.natural){
  133. rival[s]=rival.natural[s];//restore rival for the challenge
  134. }
  135. rival.Victory = chVictory;
  136. rival.Defeat = chDefeat;
  137. $(".stats").show();
  138. Battle(rival,false);
  139. }
  140. Message(NextWindow,`<p>You challenge unruly ${w.name}, remind ${w.himher} that ${w.heshe} belong to you.</p><p>Thrill of battle revive ${w.hisher} dorman changra.</p>`);
  141. });
  142. if (player.Mods.craftleftbracelet > 0) $("#woman_display").html("<h2 style='margin-bottom:2px;'>"+rival.name+"</h2><font size='-1'>Children: " + rival.childrenboy + " boys, " + rival.childrengirl + " girls</font>");
  143. else $("#woman_display").html("<h2 style='margin-bottom:2px;'>"+rival.name+"</h2><font size='-1'>Children: " + rival.childrenboy + "</font>");
  144. if (rival.round > 0) $("#woman_display").append("<font size='-1'>, Brought to clan on week " + rival.round + "</font>");
  145. //editWoman();
  146. // Description
  147. var fate = rival.activity;
  148. $("#woman_display").append("<p>"+fate+"</p>");
  149. var acceptance="";
  150. if(rival.dysphoria<=0){
  151. acceptance=`${rival.HeShe} very happy in camp. Want nothing more than to be woman and mother for clan.`;
  152. }else if(rival.dysphoria<20){
  153. acceptance=`${rival.HeShe} hum happy song as ${rival.heshe} work.`;
  154. }else if(rival.dysphoria<45){
  155. acceptance=`${rival.name} mutter about becoming woman, but ${rival.heshe} smile while doing it.`;
  156. }else if(rival.dysphoria<75){
  157. acceptance=`${rival.name} stomp around camp unhappy. Say ${rival.heshe} not real woman, ${rival.heshe} man instead, but ${rival.heshe} look and act more like woman every day.`;
  158. }else{
  159. acceptance=`${rival.name} complain loudly to all that ${rival.heshe} is really big, strong man. ${rival.HeShe} vow to ancestors that ${rival.heshe} will become strong clanfather again one day.`;
  160. }
  161. $("#woman_display").append("<p>"+acceptance+"</p>");
  162. redraw();
  163. }
  164. if ($("#women_buttons").is(":visible")) {
  165. $("#camp_feed").html("");
  166. resetRival();
  167. return;
  168. }
  169. $("#camp_feed").html(
  170. "<div id='women_buttons' class='push--top'></div>\
  171. <div id='woman_options'></div>\
  172. <div id='woman_display'></div>");
  173. $.each(leader.women, function( index, value ) {
  174. var curBtn = $("<button id='woman_button_"+index+"' class='btn push--right'>"+value.name+"</button>");
  175. /*
  176. if (leader.women[index].isFutanari()) $("#women_buttons").append("<button id='woman_button_"+index+"' class='btn btn-futa push--right'>"+value.name+"</button>");
  177. else if (leader.women[index].isFemale()) $("#women_buttons").append("<button id='woman_button_"+index+"' class='btn btn-woman push--right'>"+value.name+"</button>");
  178. else $("#women_buttons").append("<button id='woman_button_"+index+"' class='btn btn-man push--right'>"+value.name+"</button>");
  179. $("#woman_button_"+index).click(function(){
  180. displayWoman(index);
  181. });*/
  182. if(leader.women[index].isFutanari()){curBtn.addClass("btn-futa");}
  183. else if (leader.women[index].isFemale()){curBtn.addClass("btn-woman");}
  184. else {curBtn.addClass("btn-man");}
  185. if(leader.women[index]===player){
  186. curBtn.addClass("btn-player");
  187. }
  188. $("#women_buttons").append(curBtn);
  189. $("#woman_button_"+index).click(function(){
  190. displayWoman(index);
  191. })
  192. });
  193. }
  194. function editWoman()
  195. {
  196. $("#woman_display").append(
  197. "<font size='-1'>\
  198. <a id='expandwoman' href='#'>Click Here To Edit " + rival.name + "</a>\
  199. <table class='slidertable3' id='womantable'>\
  200. <tr><td>Submissiveness</td><td><div id='slider_submissiveness'></div></td><td>Dominance</td></tr>\
  201. <tr><td>Domesticity</td><td><div id='slider_domesticity'></div></td><td>Adventurousness</td></tr>\
  202. <tr><td>Maternalism</td><td><div id='slider_maternalism'></div></td><td>Paternalism</td></tr>\
  203. <tr><td>Allure</td><td><div id='slider_allure'></div></td><td>Lustfulness</td></tr>\
  204. <tr><td>Homosexual</td><td><div id='slider_orientation'></div></td><td>Heterosexual</td></tr>\
  205. <tr><td>Boobs+</td><td><div id='slider_boobs'></div></td></tr>\
  206. <tr><td>Breast Rows</td><td><div id='slider_rows'></div></td></tr>\
  207. <tr><td>Genitals</td><td><div id='slider_cocks'></div></td></tr>\
  208. <tr><td>Cock+</td><td><div id='slider_cock'></div></td></tr>\
  209. <tr><td>Balls</td><td><div id='slider_balls'></div></td></tr>\
  210. <tr><td>Amazon+</td><td><div id='slider_amazon'></div></td></tr>\
  211. <tr><td>Horns</td><td><div id='slider_horns'></div></td></tr>\
  212. <tr><td>Tail</td><td><div id='slider_tail'></div></td></tr>\
  213. <tr><td>Pregnancy</td><td><div id='slider_pregnancy'></div></td></tr>\
  214. </table></font>\
  215. ");
  216. $('#expandwoman').click(function(){
  217. $('#womantable').slideToggle('fast');
  218. });
  219. $("#slider_maternalism").slider({value:100 - rival.maternalism,min:0,max:100,slide:function(event, ui) {
  220. rival.maternalism=100-ui.value;
  221. redraw();
  222. }});
  223. $("#slider_submissiveness").slider({value:100-rival.submissiveness,min:0,max:100,slide:function(event, ui) {
  224. rival.submissiveness=100-ui.value;
  225. redraw();
  226. }});
  227. $("#slider_domesticity").slider({value:100-rival.domesticity,min:0,max:100,slide:function(event, ui) {
  228. rival.domesticity=100-ui.value;
  229. redraw();
  230. }});
  231. $("#slider_allure").slider({value:100-rival.allure,min:0,max:100,slide:function(event, ui) {
  232. rival.allure=100-ui.value;
  233. redraw();
  234. }});
  235. $("#slider_orientation").slider({value:100-rival.orientation,min:0,max:100,slide:function(event, ui) {
  236. rival.orientation=100-ui.value;
  237. redraw();
  238. }});
  239. $("#slider_boobs").slider({value:rival.Mods.breasts,min:-20,max:200,slide:function(event, ui) {
  240. rival.Mods.breasts = ui.value;
  241. redraw();
  242. }});
  243. $("#slider_amazon").slider({value:rival.Mods.amazon,min:0,max:20,slide:function(event, ui) {
  244. rival.Mods.amazon = ui.value;
  245. redraw();
  246. }});
  247. $("#slider_cock").slider({value:rival.Mods.cock,min:0,max:20,slide:function(event, ui) {
  248. rival.Mods.cock = ui.value;
  249. redraw();
  250. }});
  251. $("#slider_balls").slider({value:rival.Mods.balls,min:0,max:20,slide:function(event, ui) {
  252. rival.Mods.balls = ui.value;
  253. redraw();
  254. }});
  255. $("#slider_rows").slider({value:rival.physique.breastrows,min:0,max:6,slide:function(event, ui) {
  256. rival.physique.breastrows = ui.value;
  257. redraw();
  258. }});
  259. $("#slider_cocks").slider({value:rival.physique.gentialscnt,min:0,max:6,slide:function(event, ui) {
  260. rival.physique.gentialscnt = ui.value;
  261. redraw();
  262. }});
  263. $("#slider_horns").slider({value:rival.physique.horns,min:0,max:10,slide:function(event, ui) {
  264. rival.physique.horns = ui.value;
  265. redraw();
  266. }});
  267. $("#slider_tail").slider({value:rival.physique.tail,min:0,max:10,slide:function(event, ui) {
  268. rival.physique.tail = ui.value;
  269. redraw();
  270. }});
  271. $("#slider_pregnancy").slider({value:rival.pregnancy,min:0,max:100,slide:function(event, ui) {
  272. rival.pregnancy = ui.value;
  273. redraw();
  274. }});
  275. }