start.js 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. function insertCharacterCreationIO(){
  2. $(".stats").hide();
  3. $("#output").html(
  4. "<h1>Design Your Avatar</h1>\
  5. <h2>Name</h2>\
  6. <input id='player_name_input' value='"+randomMaleName()+"' placeholder='Name'/>\
  7. <input type='radio' name='chkGender' value='Male' checked>Male</input>\
  8. <input type='radio' name='chkGender' value='Female'>Female</input>\
  9. <input type='radio' name='chkGender' value='Futa'>Futanari</input>\
  10. <h2>Coloration</h2>\
  11. <table class='slidertable'>\
  12. <tr><td>Complexion: </td><td><div id='slider_skin'></div></td></tr>\
  13. <tr><td>Hair Color: </td><td><div id='slider_hair'></div></td></tr>\
  14. <tr><td>Eye Color: </td><td><div id='slider_eyes'></div></td></tr>\
  15. </table>\
  16. <h2>Personality</h2>\
  17. <table class='slidertable2'>\
  18. <tr><td>Submissiveness</td><td><div id='slider_submissiveness'></div></td><td>Dominance</td></tr>\
  19. <tr><td>Domesticity</td><td><div id='slider_domesticity'></div></td><td>Adventurousness</td></tr>\
  20. <tr><td>Maternalism</td><td><div id='slider_maternalism'></div></td><td>Paternalism</td></tr>\
  21. <tr><td>Allure</td><td><div id='slider_allure'></div></td><td>Lustfulness</td></tr>\
  22. <tr><td>Homosexual</td><td><div id='slider_orientation'></div></td><td>Heterosexual</td></tr>\
  23. </table>\
  24. <table><tr><td><b>Points:</b></td><td><div id='CustomPoints'></div></td></tr></table>\
  25. <br><button id='accept' class='btn'>Start</button>\
  26. <button id='load_button' class='btn'>Load</button>");
  27. $("#slider_eyes").slider({value: player["physique"].irisc,min:1,max:30,slide:function(event, ui){player["physique"].irisc=ui.value; drawfigure('player_avatar', player);}});
  28. $("#slider_skin").slider({value:player["physique"].skin,min:1,max:35,step:.1,slide:function(event, ui){player["physique"].skin=ui.value; drawfigure('player_avatar', player);}});
  29. $("#slider_hair").slider({value:player["physique"].hairc,min:1,max:35,step:.1,slide:function(event, ui){player["physique"].hairc=ui.value; drawfigure('player_avatar', player);}});
  30. var pts = 100;
  31. var gnd = "Male";
  32. $("#CustomPoints").html(pts);
  33. $("#slider_maternalism").slider({value:51-player.maternalism,min:20,max:30,slide:function(event, ui)
  34. {
  35. var base = gnd == "Female" ? 100 : 51;
  36. var diff = player.maternalism - (base - ui.value);
  37. if (diff > pts) return false;
  38. pts -= diff;
  39. $("#CustomPoints").html(pts);
  40. player.maternalism = base - ui.value;
  41. drawfigure('player_avatar', player);
  42. }
  43. });
  44. $("#slider_submissiveness").slider({value:51-player.submissiveness,min:20,max:30,slide:function(event, ui)
  45. {
  46. var base = gnd == "Female" ? 100 : 51;
  47. var diff = player.submissiveness - (base - ui.value);
  48. if (diff > pts) return false;
  49. pts -= diff;
  50. $("#CustomPoints").html(pts);
  51. player.submissiveness = base - ui.value;
  52. drawfigure('player_avatar', player);}}
  53. );
  54. $("#slider_domesticity").slider({value:51-player.domesticity,min:20,max:30,slide:function(event, ui)
  55. {
  56. var base = gnd == "Female" ? 100 : 51;
  57. var diff = player.domesticity - (base - ui.value);
  58. if (diff > pts) return false;
  59. pts -= diff;
  60. $("#CustomPoints").html(pts);
  61. player.domesticity = base - ui.value;
  62. drawfigure('player_avatar', player);}}
  63. );
  64. $("#slider_allure").slider({value:51-player.allure,min:20,max:30,slide:function(event, ui)
  65. {
  66. var base = gnd == "Female" ? 100 : 51;
  67. var diff = player.allure - (base - ui.value);
  68. if (diff > pts) return false;
  69. pts -= diff;
  70. $("#CustomPoints").html(pts);
  71. player.allure = base - ui.value;
  72. drawfigure('player_avatar', player);}}
  73. );
  74. $("#slider_orientation").slider({value:51-player.orientation,min:20,max:30,slide:function(event, ui)
  75. {
  76. var base = gnd == "Female" ? 100 : 51;
  77. var diff = player.orientation - (base - ui.value);
  78. if (diff > pts) return false;
  79. pts -= diff;
  80. $("#CustomPoints").html(pts);
  81. player.orientation = base - ui.value;
  82. drawfigure('player_avatar', player);}}
  83. );
  84. $("input[name='chkGender']").change(function(e){
  85. var newgnd = $(this).val();
  86. if (newgnd == "Futa") {
  87. $("#player_name_input").val(randomFemaleName());
  88. player.futa = 1;
  89. player.Mods.cock = 1;
  90. if (gnd == "Female") {
  91. $.each(AVATAR_TRAITS, function(index, trait){
  92. player[trait] = player[trait] - 50;
  93. });
  94. }
  95. } else if (newgnd == "Male") {
  96. player.futa = 0;
  97. player.Mods.cock = 0;
  98. $("#player_name_input").val(randomMaleName());
  99. if (gnd == "Female") {
  100. $.each(AVATAR_TRAITS, function(index, trait){
  101. player[trait] = player[trait] - 50;
  102. });
  103. }
  104. } else if (newgnd == "Female") {
  105. $("#player_name_input").val(randomFemaleName());
  106. player.futa = 0;
  107. player.Mods.cock = 0;
  108. $.each(AVATAR_TRAITS, function(index, trait){
  109. player[trait] = player[trait] + 50;
  110. });
  111. }
  112. gnd = newgnd;
  113. drawfigure('player_avatar', player);
  114. })
  115. $("#player_name_input").click(function(){
  116. $("#player_name_input").focus();
  117. });
  118. $("#load_button").click(function(){
  119. new loadGame("location.reload();");
  120. });
  121. $("#accept").click(function(){
  122. player.name = $("#player_name_input").val();
  123. $.each(AVATAR_TRAITS, function(index, trait){
  124. player.natural[trait] = player[trait];
  125. player.minimums[trait] = player[trait] - 15;
  126. player.maximums[trait] = player[trait] + 35;
  127. player.description[trait] = Math.floor(player[trait]/10);
  128. });
  129. if (pts > 10) player.experience += Math.floor(pts / 10) * 5;
  130. player.round = 1;
  131. ShowCamp();
  132. });
  133. leader=player;
  134. player.allowForage=true;
  135. player.goods=5;
  136. drawfigure('player_avatar', player);
  137. createRival(0);
  138. createDemon();
  139. createSmith();
  140. }
  141. $(document).ready(function() {
  142. // Work around for IE compatibility for playing offline
  143. !localStorage&&(l=location, p=l.pathname.replace(/(^..)(:)/,"$1$$"), (l.href=l.protocol+"//127.0.0.1"+p));
  144. Message("insertCharacterCreationIO()", "<h1 class='fancy'>" + document.title + "</h1>\
  145. <button id='load_button' class='btnsmall' title='Load the Saved game'>Load Game</button>\
  146. <button id='new_button' class='btnsmall' title='New Game'>New Game</button>\
  147. <p>You man of Iberninth. This hard land. Much ice, many bear, always strong wind like howling wolf. \
  148. Only strong clan survive, but you, you have no clan. Your clan dead.</p>\
  149. <p>You hide in cold cave, lonesome. You wish for new clan and brothers. You \
  150. wish for talking and womanfolk and fucking. But you only laugh bitter. No \
  151. outside clan take you as brother. They have plenty brother. They want womanfolk . . . \
  152. and maybe they make you womanfolk if they catch you.</p>\
  153. <p>This land Iberninth. This land hard land. Most woman child not grow into woman mother. \
  154. Manfolk desperate, so they use Changra to battle other manfolk. If their Changra strong, \
  155. they turn other manfolk into womanfolk, and womanfolk become theirs. If manfolk very \
  156. strong, then they gather many womanfolk and have many son and bring much honor to clan.</p>\
  157. <p>Cold wind howl through cave, and you shiver quiet. This life make suffer.</p>\
  158. <p>So you decide. You find \
  159. lone man and ambush. You make man your woman. You start new clan . . . or you \
  160. become part of other clan in process. Either way, you warmer.</p>");
  161. NextWindow();
  162. $("#load_button").click(function(){
  163. if (loadGame("location.reload();") === 0) {
  164. alert("No saved games, starting a new game");
  165. }
  166. });
  167. $("#new_button").click(insertCharacterCreationIO);
  168. });