leader.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. function displayLeader(){
  2. $("#camp_feed").html("<div id='leader_options' class='push--top'></div><div id='leader_display'>");
  3. rival=leader;
  4. $("#leader_display").append(leader.activity);
  5. buttons = "";
  6. if(player.orientation>=50){
  7. buttons+="<button id='fuck_button' class='btn'> Fuck "+leader.name+"</button>";
  8. }
  9. if(player.dysphoria>0){
  10. buttons += " <button id='challenge_button' class='btn'>Challenge</button>";
  11. }
  12. if(player.masculinity()>leader.masculinity()*1.6){
  13. buttons += " <button id='dominate_button' class='btn'>Dominate</button>";
  14. }
  15. $("#leader_options").html(buttons);
  16. $("#dominate_button").click(function(){
  17. rival=leader;
  18. makeLeader(leader, player,true);
  19. EndRound(Message(NextWindow,`<h1>Domination</h1><p>You come to ${rival.name} and announce that you leader now. ${rival.heshe} look like ${rival.heshe} want to argue, and you ready for challenge, but then ${rival.heshe} take good look at you and hang head.</p>\
  20. <p>"Yes," ${rival.heshe} say. "You be leader. I only want be your woman from now on."</p>\
  21. <p>With whole clan watching, you get on top of ${rival.name} and begin to fuck her in front of everyone. Soon, all know that you leader again. ${rival.HeShe} cry out in pleasure when you release seed into her. ${rival.isMale()?"Maybe soon you turn him all the way to woman and breed baby in her.":"Hopefully she get pregnant now and add new baby for clan."}</p>`));
  22. });
  23. $("#fuck_button").click(function(){
  24. eatStatNut(player,"maternalism",2,false);
  25. eatStatNut(player,"allure",3,false);
  26. eatStatNut(player,"orientation",3,false);
  27. eatStatNut(leader,"orientation",-3,false);
  28. player.dysphoria-=7;
  29. var intro = `You go to ${leader.name} and ask to fuck. `;
  30. var activities = player.fuckCharacter(leader);
  31. console.log(activities);
  32. EndRound(Message(NextWindow,intro+activities[0]));/*
  33. if(player.allure+getRandomInt(-80,0)>0){
  34. player.maybeImpregnate(leader);
  35. Message(NextWindow,`You go to ${leader.name} and beg him use you as woman. He bring you to furs, and you spread legs eagerly for him, happy to be fucked like woman.`);
  36. }else{
  37. Message(NextWindow,`You go to ${leader.name} and beg him use you as woman. He laugh and tell you to use mouth instead. You get on knees like good woman and open mouth. You lick his cock, then drink down seed. You hope he fuck you next time.</p>`);
  38. }*/
  39. });
  40. $("#challenge_button").click(function(){
  41. var victory = function(){
  42. var oldleader = leader;/*
  43. if(player.maleName){
  44. player.name=player.maleName;
  45. }
  46. if(!player.women.includes(leader)){
  47. player.women.push(leader);
  48. }
  49. if(player.women.includes(player)){player.women.splice(player.women.indexOf(player),1);}
  50. leader.women=[];//bye bye random other women.
  51. leader=player;*/
  52. var nm = getUnusedFemaleName();
  53. $("#output").html("<h1>Victory</h1><p>With loud roar, you stand over beaten rival. Your Changra too strong for him, you too strong for him. He think he can make you his woman, but he wrong.</p><p>Now he on ground crying as he realize he is your woman now. To show him he is woman now, you give new name: <input id='woman_name' value='" + nm + "'>\
  54. <button id='name_woman' class='btn'>Give Name</button>\
  55. ");
  56. $('#woman_name').click(function() {
  57. $("#woman_name").focus();
  58. });
  59. $("#name_woman").click(function() {
  60. var newName = $("#woman_name").val().length > 0 ? $("#woman_name").val() : getUnusedFemaleName();
  61. makeLeader(leader,player,true,newName);
  62. player.experience += minValue(Math.floor(rival.femininity() / 3), 15);
  63. player.goods += rival.goods;
  64. rival.goods = 0;
  65. rival.round = player.round; // day captured
  66. Camp();
  67. });
  68. };
  69. var defeat = function(){
  70. player.dysphoria-=15;//penalty for losing fight. Large jump towards surrender.
  71. $.each(AVATAR_TRAITS, function(index, trait) {
  72. player.natural[trait] = player[trait];
  73. });
  74. EndRound(Message(NextWindow,`<h1>Defeat</h1><p>${leader.name} yell and point as powerful changra flow into you.</p>"Why you fight, ${player.name}?" ${leader.heshe} say. "You still my woman. No fight, just be mine."</p><p>You nod head, unable to disagree. What you thinking, trying to fight big strong man like that? All you are is woman. You just want stay in den, grow babies in belly and be mother for big clan.</p>`));
  75. };
  76. rival=leader;
  77. EncounterNamedRival(rival);
  78. $(".stats").show();
  79. rival.Victory=victory;
  80. rival.Defeat = defeat;
  81. Battle(rival,false);
  82. });
  83. redraw();
  84. };
  85. function makeLeader(oldLeader,newLeader,takeWomen,renameOld){
  86. if(takeWomen===undefined){//by default new leader takes old leader's women.
  87. takeWomen=true;
  88. }
  89. if(renameOld===undefined){renameOld=false;}
  90. if(newLeader.maleName){
  91. if(newLeader.name!==newLeader.maleName){newLeader.femaleName=newLeader.name;}
  92. newLeader.name=newLeader.maleName;
  93. }
  94. if(oldLeader.femaleName){
  95. if(!oldLeader.maleName){oldLeader.maleName=oldLeader.name;}
  96. oldLeader.name=oldLeader.femaleName;
  97. }
  98. if(takeWomen){
  99. newLeader.women = Array.from(new Set([...newLeader.women, ...oldLeader.women]));
  100. }
  101. if(oldLeader!==player){oldLeader.women=[];}
  102. if(newLeader.women.includes(newLeader)){newLeader.women.splice(newLeader.women.indexOf(newLeader),1);}
  103. if(!newLeader.women.includes(oldLeader)){newLeader.women.push(oldLeader);}
  104. if(newLeader===player){
  105. camp="main";
  106. }
  107. if(renameOld){
  108. oldLeader.maleName=oldLeader.name;
  109. if(renameOld===true){
  110. oldLeader.name=getUnusedFemaleName();
  111. }else{
  112. oldLeader.name=renameOld;
  113. }
  114. oldLeader.femaleName=oldLeader.name;
  115. }
  116. leader=newLeader;
  117. leader.women.filter(x=>x!==player).forEach(x=>x.dysphoria=x.dysphoria/1.75-4);
  118. }