round.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // New round/game week
  2. challengedYet=false;
  3. showCamp = true;
  4. challengeResult = "";
  5. function advanceRound()
  6. {
  7. challengedYet=false;
  8. showCamp=true;
  9. challengeResult="";
  10. player.pierceMessage=false;
  11. // Update player
  12. if(player===leader){
  13. player.rest();
  14. }
  15. player.round += 1;
  16. player.activity = "";
  17. player.doneTo = "";
  18. leader.activity="";
  19. leader.doneTo="";
  20. var enoughFood=true;
  21. // Update clan members
  22. leader.women.forEach(function(woman){woman.activity="";woman.doneTo="";});
  23. player.advancePregnancy();
  24. player.women.forEach(function(woman){
  25. woman.advancePregnancy();
  26. if(player===leader){
  27. woman.naughty=false;
  28. woman.setActivity();
  29. woman.advanceDesire();
  30. if(player.goods>=1){
  31. player.goods-=1;
  32. }else{
  33. woman.dysphoria+=10;
  34. enoughFood=false;
  35. }
  36. }
  37. if(woman.isMale()){woman.dysphoria+=5;}
  38. });
  39. if(player!==leader){
  40. player.dysphoria-=2;
  41. //leader.women.forEach(function(woman){woman.activity="";woman.doneTo="";});
  42. leader.women.forEach(function(woman){
  43. if(woman!==player){
  44. woman.setActivity();
  45. woman.advanceDesire();
  46. }
  47. if(woman.isMale()){woman.dysphoria+=0.5;}
  48. });
  49. leader.setActivity();
  50. if(player.socialActivity){
  51. console.log("trying social",player.socialActivity,player.socialTarget);
  52. player[player.socialActivity]([player.socialTarget])(player);
  53. }
  54. if(jewelryMods.filter(x=>player.items[x])){
  55. if(getRandomInt(1,10)==1){//DEBUG: set higher. Should be rareish event
  56. var mod = getRandomElem(jewelryMods.filter(x=>player.items[x]));
  57. player.dysphoria-=3;
  58. switch(mod){
  59. case "nipplerings":
  60. player.pierceMessage = "The rings on your nipples tug sometimes when you move. Makes you think of big, swolen breasts.";
  61. eatStatNut(player,"allure",3);
  62. eatStatNut(player,"maternalism",1);
  63. break;
  64. case "collar":
  65. player.pierceMessage = "You rub collar on neck. Think about being owned by chief.";
  66. eatStatNut(player,"submissiveness",4);
  67. break;
  68. case "headband":
  69. player.pierceMessage = "Pretty headband make you feel sexy.";
  70. eatStatNut(player,"allure",4);
  71. break;
  72. case "bellybuttonstud":
  73. player.pierceMessage = "Pretty gem in bellybutton make you think of having baby in belly.";
  74. eatStatNut(player,"maternalism",4);
  75. break;
  76. case "clitcockring":
  77. player.pierceMessage = "The ring between your legs rub sometimes in very good way. You think about maybe putting other things between legs.";
  78. eatStatNut(player,"orientation",4);
  79. break;
  80. }
  81. }
  82. }
  83. }
  84. // Update NPC's
  85. demon.advancePregnancy();
  86. smith.advancePregnancy();
  87. // Update any runaways
  88. runaways.forEach(function(run){
  89. run.advancePregnancy();
  90. });
  91. if(player===leader && !enoughFood){
  92. player.activity+="\nYou not have enough food for all tribe. Hungry womenfolk wonder if you real man after all.";
  93. }
  94. if((player!==leader)&&(leader.women.includes(thoth))){//advance Thoth plotline for submissives
  95. //ThothReact() //Trying out new storyline mode
  96. }
  97. player.socialActivity=false;
  98. player.socialTarget=false;
  99. }