From 1710e7560013de417a219605cd5a30bc7ae11b8d Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Sun, 29 Nov 2020 19:12:34 -0500 Subject: [PATCH] integrate fresh start a little better, dedupe --- src/events/intro/pcAppearance.js | 252 +++++++++++++++---------------- 1 file changed, 120 insertions(+), 132 deletions(-) diff --git a/src/events/intro/pcAppearance.js b/src/events/intro/pcAppearance.js index 70bda99103e..6244ea2361b 100644 --- a/src/events/intro/pcAppearance.js +++ b/src/events/intro/pcAppearance.js @@ -80,22 +80,45 @@ App.UI.Player.design = function() { .addRange(55, 65, "<", "Well into middle age").addRange(70, 65, ">=", "Old"); options.addOption(`Your birthday was <strong>${V.PC.birthWeek}</strong> weeks ago.`, "birthWeek", V.PC).showTextBox(); + } else { + r = []; + r.push(`You are a`); + if (V.PC.title === 1) { + r.push(`masculine <strong>Master</strong>`); + } else { + r.push(`feminine ''Mistress'`); + } + r.push(`and everyone that matters calls you ${PlayerName()}.`); - options.addOption("Player aging is", "playerAging") - .addValue("Enabled", 2).on().addValue("Celebrate birthdays, but don't age.", 1).neutral().addValue("Disabled", 0).off() - .addComment("This option cannot be changed during the game."); - - if (V.PC.customTitle) { - options.addOption("Custom title", "customTitle", V.PC).showTextBox() - .addValue("Reset to default", "", () => { delete V.PC.customTitle; delete V.PC.customTitleLisp; }); - - options.addOption("Lisped custom title", "customTitleLisp", V.PC).showTextBox() - .addComment('If using a custom title, select Master or Mistress to set the gender of your title. Make sure to replace your "s"s with "th"s to have working lisps in your lisped title.'); + r.push(`You are ${V.PC.actualAge} years old which is`); + if (V.PC.actualAge >= 65) { + r.push(`<strong>old</strong>.`); + } else if (V.PC.actualAge >= 50) { + r.push(`<strong>well into middle age</strong>.`); + } else if (V.PC.actualAge >= 35) { + r.push(`<strong>entering middle age</strong>.`); } else { - options.addOption("Custom title", "customTitle", V.PC) - .addValue("Set custom title", "Master", () => V.PC.customTitleLisp = 'Mather'); + r.push(`<strong>surprisingly young</strong>.`); } + App.Events.addNode(el, r, "p"); + } + options.addOption("Player aging is", "playerAging") + .addValue("Enabled", 2).on().addValue("Celebrate birthdays, but don't age.", 1).neutral().addValue("Disabled", 0).off() + .addComment("This option cannot be changed during the game."); + + if (V.PC.customTitle) { + options.addOption("Custom title", "customTitle", V.PC).showTextBox() + .addValue("Reset to default", "", () => { delete V.PC.customTitle; delete V.PC.customTitleLisp; }); + + options.addOption("Lisped custom title", "customTitleLisp", V.PC).showTextBox() + .addComment('If using a custom title, select Master or Mistress to set the gender of your title. Make sure to replace your "s"s with "th"s to have working lisps in your lisped title.'); + } else { + options.addOption("Custom title", "customTitle", V.PC) + .addValue("Set custom title", "Master", () => V.PC.customTitleLisp = 'Mather'); + } + + if (freshStart) { App.UI.Player.appearance(options); options.addOption("Your face is", "faceShape", V.PC) @@ -107,9 +130,24 @@ App.UI.Player.design = function() { ["Sensual", "sensual"], ["Exotic", "exotic"] ]); + } else { + r = []; + + r.push(`You are a ${V.PC.nationality} ${V.PC.race} with`); + if (V.PC.markings === "heavily freckled") { + r.push(`heavily freckled`); + } else if (V.PC.markings === "freckles") { + r.push(`lightly freckled`); + } else { + r.push(`clear`); + } + r.push(`${V.PC.skin} skin, ${V.PC.hColor} hair and ${App.Desc.eyesColor(V.PC)}. You have a ${V.PC.faceShape} face.`); + App.Events.addNode(el, r, "p"); + } - App.UI.Player.refreshmentChoice(options); + App.UI.Player.refreshmentChoice(options); + if (freshStart) { option = options.addOption("Before you came to the Free Cities, you were a", "career", V.PC); if (V.PC.career === "arcology owner") { option.addValue("Arcology owner", "arcology owner"); @@ -175,8 +213,76 @@ App.UI.Player.design = function() { ]); el.append(options.render()); + } else { + r = []; + switch (V.PC.career) { + case "wealth": + r.push(`Prior to being an arcology owner, you were a member of the idle wealthy.`); + break; + case "capitalist": + r.push(`Prior to being an arcology owner, you were a business leader.`); + break; + case "mercenary": + r.push(`Prior to being an arcology owner, you were a mercenary.`); + break; + case "slaver": + r.push(`Prior to being an arcology owner, you were a slaver.`); + break; + case "engineer": + r.push(`Prior to being an arcology owner, you were an engineer.`); + break; + case "medicine": + r.push(`Prior to being an arcology owner, you were a surgeon.`); + break; + case "celebrity": + r.push(`Prior to being an arcology owner, you were a minor celebrity.`); + break; + case "BlackHat": + r.push(`Prior to being an arcology owner, you specialized in cracking databases and making mockeries of cyber security.`); + break; + case "arcology owner": + r.push(`Being an arcology owner defines your life now.`); + break; + case "escort": + r.push(`Prior to being an arcology owner, you knew how to survive off your looks and body.`); + break; + case "servant": + r.push(`Prior to being an arcology owner, you served a well-off`); + if (V.PC.counter.birthMaster >= 2) { + r.push(`master and bore him several children.`); + } else { + r.push(`master.`); + } + break; + case "gang": + r.push(`Prior to being an arcology owner, you were the leader of a ruthless gang.`); + break; + } + + r.push(`Word in the arcology is you acquired it through`); + switch (V.PC.rumor) { + case "wealth": + r.push(`a rather ridiculous amount of money.`); + break; + case "diligence": + r.push(`sheer effort.`); + break; + case "force": + r.push(`brutal force.`); + break; + case "social engineering": + r.push(`clever social manipulation.`); + break; + case "luck": + r.push(`blind luck.`); + break; + } + App.Events.addNode(el, r, "p"); + } + + App.UI.DOM.appendNewElement("h2", el, "Sexuality"); - App.UI.DOM.appendNewElement("h2", el, "Sexuality"); + if (freshStart) { options = new App.UI.OptionsGroup(); if (V.PC.vagina !== -1 && V.PC.dick !== 0) { @@ -270,124 +376,6 @@ App.UI.Player.design = function() { el.append(options.render()); } else { - r = []; - r.push(`You are a`); - if (V.PC.title === 1) { - r.push(`masculine <strong>Master</strong>`); - } else { - r.push(`feminine ''Mistress'`); - } - r.push(`and everyone that matters calls you ${PlayerName()}.`); - - r.push(`You are ${V.PC.actualAge} years old which is`); - if (V.PC.actualAge >= 65) { - r.push(`<strong>old</strong>.`); - } else if (V.PC.actualAge >= 50) { - r.push(`<strong>well into middle age</strong>.`); - } else if (V.PC.actualAge >= 35) { - r.push(`<strong>entering middle age</strong>.`); - } else { - r.push(`<strong>surprisingly young</strong>.`); - } - App.Events.addNode(el, r, "p"); - - r = []; - - r.push(`You are a ${V.PC.nationality} ${V.PC.race} with`); - if (V.PC.markings === "heavily freckled") { - r.push(`heavily freckled`); - } else if (V.PC.markings === "freckles") { - r.push(`lightly freckled`); - } else { - r.push(`clear`); - } - r.push(`${V.PC.skin} skin, ${V.PC.hColor} hair and ${App.Desc.eyesColor(V.PC)}. You have a ${V.PC.faceShape} face.`); - App.Events.addNode(el, r, "p"); - options = new App.UI.OptionsGroup(); - options.addOption("Player aging is", "playerAging") - .addValue("Enabled", 2).on().addValue("Celebrate birthdays, but don't age.", 1).neutral().addValue("Disabled", 0).off() - .addComment("This option cannot be changed during the game."); - - if (V.PC.customTitle) { - options.addOption("Custom title", "customTitle", V.PC).showTextBox() - .addValue("Reset to default", "", () => { delete V.PC.customTitle; delete V.PC.customTitleLisp; }); - - options.addOption("Lisped custom title", "customTitleLisp", V.PC).showTextBox() - .addComment('If using a custom title, select Master or Mistress to set the gender of your title. Make sure to replace your "s"s with "th"s to have working lisps in your lisped title.'); - } else { - options.addOption("Custom title", "customTitle", V.PC) - .addValue("Set custom title", "Master", () => V.PC.customTitleLisp = 'Mather'); - } - - App.UI.Player.refreshmentChoice(options); - - el.append(options.render()); - - r = []; - switch (V.PC.career) { - case "wealth": - r.push(`Prior to being an arcology owner, you were a member of the idle wealthy.`); - break; - case "capitalist": - r.push(`Prior to being an arcology owner, you were a business leader.`); - break; - case "mercenary": - r.push(`Prior to being an arcology owner, you were a mercenary.`); - break; - case "slaver": - r.push(`Prior to being an arcology owner, you were a slaver.`); - break; - case "engineer": - r.push(`Prior to being an arcology owner, you were an engineer.`); - break; - case "medicine": - r.push(`Prior to being an arcology owner, you were a surgeon.`); - break; - case "celebrity": - r.push(`Prior to being an arcology owner, you were a minor celebrity.`); - break; - case "BlackHat": - r.push(`Prior to being an arcology owner, you specialized in cracking databases and making mockeries of cyber security.`); - break; - case "arcology owner": - r.push(`Being an arcology owner defines your life now.`); - break; - case "escort": - r.push(`Prior to being an arcology owner, you knew how to survive off your looks and body.`); - break; - case "servant": - r.push(`Prior to being an arcology owner, you served a well-off`); - if (V.PC.counter.birthMaster >= 2) { - r.push(`master and bore him several children.`); - } else { - r.push(`master.`); - } - break; - case "gang": - r.push(`Prior to being an arcology owner, you were the leader of a ruthless gang.`); - break; - } - - r.push(`Word in the arcology is you acquired it through`); - switch (V.PC.rumor) { - case "wealth": - r.push(`a rather ridiculous amount of money.`); - break; - case "diligence": - r.push(`sheer effort.`); - break; - case "force": - r.push(`brutal force.`); - break; - case "social engineering": - r.push(`clever social manipulation.`); - break; - case "luck": - r.push(`blind luck.`); - break; - } - App.Events.addNode(el, r, "p"); - r = []; r.push(`You have a`); if (V.PC.vagina !== -1 && V.PC.dick !== 0) { -- GitLab