code:
:: Related Links [nobr]

/* pages asking the player to click a link for more information have no section heading */
<<if !["Being in Charge", "Body", "Fetishes", "Game Mods", "Inflation", "Leadership Positions", "Lolimod", "Lore", "Obtaining Slaves", "Paraphilias", "Playing Free Cities", "Skills", "Slave Assignments", "Slave Modification", "Slaves", "Terrain Types", "The X-Series Arcology"].includes($encyclopedia)>>

Related Links

<</if>>

<<set _pass = App.Encyclopedia.renderCategory($encyclopedia)>>
<<if _pass>>
	<<includeDOM _pass>>
<<else>>

<<switch $encyclopedia>>

/**********
SLAVE SKILLS
**********/
<<case "Anal Skill" "Combat Skill" "Entertainment Skill" "Oral Skill" "Skills" "Vaginal Skill" "Whoring Skill">>
	<<= App.Encyclopedia.Dialog.linkSC("Anal Skill", "Anal Skill")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Combat Skill", "Combat Skill")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Entertainment Skill", "Entertainment Skill")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Oral Skill", "Oral Skill")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Vaginal Skill", "Vaginal Skill")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Whoring Skill", "Whoring Skill")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Career Experience", "Career Experience")>>

/**********
SLAVE FETISHES:
**********/
<<case "Boob Fetishists" "Buttsluts" "Cumsluts" "Doms" "Fetishes" "Humiliation Fetishists" "Masochists" "Pregnancy Fetishists" "Sadists" "Submissives">>
	<<= App.Encyclopedia.Dialog.linkSC("Boob Fetishists", "Boob Fetishists")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Buttsluts", "Buttsluts")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Cumsluts", "Cumsluts")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Doms", "Doms")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Humiliation Fetishists", "Humiliation Fetishists")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Masochists", "Masochists")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Pregnancy Fetishists", "Pregnancy Fetishists")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Sadists", "Sadists")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Submissives", "Submissives")>>

/**********
SLAVE PARAPHILIAS
**********/
<<case "Abusiveness" "Anal Addicts" "Attention Whores" "Breast Obsession" "Breeding Obsession" "Cum Addicts" "Maliciousness" "Paraphilias" "Self Hatred" "Self Neglect">>
	<<= App.Encyclopedia.Dialog.linkSC("Abusiveness", "Abusiveness")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Anal Addicts", "Anal Addicts")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Attention Whores", "Attention Whores")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Breast Obsession", "Breast Obsession")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Breeding Obsession", "Breeding Obsession")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Cum Addicts", "Cum Addicts")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Maliciousness", "Maliciousness")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Self Hatred", "Self Hatred")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Self Neglect", "Self Neglect")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Fetishes", "Fetishes")>>

/**********
SLAVE QUIRKS
**********/
<<case "Adores Men" "Adores Women" "Advocate" "Confident" "Cutting" "Fitness" "Funny" "Insecure" "Sinful" "Caring" "Gagfuck Queen" "Painal Queen" "Perverted" "Quirks" "Romantic" "Size Queen" "Strugglefuck Queen" "Tease" "Unflinching">>
	//Behavioral <<= App.Encyclopedia.Dialog.linkSC("Quirks", "Quirks")>>://
	<<= App.Encyclopedia.Dialog.linkSC("Adores men", "Adores Men")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Adores women", "Adores Women")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Advocate", "Advocate")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Confident", "Confident")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Cutting", "Cutting")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Fitness", "Fitness")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Funny", "Funny")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Insecure", "Insecure")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Sinful", "Sinful")>>

	//Sexual <<= App.Encyclopedia.Dialog.linkSC("Quirks", "Quirks")>>://
	<<= App.Encyclopedia.Dialog.linkSC("Caring", "Caring")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Gagfuck Queen", "Gagfuck Queen")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Painal Queen", "Painal Queen")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Perverted", "Perverted")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Romantic", "Romantic")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Size Queen", "Size Queen")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Strugglefuck Queen", "Strugglefuck Queen")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Tease", "Tease")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Unflinching", "Unflinching")>>

/**********
SLAVE FLAWS
**********/
<<case "Anorexic" "Arrogant" "Bitchy" "Devout" "Flaws" "Gluttonous" "Hates Men" "Hates Women" "Liberated" "Odd" "Apathetic" "Crude" "Hates Anal" "Hates Oral" "Hates Penetration" "Idealistic" "Judgemental" "Repressed" "Shamefast">>
	//Behavioral <<= App.Encyclopedia.Dialog.linkSC("Flaws", "Flaws")>>://
	<<= App.Encyclopedia.Dialog.linkSC("Anorexic", "Anorexic")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Arrogant", "Arrogant")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Bitchy", "Bitchy")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Devout", "Devout")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Gluttonous", "Gluttonous")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Hates men", "Hates Men")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Hates women", "Hates Women")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Liberated", "Liberated")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Odd", "Odd")>>

	//Sexual <<= App.Encyclopedia.Dialog.linkSC("Flaws", "Flaws")>>://
	<<= App.Encyclopedia.Dialog.linkSC("Apathetic", "Apathetic")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Crude", "Crude")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Hates anal", "Hates Anal")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Hates oral", "Hates Oral")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Hates penetration", "Hates Penetration")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Idealistic", "Idealistic")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Judgemental", "Judgemental")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Repressed", "Repressed")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Shamefast", "Shamefast")>>

/**********
SLAVE RELATIONSHIPS
**********/
<<case "Emotional Slut" "Emotionally Bonded" "Relationships" "Rivalries" "Romances" "Slave Marriages" "Slaveowner Marriages">>
	<<= App.Encyclopedia.Dialog.linkSC("Relationships", "Relationships")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Rivalries", "Rivalries")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Romances", "Romances")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Emotionally Bonded", "Emotionally Bonded")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Emotional Slut", "Emotional Slut")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Slave Marriages", "Slave Marriages")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Slaveowner Marriages", "Slaveowner Marriages")>>

/**********
PREGNANCY
**********/
<<case "Artificial Insemination" "Breeders Dietary Blend" "Childbirth and C-Secs" "Cloning" "Fertility Mix" "Gestation Drugs and Labor Suppressants" "Hyper-Pregnancy" "Ova Transplantation" "Player Pregnancy" "Pregnancy" "Pregnancy Generator" "Slave Fertility" "Super Fertility Drugs" "Surrogacy" "Inbreeding">>
	<<= App.Encyclopedia.Dialog.linkSC("Pregnancy", "Pregnancy")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Slave Fertility", "Slave Fertility")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Player Pregnancy", "Player Pregnancy")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Hyper-Pregnancy", "Hyper-Pregnancy")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Super Fertility Drugs", "Super Fertility Drugs")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Fertility Mix", "Fertility Mix")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Breeders Dietary Blend", "Breeders Dietary Blend")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Pregnancy Generator", "Pregnancy Generator")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Childbirth and C-Secs", "Childbirth and C-Secs")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Gestation Drugs and Labor Suppressants", "Gestation Drugs and Labor Suppressants")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Artificial Insemination", "Artificial Insemination")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Surrogacy", "Surrogacy")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Cloning", "Cloning")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Ova Transplantation", "Ova Transplantation")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Eugenics Breeding Proposal", "Eugenics Breeding Proposal")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Repopulationist Breeding School", "Repopulationist Breeding School")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Inbreeding", "Inbreeding")>>

/**********
INFLATION
**********/
<<case "Belly Implants" "Cervix Micropump Filter" "Enemas and Force-Feeding" "Inflation" "Organic Mesh Breast Implant">>
	<<= App.Encyclopedia.Dialog.linkSC("Inflation", "Inflation")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Enemas and Force-Feeding", "Enemas and Force-Feeding")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Belly Implants", "Belly Implants")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Cervix Micropump Filter", "Cervix Micropump Filter")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Organic Mesh Breast Implant", "Organic Mesh Breast Implant")>>

/**********
SLAVE MODIFICATION
**********/
<<case "Slave Modification">>
	<<= App.Encyclopedia.Dialog.linkSC("Slave Modification", "Slave Modification")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Corrective Diet", "Corrective Diet")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Nipple Conversion — Penetratable", "Nipple Conversion — Penetratable")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Ejaculation Boosting Prostate Implant", "Ejaculation Boosting Prostate Implant")>>

/**********
ARCOLOGY FACILITIES
**********/
<<case "Advertising" "Arcade" "Brothel" "Cellblock" "Clinic" "Club" "Dairy" "Facilities" "Farmyard" "Head Girl Suite" "Master Suite" "Nursery" "Pit" "Schoolroom" "Servants' Quarters" "Spa" "The Incubation Facility" "Variety">>
	//Arcology <<= App.Encyclopedia.Dialog.linkSC("Facilities", "Facilities")>>://
	<<= App.Encyclopedia.Dialog.linkSC("Arcade", "Arcade")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Brothel", "Brothel")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Cellblock", "Cellblock")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Clinic", "Clinic")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Club", "Club")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Dairy", "Dairy")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Head Girl Suite", "Head Girl Suite")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Master Suite", "Master Suite")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Pit", "Pit")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Schoolroom", "Schoolroom")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Servants' Quarters", "Servants' Quarters")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Spa", "Spa")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Nursery", "Nursery")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Farmyard", "Farmyard")>>
	| <<= App.Encyclopedia.Dialog.linkSC("The Incubation Facility ", "The Incubation Facility")>>

	//Facility Bonuses://
	<<= App.Encyclopedia.Dialog.linkSC("Advertising", "Advertising")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Variety", "Variety")>>

/**********
LORE: THE FREE CITIES TODAY
**********/
<<case "Lore" "Money" "Food" "Disease in the Free Cities" "Free Cities Justice" "Modern Anal" "Slave Couture" "Slave Marriage" "The Ejaculate Market" "Gingering" "Dyes"
/**********
LORE: FREE CITIES CULTURE TOMORROW
**********/
"The New Rome" "The Return of Feudalism" "Naked, Barefoot, and Pregnant" "The Sons of Sekhmet" "The Top" "The Bottom" "The Purity of the Human Form" "A World Built on Implants" "Slaves as Stock" "Slavery and the Physical Ideal" "Faith in the Free Cities"
/**********
LORE: INTERVIEWS
**********/
"Slave Whore, Arcology K-2" "Slave Acolyte, Arcology V-7" "Public Slave, Arcology A-3" "Mercenary, Arcology B-2" "Slave Trainer, Arcology D-10" "Monarch, Arcology F-8">>
	//The Free Cities today://
	@@.yellowgreen; <<= App.Encyclopedia.Dialog.linkSC("Money", "Money")>>@@
	| <<= App.Encyclopedia.Dialog.linkSC("Disease in the Free Cities", "Disease in the Free Cities")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Free Cities Justice", "Free Cities Justice")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Modern Anal", "Modern Anal")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Slave Couture", "Slave Couture")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Slave Marriage", "Slave Marriage")>>
	| <<= App.Encyclopedia.Dialog.linkSC("The Ejaculate Market", "The Ejaculate Market")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Gingering", "Gingering")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Dyes", "Dyes")>>

//Free Cities culture tomorrow://
	<<= App.Encyclopedia.Dialog.linkSC("The New Rome", "The New Rome")>>
	| <<= App.Encyclopedia.Dialog.linkSC("The Return of Feudalism", "The Return of Feudalism")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Naked, Barefoot, and Pregnant", "Naked, Barefoot, and Pregnant")>>
	| <<= App.Encyclopedia.Dialog.linkSC("The Sons of Sekhmet", "The Sons of Sekhmet")>>
	| <<= App.Encyclopedia.Dialog.linkSC("The Top", "The Top")>>
	| <<= App.Encyclopedia.Dialog.linkSC("The Bottom", "The Bottom")>>
	| <<= App.Encyclopedia.Dialog.linkSC("The Purity of the Human Form", "The Purity of the Human Form")>>
	| <<= App.Encyclopedia.Dialog.linkSC("A World Built on Implants", "A World Built on Implants")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Slaves as Stock", "Slaves as Stock")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Slavery and the Physical Ideal", "Slavery and the Physical Ideal")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Faith in the Free Cities", "Faith in the Free Cities")>>

//Interviews://
	<<= App.Encyclopedia.Dialog.linkSC("Slave Whore, Arcology K-2", "Slave Whore, Arcology K-2")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Slave Acolyte, Arcology V-7", "Slave Acolyte, Arcology V-7")>>
	<<if $seeExtreme != 0>>
		| <<= App.Encyclopedia.Dialog.linkSC("Public Slave, Arcology A-3", "Public Slave, Arcology A-3")>>
	<</if>>
	| <<= App.Encyclopedia.Dialog.linkSC("Mercenary, Arcology B-2", "Mercenary, Arcology B-2")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Slave Trainer, Arcology D-10", "Slave Trainer, Arcology D-10")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Monarch, Arcology F-8", "Monarch, Arcology F-8")>>

/**********
MODS
**********/
<<case "Game Mods">>
	<<= App.Encyclopedia.Dialog.linkSC("Lolimod", "Lolimod")>>
	| <<= App.Encyclopedia.Dialog.linkSC("The Special Force Mod", "Special Force")>>
	| <<= App.Encyclopedia.Dialog.linkSC("The Security Expansion Mod", "Security Expansion")>>
	| <<= App.Encyclopedia.Dialog.linkSC("FCTV", "FCTV")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Catmod", "Catmod")>>

<<case "Lolimod" "Lolis and the Free Cities" "Fertility Age" "Male Fertility" "Cradle Robbers" "Precocious Puberty" "Childhood Fertility Induced NCS">>
	<<= App.Encyclopedia.Dialog.linkSC("Lolis and the Free Cities", "Lolis and the Free Cities")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Fertility Age", "Fertility Age")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Male Fertility", "Male Fertility")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Precocious Puberty", "Precocious Puberty")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Cradle Robbers", "Cradle Robbers")>>
	| <<= App.Encyclopedia.Dialog.linkSC("The Incubation Facility", "The Incubation Facility")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Childhood Fertility Induced NCS", "Childhood Fertility Induced NCS")>>

<<case "Security Expansion" "Battles">>
	<<= App.Encyclopedia.Dialog.linkSC("The Security Expansion Mod", "Security Expansion")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Battles", "Battles")>>

<<case "FCTV" "FCTVReceiver">>
	<<= App.Encyclopedia.Dialog.linkSC("FCTV", "FCTV")>>
	| <<= App.Encyclopedia.Dialog.linkSC("FCTVReceiver", "FCTVReceiver")>>

<<case "Catmod" "Bioengineering" "Catgirls">>
	<<= App.Encyclopedia.Dialog.linkSC("Catmod", "Catmod")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Catgirls", "Catgirls")>>
	| <<= App.Encyclopedia.Dialog.linkSC("Bioengineering", "Bioengineering")>>

<</switch>>
<</if>>


code:
App.Encyclopedia.addArticle("Leadership Positions", function() {
  const r = new DocumentFragment();
  App.Events.addParagraph(r, ["Slave assignments are stratified into ordinary", App.Encyclopedia.Dialog.linkDOM("assignments", "Slave Assignments"), "and leadership positions."]);
  r.append("Choose a more particular entry below:");

  return r;
}, "slaveLeaders");

App.Encyclopedia.addArticle("Career Experiences", function() {
  const link = (text, article, className) => App.Encyclopedia.Dialog.linkDOM(text, article, className);
  const devotion = (text="devotion") => link(text, "From Rebellious to Devoted", "hotpink");
  const trust = (text="trust") => link(text, "Trust", "mediumaquamarine");
  const careerData = [
	["Grateful", trust(), "grateful"],
	["Menial", devotion() , "menial"],
	["Servant", link("keeping your estate", "Servitude"), "servant"],
	["Entertainment", link("public service", "Public Service"), "entertainment", "If a slave has a lot of entertainment experience, she can qualify for this bonus without career experience."],
	["Sex work", link("whoring"), "entertainment", "If a slave is very sexually experienced, she can qualify for this bonus without career experience."],
	["Leadership", link("Head Girl"), "HG"],
	["Procuring", link("Madam"), "madam"],
	["Musical", link("DJ"), "DJ"],
	["Defensive", link("Bodyguard"), "bodyguard"],
	["Convincing", link("Recruiter"), "recruiter"],
	["Security", link("Wardeness"), "wardeness"],
	["Medical", link("Nurse"), "nurse"],
	["Counseling", link("Attendant"), "attendant"],
	["Nannying", link("Matron"), "matron"],
	["Accounting", link("Stewardess"), "stewardess"],
	["Husbandry", link("Milkmaid"), "milkmaid"],
	["Farming", link("Farmer"), "farmer"],
	["Teaching", link("Schoolteacher"), "schoolteacher"],
  ];
  const t = new DocumentFragment();
  const r = [];

  t.append("Slaves may retain useful experience from their lives before enslavement. Freedom and slavery are so different that the bonuses slaves get are minor. Careers fall into categories, each with its own bonus; these are:");
  for (const [boldItem, bonus, career, note] of careerData) {
	App.Events.addParagraph(t, [CareerBonus(boldItem, bonus, career, note)]);
  }
  r.push("Slaves who have been in slavery long enough that it is effectively their career get a bonus to", devotion("devotion."));
  r.push("Slaves can forget their career experience in an industrialized Dairy, but if they do so and remain sane, they will get a special bonus to both", devotion(), "and", trust("trust."));
  App.Events.addParagraph(t, r);

  App.Events.addParagraph(t, ["Facility heads and working slaves can gain work experience to provide the same benefit as having a relevant career. Intelligence is the deciding factor in how long this will take, brilliant slaves can achieve this ideally in about fourteen weeks, while borderline retarded slaves can take up two hundred weeks (Assuming that the slave's intelligence doesn't change at all and the dice roll is consistent)."]);

  return t;

  /**
  * @param {string} career
  * @param {HTMLElement} bonus
  * @param {string} list
  * @param {string} [note]
  */
  function CareerBonus(career, bonus, list, note) {
	const r = new SpacedTextAccumulator();
	const notLeader = ["Grateful", "Menial", "Servant", "Entertainment", "Sex work"].includes(career);
	const applicable = notLeader ? App.Data.Careers.General[list] : App.Data.Careers.Leader[list];

	r.push(App.UI.DOM.makeElement("span", career, ["underline"]), `which offers a ${career === "Grateful" || career === "Menial" ? 'potential' : ''} bonus to`, bonus, `includes slaves who were: ${toSentence(applicable)}.`);
	r.toNode("div");
	if (note) {
	  r.push(note);
	  r.toNode("div");
	}
	return r.container();
  }
}, "slaveLeaders");

App.Encyclopedia.addArticle("Attendant", function() {
  const t = new DocumentFragment();
  const r = [];
  const link = (text, article, className) => App.Encyclopedia.Dialog.linkDOM(text, article, className);
  const goodAttendant = [link("submissiveness", "Submissives"), "have a calm libido", "appear older than 35", "a motherly air", App.UI.DOM.makeElement("span", "intelligent", ["cyan"]), "naturally female."];

  r.push("An", App.UI.DOM.makeElement("span", "Attendant", ["bold"]), "can be selected once the", link("Spa"), "facility has been built.");
  r.push("Attendants provide emotional help to slaves in the spa, and can also soften flaws and even fix mindbroken slaves.");
  r.push("Good Attendants are free of:", link("fetishes"), "or", App.UI.DOM.toSentence(goodAttendant));
  App.Events.addNode(t, r, "div");

  return t;
}, "slaveLeaders");

App.Encyclopedia.addArticle("Matron", function() { // TODO: will still need more updating
  const t = new DocumentFragment();
  const r = [];
  const link = (text, article, className) => App.Encyclopedia.Dialog.linkDOM(text, article, className);
  const goodMatron = [link("caring"), link("funny"), link("intelligent", "Intelligence"), "has given birth before."];

  r.push("A", App.UI.DOM.makeElement("span", "Matron", ["bold"]), "can be selected once the", link("Nursery"), "facility has been built.");
  r.push("Matrons oversee the day-to-day activities of the Nursery, and can soften flaws of nannies working under them. A good Matron is:", App.UI.DOM.toSentence(goodMatron));
  App.Events.addNode(t, r, "div");

  return t;
}, "slaveLeaders");

App.Encyclopedia.addArticle("Bodyguard", function() {
  const t = new DocumentFragment();
  let r;
  const link = (text, article, className) => App.Encyclopedia.Dialog.linkDOM(text, article, className);
  const reduceDeadliness = [link("Big breasts", "Breasts"), link("butts"), link("poor health", "Health"), link("excess weight", "Weight"), link("pregnancy")];
  const bodyguardTrainees = ["her lover or wife if she has one",	link("the Head Girl", "Head Girl"), link("the Wardeness", "Wardeness"), link("your Concubine.", "Concubine")];

  App.UI.DOM.appendNewElement("div", t, "Slave bodyguards are best understood not as protection for a slaveowner's person, but rather as a projection of their skill at slave breaking.", ["note"]);

  r = [];
  r.push("By giving a slave the means and position to easily kill her master, that master displays their total trust in them. The simple fact that an armed slave is near a slaveowner at all times is proof that that slaveowner has produced at least one slave that never wavers in her");
  r.push(link("devotion.", "From Rebellious to Devoted", "hotpink"));
  r.push("After all, if she ever wavered, the slaveowner would likely be dead.");
  App.Events.addNode(t, r, "p", "note");

  App.UI.DOM.appendNewElement("p", t, "It is obvious to any real security professional that slave bodyguards are mostly for show, from the moment of seeing one. After all, they are not equipped with modern sensors, armor, and weapons; if they were so attired and loaded down it would be quite impossible to tell if they were even female: the huge weight and bulk of modern combat gear gives an androgynous appearance. Instead, they are usually kept scantily clad or even naked, and armed with visually impressive weapons.", ["note"]);

  App.UI.DOM.appendNewElement("p", t, "— Lawrence, W. G., Guide to Modern Slavery, 2037 Edition", ["note"]);

  r = [];
  r.push("A", App.UI.DOM.makeElement("span", "Bodyguard", ["bold"]));
  r.push("can be selected once the Armory upgrade is purchased. Duties include protection of the player character during violent events; good bodyguards produce some");
  r.push(link("reputation", "Arcologies and Reputation", "green"));
  r.push("as well, based on how deadly they are.", "Toned but not excessive", link("muscles", "Musculature"));
  r.push(link("combat skill", "Combat Skill"), "and", link("height"));
  r.push("contribute to deadliness.");
  r.push(App.UI.DOM.toSentence(reduceDeadliness), "all detract from deadliness.");
  App.Events.addParagraph(t, r);

  r = [];
  r.push("Skilled", App.UI.DOM.makeElement("span", "intelligent", ["cyan"]), "and", link("devoted", "From Rebellious to Devoted", "hotpink"));
  r.push("Bodyguards may become concerned that they have no potential successor if you do not keep several other combat capable slaves in your penthouse.");
  r.push("Such a Bodyguard will do her best to find responsible and physically capable slaves to teach self defense to when she can.");
  r.push("Potential recipients of this training include:", App.UI.DOM.toSentence(bodyguardTrainees));
  App.Events.addNode(t, r, "div");

  return t;
}, "slaveLeaders");

App.Encyclopedia.addArticle("Concubine", function() {
  const link = (text, article, className) => App.Encyclopedia.Dialog.linkDOM(text, article, className);
  const t = new DocumentFragment();
  const r = [];

  r.push("A", App.UI.DOM.makeElement("span", "Concubine", ["bold"]));
  r.push("can be selected once the", link("Master Suite"), "facility is built.");
  r.push("Concubines benefit from high beauty and sexual skills in the same way as public servants;");
  r.push("they should also be extremely", link("devoted.", "From Rebellious to Devoted", "hotpink"));
  r.push("Concubines do not apply any bonuses to other slaves in the", link("Master suite"), "rather,");
  r.push ("they are the game's single most efficient production of", link("reputation", "Arcologies and Reputation", "green"), "themselves.");
  App.Events.addNode(t, r, "div");

  return t;
}, "slaveLeaders");

App.Encyclopedia.addArticle("DJ", function() {
  const link = (text, article, className) => App.Encyclopedia.Dialog.linkDOM(text, article, className);
  const t = new DocumentFragment();
  let r;

  r = [];
  r.push(`My name is Danni Diemen, and I'm here today to talk about the prettiest girls in the Free Cities. That's right, DJs! When a slave bitch says, "Sweetie, I'm not that kind of girl," she's lying. She's a slave, and she is that kind of girl! So, have your way with her.`);
  App.Events.addNode(t, r, "p", "note");

  r = [];
  r.push("Except if she's a DJ. Then she probably isn't that kind of girl after all! Rare, I know. That's what makes them so hot! Some of the Free Cities' most prominent slaveowners have taken sluttery to the next level. They're building clubs designed around constant beats and constant sex, so it pays to have a hot girl maintain the party, whether it's up on stage, in the DJ booth, or down on the floor!");
  App.Events.addNode(t, r, "p", "note");

  r = [];
  r.push("As for what makes a good DJ, beauty is obvious. But I also I hear the best trend a little older, too. Let's be honest, there's something a high-class woman has that a high-class girl doesn't.");
  App.Events.addNode(t, r, "p", "note");

  r = [];
  r.push("— Van Diemen, D. C. G.,", App.UI.DOM.makeElement("span", "Free Cities Fashion (FCF), January 2032", ["note"]));
  App.Events.addNode(t, r, "p", "note");

  r = [];
  r.push("A", App.UI.DOM.makeElement("span", "DJ", ["bold"]));
  r.push("can be selected once the", link("Club"), "facility is built.");
  r.push("DJs apply a multiplier to", link("reputation", "Arcologies and Reputation", "green"), "gains from serving in the club.");
  r.push("Entertainment skills, toned but not massive", link("muscles", "Musculature"), App.UI.DOM.makeElement("span", "intelligence", ["cyan"]), "and a pretty face make a good DJ.");
  App.Events.addParagraph(t, r);

  r = []
  r.push("If a DJ isn't responsible for enough sluts to occupy her full time, she'll spend time fucking citizens herself. This is exactly the same as", link("Public Service"), "out of the Club: she'll benefit from any", link("Advertising"), "or", link("Variety"), "bonuses available, and will even benefit from her own leadership skills.");
  App.Events.addNode(t, r, "div");

  return t;
}, "slaveLeaders");

App.Encyclopedia.addArticle("Farmer", function() {
  const link = (text, article, className) => App.Encyclopedia.Dialog.linkDOM(text, article, className);
  const t = new DocumentFragment();
  let r = [];

  r.push("A", App.UI.DOM.makeElement("span", "Farmer", ["bold"]), "can be selected once the", link("Farmyard"), "facility is built.");
  r.push("Having applicable", link("career experience", "Career Experience"), "and strong", link("muscles", "Musculature"), "allow a Farmer to maintain the different crops and animals.");
  App.Events.addNode(t, r, "div");

  App.Events.addNode(t, ["This description needs to be expanded."], "div", "note");

  return t;
}, "slaveLeaders");

App.Encyclopedia.addArticle("Head Girl", function() {
  const link = (text, article, className) => App.Encyclopedia.Dialog.linkDOM(text, article, className);
  const devotion = (text="devotion", colour="hotpink") => link(text, "From Rebellious to Devoted", colour);
  const trust = (text="trust") => link(text, "Trust", "mediumaquamarine");
  const t = new DocumentFragment();
  let r = [];

  r.push("Most Free Cities slaveowners eventually find it convenient to promote a", trust("trusting"), "slave to a position over others.");
  r.push("The stable of slaves necessary to present a proper public image has become so large that assistance managing and overseeing slaves is quite useful.");
  r.push("In addition, such a slave can be an example to lesser livestock.");
  App.Events.addNode(t, r, "div", "note");

  r.push("A good Head Girl will be", devotion("devoted"), "to her master and sexually skilled.");
  r.push("Experienced slaveowners have also found that an older slave girl is often more effective than a young one.");
  r.push("Since slavery is new, older slave girls will have spent part of their adult lives as free women, and have a deeper body of life experience to draw on.");
  App.Events.addNode(t, r, "p", "note");

  r.push("Naturally, some slaveowners form a strong emotional bond with their Head Girl.");
  r.push(trust("Trusting"), "and relying on a close companion can begin to resemble old world relationships.");
  r.push("It is a paradox of modern Free Cities life that such closeness is strongly frowned upon.");
  r.push("Rumors that a prominent person is emotionally involved with his or her Head Girl can be as socially devastating as rumors of infidelity were a hundred years ago.");
  App.Events.addNode(t, r, "p", "note");

  r.push("— Lawrence, W. G., Guide to Modern Slavery, 2037 Edition");
  App.Events.addNode(t, r, "p", "note");

  r.push("A", App.UI.DOM.makeElement("span", "Head Girl", ["bold"]));
  r.push("can be selected from among your", devotion("devoted"), "slaves immediately.");
  r.push("Duties are numerous, but mostly involve training slaves.");
  r.push("They will generally train whichever girls they think appropriate, but can be given some direction on the same menu used to select one.");
  r.push("Giving your", link("Head Girl a suite", "Head Girl Suite"), "and a personal slave will allow her to train an extra slave each week, an extremely powerful ability.");
  App.Events.addParagraph(t, r);

  r.push(devotion(), App.UI.DOM.makeElement("span", "intelligence", ["cyan"]), "and age over 30 all help Head Girls do well.");
  r.push("Head Girls will do better if they are comfortable with the arcology's", link("lingua franca"), ".");
  r.push("Skills are required when teaching that skill, meaning that slaves without vaginas cannot teach vaginal skills.");
  r.push("Conversely, slaves with functional dicks are better at teaching other sexual skills.");
  r.push("Also having max sex skills, dom as their fetish and being your wife provide more boosts.");
  App.Events.addNode(t, r, "div");

  return t;
}, "slaveLeaders");

App.Encyclopedia.addArticle("Madam", function() {
  const link = (text, article, className) => App.Encyclopedia.Dialog.linkDOM(text, article, className);
  const t = new DocumentFragment();
  let r;

  r = [];
  r.push("Prostitution is indeed the oldest profession. It follows that the madam is probably the oldest managerial position.");
  App.Events.addNode(t, r, "div", "note");

  r = [];
  r.push("Free madams are very common in the Free Cities. As free prostitutes are priced out of their profession by slaves, many of the wealthiest are purchasing slaves and setting themselves up as madams. However, slave madams are becoming common as well.");
  App.Events.addNode(t, r, "p", "note");

  r = [];
  r.push("The selling of sex is one of the largest growth markets in the Free Cities. As has been confidently predicted by economists since the first Free City was founded, the near-anarchy of these new polities has accelerated the concentration of wealth that began in the final years of the twentieth century. Thus, the majority of free citizens of the Cities own no slaves, while the majority of slaves are owned by a very few extremely wealthy persons. Extremely large stables of slave whores are becoming common for those in the industry.");
  App.Events.addNode(t, r, "p", "note");

  r = [];
  r.push("Managing this many prostitutes is a science and an art. Naturally, it is not difficult to find slaves that are experienced in the sex trade. Setting slaves over other slaves has been a part of human slavery for all of recorded history; all of the tropes that once applied to the slave overseer in the field or the quarry now apply to the slave Madam in the brothel. The more experience they have in the field, the better they do.");
  App.Events.addNode(t, r, "p", "note");
  r = [];
  r.push("— Lawrence, W. G., Guide to Modern Slavery, 2037 Edition");
  App.Events.addNode(t, r, "p", "note");

  r = [];
  r.push("A", App.UI.DOM.makeElement("span", "Madam", ["bold"]), "can be selected once the", link("Brothel"), "facility is built.");
  r.push("Madams apply a multiplier to", link("income", "Money", "yellowgreen"), "from the brothel.");
  App.Events.addParagraph(t, r);

  r = [];
  r.push("Whoring skills, age over 35", App.UI.DOM.makeElement("span", "intelligence", ["cyan"]), "being your wife and a functional cock help a Madam.");
  App.Events.addParagraph(t, r);

  r = [];
  r.push("If a Madam isn't managing enough whores to occupy her full time, she'll sell herself as much as she has time for.");
  r.push("This is exactly the same as", link("whoring"), "out of the Brothel: she'll benefit from any", link("Advertising"), "or", link("Variety"), "bonuses available, and will even benefit from her own management skills.");
  App.Events.addNode(t, r, "div");

  return t;
}, "slaveLeaders");

App.Encyclopedia.addArticle("Milkmaid", function() {
  const link = (text, article, className) => App.Encyclopedia.Dialog.linkDOM(text, article, className);
  const devotion = (text="devotion", colour="hotpink") => link(text, "From Rebellious to Devoted", colour);
  const trust = (text="trust") => link(text, "Trust", "mediumaquamarine");
  const t = new DocumentFragment();
  let r;

  r = [];
  r.push("Most slaveowners get into dairy as a hobby. Why not? It's fun, tasty, and sexy. But sooner or later, almost everyone who starts out with a few low-volume milkers hears the call of mass production. After all, if it's hot to have one slave to use as the milking machine holds her down, it's hotter to have a whole row of moaning milkers at your mercy.");
  App.Events.addNode(t, r, "div");

  r = [];
  r.push("Unfortunately, the everyday work of husbandry goes from an amusement to a chore as a herd grows. Helping a tired slave cow with huge tits up from a long milking is fun once a day, but it gets bothersome and backbreaking the tenth time one does it. What's to be done?");
  App.Events.addParagraph(t, r);

  r = [];
  r.push("Train a milkmaid! Any decently obedient slave will do, but the stronger the better. As you probably know by now, just because slave husbandry involves human stock doesn't mean it isn't hard work, just like traditional stock keeping! The traditional image of milkmaids might be girly and innocent, but we're after a good hale bitch that can lift, carry and scrub from dawn to dusk. If you're looking to economize, you can even use a slave too old or ugly to appeal in other, more sexual jobs. After all, when it comes to the third milking of the day, cows don't care how pretty the hands that examine their tits are.");
  App.Events.addParagraph(t, r);

  r = [];
  r.push("— Banaszewski, Valerie P.,", App.UI.DOM.makeElement("span", "Free Cities Husbandry Weekly, February 16, 2032", ["note"]));
  App.Events.addParagraph(t, r);

  r = [];
  r.push("A", App.UI.DOM.makeElement("span", "Milkmaid", ["bold"]), "can be selected once the", link("Dairy"), "facility is built.");
  r.push("Having applicable", link("career experience", "Career Experience"), "and strong", link("muscles", "Musculature"), "allow a Milkmaid to help cows maintain their health.");
  r.push("If a Milkmaid is Funny or Caring, she can improve cow's", trust("trusting"), "resting point; if she has oral skills, she can improve their", devotion(), "resting point.");
  if (V.seeDicks !== 0) {
	r.push("If she has a very large dick capable of erection, a Milkmaid can assist cows with ejaculation if the Dairy is not already stimulating prostates.");
  }
  App.Events.addNode(t, r, "div");

  return t;
}, "slaveLeaders");

App.Encyclopedia.addArticle("Nurse", function() {
  const link = (text, article, className) => App.Encyclopedia.Dialog.linkDOM(text, article, className);
  const t = new DocumentFragment();
  const r = [];

  r.push("An", App.UI.DOM.makeElement("span", "Nurse", ["bold"]), "can be selected once the", link("Clinic"), "facility is built.");
  r.push("Nurses increase", link("health"), "gains in the Clinic, and play a major role in the prevention and treatment of", "illness among slaves.");
  r.push("Good Nurses are", link("nymphomaniacs", "Nymphomania"), ", highly", App.UI.DOM.makeElement("span", "intelligent,", ["cyan"]), "physically fit, and very beautiful.");
  App.Events.addNode(t, r, "div");

  return t;
}, "slaveLeaders");

App.Encyclopedia.addArticle("Recruiter", function() {
  const link = (text, article, className) => App.Encyclopedia.Dialog.linkDOM(text, article, className);
  const devotion = (text="devotion", colour="hotpink") => link(text, "From Rebellious to Devoted", colour);
  const rep = (text="reputation") => link(text, "Arcologies and Reputation", "green");
  const t = new DocumentFragment();
  let r;

  r = [];
  r.push("A", App.UI.DOM.makeElement("span", "Recruiter", ["bold"]), "can be selected from among your", devotion("devoted"), "slaves immediately.");
  r.push(App.UI.DOM.makeElement("span", "Intelligence", ["cyan"]), "entertainment skills, and luxurious living standards help a recruiter convince vulnerable people to submit to voluntary enslavement.");
  r.push("Each targetable group is also more sympathetic to an appropriate recruiter.");
  App.Events.addNode(t, r, "div");
  App.Events.addNode(t, ["Desperate whores: a sexual veteran."], "div", ["indent"]);
  App.Events.addNode(t, ["Expectant mothers: visibly pregnant."], "div", ["indent"]);
  App.Events.addNode(t, ["Young migrants:", link("healthy"), "and pretty."], "div", ["indent"]);
  App.Events.addNode(t, ["Dissolute sissies: with a working dick."], "div", ["indent"]);
  App.Events.addNode(t, ["Reassignment candidates: pretty without working female reproductive organs."], "div", ["indent"]);
  App.Events.addNode(t, r, "p");

  r = [];
  r.push("Once your household reaches a significant number of slaves you may direct the Recruiter to do publicity instead of acquisitions, for a boost to");
  r.push(rep());
  r.push("and possibly advancing");
  r.push(link("future societies", "Future Societies"));
  r.push(". Activating this ability does not influence any other means of obtaining new slaves. (Note that 'Facilities & leadership' includes the Recruiter herself and a slot for Head Girl, two positions that do not require a facility.)");
  App.Events.addNode(t, r, "div");

  return t;
}, "slaveLeaders");

App.Encyclopedia.addArticle("Schoolteacher", function() {
  const link = (text, article, className) => App.Encyclopedia.Dialog.linkDOM(text, article, className);
  const t = new DocumentFragment();
  const r = [];

  r.push("A", App.UI.DOM.makeElement("span", "schoolteacher", ["bold"]), "can be selected once the", link("Schoolroom"), "facility is built.");
  r.push("Schoolteachers increase the rate at which students in the schoolroom learn.");
  r.push("Good schoolteachers appear older than 35, beautiful,", App.UI.DOM.makeElement("span", "intelligent", ["cyan"]), "and educated.");
  App.Events.addNode(t, r, "div");

  return t;
}, "slaveLeaders");

App.Encyclopedia.addArticle("Stewardess", function() {
  const link = (text, article, className) => App.Encyclopedia.Dialog.linkDOM(text, article, className);
  const devotion = (text="devotion", colour="hotpink") => link(text, "From Rebellious to Devoted", colour);
  const trust = (text="trust") => link(text, "Trust", "mediumaquamarine");
  const t = new DocumentFragment();
  let r;

  r = [];
  r.push("Throughout recorded history, wherever there have been mature slave societies, there have been slave overseers set over their peers by their masters. Naturally, these individuals have simultaneously been among the most");
  r.push(trust("trusted"));
  r.push("to their masters, and among the most hated to their compatriots in slavery. They have perhaps the greatest interest in preservation of a slave society, since the masters have only the loss of property to fear by abolition; slave overseers would likely be less lucky.");
  App.Events.addNode(t, r, "p", "note");

  r = [];
  r.push("The stewardess is the modern, domestic expression of the old overseer. Many wealthy slaveowners keep an extensive stable of less valuable slaves around their estates to serve as labor, raw material for slave training, and targets for recreational abuse. Successful oversight of this often mulish mass of stock requires a high degree of");
  r.push(devotion());
  r.push("to the master's will, of course. Good health to put in the necessarily long hours also helps. Some slaveowners also find that a functional dick allows a Stewardess to add a useful element of sexual abuse to her ministrations.");
  App.Events.addNode(t, r, "p", "note");

  r = [];
  r.push("— Lawrence, W. G., Guide to Modern Slavery, 2037 Edition");
  App.Events.addNode(t, r, "p", "note");

  r = [];
  r.push("A", App.UI.DOM.makeElement("span", "Stewardess", ["bold"]), "can be selected once the", link("Servants' Quarters"), "facility is built.");
  r.push("Stewardesses increase the upkeep reduction effects of servants working out of the servants' quarters. Being older than 35, having good");
  r.push(link("health"), ",");
  r.push(App.UI.DOM.makeElement("span", "intelligence", ["cyan"]), "and");
  r.push(link("nymphomania"), "or");
  r.push(link("dominance", "Doms"));
  r.push("make a good Stewardess.");
  App.Events.addNode(t, r, "div");

  return t;
}, "slaveLeaders");

App.Encyclopedia.addArticle("Wardeness", function() {
  const link = (text, article, className) => App.Encyclopedia.Dialog.linkDOM(text, article, className);
  const devotion = (text="devotion", colour="hotpink") => link(text, "From Rebellious to Devoted", colour);
  const t = new DocumentFragment();
  const r = [];

  r.push("A", App.UI.DOM.makeElement("span", "Wardeness", ["bold"]), "can be selected once the");
  r.push(link("Cellblock"));
  r.push("facility is built. Wardenesses increase the rate at which slaves in the cellblock are broken. Very high");
  r.push(devotion(), ",", link("nymphomania"), "or");
  r.push(link("sadism", "Sadists"), ", strong");
  r.push(link("muscles", "Musculature"), ", applicable");
  r.push(link("career experience"), ", and a solid dick make a powerful Wardeness.");
  App.Events.addNode(t, r, "div");

  return t;
}, "slaveLeaders");

App.Encyclopedia.addCategory("slaveLeaders", function() {
  const r = [];
  r.push(App.Encyclopedia.Dialog.linkDOM("Leadership Positions"));
  r.push(App.Encyclopedia.Dialog.linkDOM("Career Experiences"));
  r.push(App.Encyclopedia.Dialog.linkDOM("Attendant"));
  r.push(App.Encyclopedia.Dialog.linkDOM("Matron"));
  r.push(App.Encyclopedia.Dialog.linkDOM("Bodyguard"));
  r.push(App.Encyclopedia.Dialog.linkDOM("Concubine"));
  r.push(App.Encyclopedia.Dialog.linkDOM("DJ"));
  r.push(App.Encyclopedia.Dialog.linkDOM("Farmer"));
  r.push(App.Encyclopedia.Dialog.linkDOM("Head Girl"));
  r.push(App.Encyclopedia.Dialog.linkDOM("Madam"));
  r.push(App.Encyclopedia.Dialog.linkDOM("Milkmaid"));
  r.push(App.Encyclopedia.Dialog.linkDOM("Nurse"));
  r.push(App.Encyclopedia.Dialog.linkDOM("Recruiter"));
  r.push(App.Encyclopedia.Dialog.linkDOM("Schoolteacher"));
  r.push(App.Encyclopedia.Dialog.linkDOM("Stewardess"));
  r.push(App.Encyclopedia.Dialog.linkDOM("Wardeness"));
  return App.UI.DOM.generateLinksStrip(r);
});

repo_name: Fanatey/fc

license: mit


code:
App.Encyclopedia.addArticle("Terrain Types", function() {
 const f = new DocumentFragment();
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "Future room for lore text", ["note"])], "div");
 App.Events.addNode(f, ["Choose a more particular entry below:"], "div");
 return f;
}, "Terrain");

App.Encyclopedia.addArticle("Urban Terrain", function() {
 const f = new DocumentFragment();
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "Urban", ["bold"]), "terrain is one of the possible settings for the Free City in which the arcology is located. It provides:"], "div");
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "Low", ["yellow"]), "minimum slave value and initial", App.UI.DOM.makeElement("span", "bear market", ["yellow"]), "for slaves."], "div", ["indent"]);
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "High", ["green"]), "ease of commerce with the old world."], "div", ["indent"]);
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "High", ["green"]), "access to refugees and other desperate people."], "div", ["indent"]);
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "Low", ["red"]), "cultural independence."], "div", ["indent"]);
 return f;
}, "Terrain");

App.Encyclopedia.addArticle("Rural Terrain", function() {
 const f = new DocumentFragment();
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "Rural", ["bold"]), "terrain is one of the possible settings for the Free City in which the arcology is located. It provides:"], "div");
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "High", ["yellow"]), "minimum slave value and initial", App.UI.DOM.makeElement("span", "bull market", ["yellow"]), "for slaves."], "div", ["indent"]);
 App.Events.addNode(f, ["Moderate ease of commerce with the old world."], "div", ["indent"]);
 App.Events.addNode(f, ["Moderate access to refugees and other desperate people."], "div", ["indent"]);
 App.Events.addNode(f, ["Moderate cultural independence."], "div", ["indent"]);
 return f;
}, "Terrain");

App.Encyclopedia.addArticle("Ravine Terrain", function() {
 const f = new DocumentFragment();
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "Ravine", ["bold"]), "terrain is one of the possible settings for the Free City in which the arcology is located. It provides:"], "div");
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "High", ["yellow"]), "minimum slave value and initial", App.UI.DOM.makeElement("span", "bull market", ["yellow"]), "for slaves."], "div", ["indent"]);
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "Low", ["red"]), "ease of commerce with the old world."], "div", ["indent"]);
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "Very low", ["red"]), "access to refugees and other desperate people."], "div", ["indent"]);
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "High", ["green"]), "cultural independence."], "div", ["indent"]);
 return f;
}, "Terrain");

App.Encyclopedia.addArticle("Marine Terrain", function() {
 const f = new DocumentFragment();
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "Marine", ["bold"]), "terrain is one of the possible settings for the Free City in which the arcology is located. It provides:"], "div");
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "Moderate minimum slave value and initially balanced market for slaves.")], "div", ["indent"]);
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "Moderate ease of commerce with the old world.")], "div", ["indent"]);
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "Low", ["red"]), "access to refugees and other desperate people."], "div", ["indent"]);
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "High", ["green"]), "cultural independence."], "div", ["indent"]);
 return f;
}, "Terrain");

App.Encyclopedia.addArticle("Oceanic Terrain", function() {
 const f = new DocumentFragment();
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "Oceanic", ["bold"]), "terrain is one of the possible settings for the Free City in which the arcology is located. It provides:"], "div");
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "High", ["yellow"]), "minimum slave value and initial", App.UI.DOM.makeElement("span", "bull market", ["yellow"]), "for slaves."], "div", ["indent"]);
 App.Events.addNode(f, ["Moderate ease of commerce with the old world."], "div", ["indent"]);
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "Very low", ["red"]), "access to refugees and other desperate people."], "div", ["indent"]);
 App.Events.addNode(f, [App.UI.DOM.makeElement("span", "Very high", ["green"]), "cultural independence."], "div", ["indent"]);
 App.Events.addNode(f, ["Ensures access to slaves from all over the world and will not associate the arcology with a continent."], "div", ["indent"]);
 return f;
}, "Terrain");

App.Encyclopedia.addCategory("Terrain", function() {
 const f = new DocumentFragment();
 const r = [];
 r.push(App.Encyclopedia.Dialog.linkDOM("Types", "Terrain Types"));
 r.push(App.Encyclopedia.Dialog.linkDOM("Urban", "Urban Terrain"));
 r.push(App.Encyclopedia.Dialog.linkDOM("Rural", "Rural Terrain"));
 r.push(App.Encyclopedia.Dialog.linkDOM("Ravine", "Ravine Terrain"));
 r.push(App.Encyclopedia.Dialog.linkDOM("Marine", "Marine Terrain"));
 r.push(App.Encyclopedia.Dialog.linkDOM("Oceanic", "Oceanic Terrain"));
 App.Events.addNode(f, ["Terrain:", App.UI.DOM.generateLinksStrip(r)], "div");
 return f;
});


code:
App.Encyclopedia.addArticle("The X-Series Arcology", function() {
	const t = new DocumentFragment();
	const r = new SpacedTextAccumulator(t);

	r.push("The X-Series Arcology is the latest model of 'arcology', designed in 2037 based off the model of keeping Free Cities as independent from the old world as fiscally viable. The first arcology was designed in early 2016 by the Berlin-based architecture firm Franz-Crekcht as a");
	r.push('"Skyscraper for the next generation"');
	r.push("- the A-Series. The original A-Series was made to exist as an arcology integrated within old world nations, but capable of producing its own energy, food, and housing for the population contained within, marketed as buildings you could");
	r.push('"Live, work, eat and shop at without ever having to leave"');
	r.push(". These first arcology units were rolled out by the end of the year based on a standard design prototype, and cheap housing prices combined with the promise of stable white-collar work immediately attracted a sizeable population to the A-series arcologies. Based off of these designs, F-C continued to produce arcology schematics, including the K-series and B-series, and formulated plans for arcologies that could operate in rural, maritime, and even oceanic environments. When the popularity of the Arcology model became evident, other design firms replicated their own takes, producing designs like the V-series, D-series, F-series, and finally the ultra-modern X-series that you presently inhabit, designed more as a quasi-independent city-state than the original");
	r.push('"next-generation skyscrapers"');
	r.push(". It wasn't long before arcologies began to form 'clusters' together, relying more on each other for trade and cultural exchange than the old world that surrounded them; increasingly complex infrastructure and surrounding networks began to connect the clusters, tying them together and making them stand apart from the rest of society, largely free from the purview of bureaucrats and old cultural mores. As the world outside the increasingly self-sufficient arcologies began to deteriorate, it wasn't long after that before the first arcologies declared independence from their parent nations, creating the original Free Cities we know today.");
	r.toParagraph();

	r.push("Choose a more particular entry below:");
	r.toNode("div");

	return t;
}, "X-SeriesArchology");

App.Encyclopedia.addArticle("What the Upgrades Do", function() {
 const t = new DocumentFragment();
	const r = new SpacedTextAccumulator(t);
 /**
	 * @param {string} text
	 * @param {string} [article]
	 * @param {string} [className]
	 */
  const link = (text, article, className) => App.Encyclopedia.Dialog.linkDOM(text, article, className);
 /**
	 * @param {string|HTMLSpanElement} text
	 * @param {string[]} [tag]
	 */
  const highlight = (text, tag=["bold"]) => App.UI.DOM.makeElement("span", text, tag);

 App.Events.addNode(t, [`There are a lot of upgrades available for your arcology, ${properTitle()}. Please relax; some panic upon reviewing the options is normal. This list should familiarize you with your choices.`], "div", "note");

 r.push(highlight("Construction", ["div"]));
 r.push("The first upgrade section on the arcology management menu offers an escalating series of generic upgrades for the arcology. A few of these have minor beneficial side effects, but all share the same main effect: they raise the arcology's maximum prosperity level. You will be informed on the end of week report if your arcology is nearing, at, or over this level. Upgrading early is", highlight("not", ["note"]), "useless, since prosperity will increase more rapidly if the cap is much higher than the current prosperity level.");
 r.toParagraph();

 r.push(highlight("Facilities", ["div"]));
 r.push("These upgrades unlock the various facilities, which are detailed", link("here.", "Facilities"));
 r.toParagraph();

 r.push(highlight("Penthouse Improvements", ["div"]));
 r.push("The master suite and Head Girl suite options function like facilities. The master suite is the facility for the fucktoy assignment, and the Head Girl suite can house a single slave for her use.");
 r.toNode("div");
 App.Events.addNode(t, [highlight(highlight("Kitchen upgrade:"), ["bold", "note"]), "this increases the chances of success for dieting and opens up additional dietary options."], "div", ["indent"]);
 App.Events.addNode(t, [highlight(highlight("Feeding phalli:"), ["bold", "note"]), "unbroken slaves will find this disgusting, but it can cause beneficial oral fetishes to appear."], "div", ["indent"]);
 App.Events.addNode(t, [highlight(highlight("Drug fuckmachines:"), ["bold", "note"]), "unbroken slaves will resent this, but it may cause beneficial anal fetishes to appear."], "div", ["indent"]);
 App.Events.addNode(t, [highlight(highlight("Personal armory:"), ["bold", "note"]), "unlocks bodyguard options on the main menu."], "div", ["indent"]);
 App.Events.addNode(t, [highlight(highlight("Pharmaceutical Fabricator:"), ["bold", "note"]), "requires a lot of", link("reputation", "Arcologies and Reputation"), "green", "to buy and use; unlocks powerful drug upgrades."], "div", ["indent"]);
 App.Events.addNode(t, [highlight(highlight("Surgery upgrade:"), ["bold", "note"]), "enables several extreme surgical options like virginity restoration and hermaphrodite creation."], "div", ["indent"]);
 r.toNode("p");

 r.push(highlight("Special Upgrades", ["div"]));
 r.push("Upgrades obtained during special events are listed here for reference. They cannot be purchased normally. Week:");
 r.toNode("div");
 App.Events.addNode(t, [highlight("24:"), "Arming yourself and or your", link("drones", "Security Drones"), "if installed."], "div", ["indent"]);
 App.Events.addNode(t, [highlight("62:"), "Establishing mercs."], "div", ["indent"]);
 App.Events.addNode(t, [highlight("65:"), "Giving your established mercs a unique title."], "div", ["indent"]);
 App.Events.addNode(t, [highlight("72 or later:"), "Establish the", link("Special Force"), "(if the mod is enabled)."], "div", ["indent"]);

 return t;
}, "X-SeriesArchology");

App.Encyclopedia.addArticle("Personal Assistant", function() {
 const t = new DocumentFragment();
	const r = new SpacedTextAccumulator(t);

	App.Events.addNode(t, [`${properTitle()}, "I am your personal assistant."`], "p", "note");

	r.push("Though I am a highly advanced program, I am not a true AI. I am neither sentient nor self-aware. My chief usefulness lies in my computing power, which is sufficient to run the arcology and all of its systems, and to monitor its huge suite of internal sensors. If it happens here, I know about it, and if it's important, I'll tell you. Through me, you are effectively omniscient within your arcology. Omnipotence will have to wait until I implant your slaves with control chips to convert them into my mindless fuckpuppet soldiery.");
	r.toNode("p", ["note"]);

	App.Events.addNode(t, ["That was a joke."], "p", "note");

	r.push("I have been watching you and your slaves with close attention, so I have one other function to mention. I have learned a little of what constitutes successful slave training and husbandry. If you select the 'Rules Assistant' option on the main menu, I will review the rules your slaves are under and address any obvious problems. For example, I will place all disobedient slaves under restrictive rules.");
	r.toNode("p", ["note"]);

	r.push("I would say that it is a pleasure to serve, but you are no doubt", App.UI.DOM.makeElement("span", "intelligent", ["cyan"]), `enough to know that I cannot feel pleasure, making that a pointless pleasantry. Good day, ${properTitle()}.`);
	r.toNode("p", ["note"]);

 return t;
}, "X-SeriesArchology");

App.Encyclopedia.addArticle("The Wardrobe", function() {
 const t = new DocumentFragment();
	const r = new SpacedTextAccumulator(t);

	r.push("The Wardrobe is a dressing area for all of your slaves, and a place where unused outfits are stored. Tailoring is available to make sure outfits fit each slave to your specifications. Here, players make choices about how slaves will appear in their dress, or lack of it. Choose outfits wisely to correspond to the culture that your citizens approve of, and your", App.Encyclopedia.Dialog.linkDOM("reputation", "Arcologies and Reputation", "green"), "will increase more quickly. Items that stretch or constrict such as plugs or corsets will eventually have a lasting impact on slaves anatomy.");
	r.toNode("div", ["note"]);

	r.push("The wardrobe has two functions: First, individual slaves can be selected and then dressed in the wardrobe with anything from the basic clothing or shoes to the more exotic plugs and corsets. Secondly, players can access the wardrobe directly from the penthouse, and unlock collections of new outfits with ¤.");
	r.toParagraph();

 return t;
}, "X-SeriesArchology");

App.Encyclopedia.addArticle("The Auto Salon", function() {
 const t = new DocumentFragment();
	const r = new SpacedTextAccumulator(t);

	r.push("Your auto salon is similar to the studio and the remote surgery, but is far less intimidating.");
	r.push("It is set up like a single seat from an old world beauty salon, except that a series of manipulators descend from the ceiling towards the chair.");
	r.push("It can perform any of the usual cosmetic services. The only special capability it has is to automatically color coordinate nails and makeup with a slave's hair.");
	r.push("It is fashionable to apply color schemes to slaves, and this function will make following the trend easy. Your salon will cost");
	r.push(App.UI.DOM.makeElement("span", `${cashFormat(V.modCost)}`, ["yellowgreen"]), "per use. These procedures are not especially invasive, and you can perform as many of them as you wish during a single week without fear for your slave's health.");
	r.toNode("div", ["note"]);

	r.push("The auto salon is mostly available for the player's experimentation. Some combinations of cosmetic options can have minor effects on some assignments and events, but these are very marginal. Slaves' appearances will differ in many scenes and events based on the player's cosmetic choices, but these details are for flavor only. As usual, gameplay effects are usually called out in explicit colored text; if they aren't, no major gameplay effects are happening.");
	r.toParagraph();

 return t;
}, "X-SeriesArchology");

App.Encyclopedia.addArticle("The Body Mod Studio", function() {
 const t = new DocumentFragment();
	const r = new SpacedTextAccumulator(t);

	r.push("Your studio was sadly neglected by the previous owner of the arcology, but is in great shape and ready for use.");
	r.toNode("div", ["note"]);

	r.push("There are remote surgical and tattoo implements if you wish to hire an artist to do the work for you, but there are also sophisticated piercing and tattoo implements that can help you plan and apply the work yourself. Select a body part and a desired modification, and they'll do the rest.");
	r.toNode("p", ["note"]);

	r.push("Your equipment will cost", App.UI.DOM.makeElement("span", `${cashFormat(V.modCost)}`, ["yellowgreen"]), "per use. These procedures are not especially invasive, and you can perform as many of them as you wish during a single week without fear for your slave's health.");
	r.toNode("p", ["note"]);

 return t;
}, "X-SeriesArchology");

App.Encyclopedia.addArticle("The Remote Surgery", function() {
 const t = new DocumentFragment();
	const r = new SpacedTextAccumulator(t);

	r.push("Congratulations on your purchase of a Caduceus model remote surgical unit. This is the very last word in slave surgical alteration.");
	r.toParagraph();

	r.push("To use your remote surgery, simply strap a slave to the operating table and purchase surgical services. Any doctor can take control of the remote surgery by telepresence and operate on your slave. You have all the options of a modern hospital, right in the comfort of your own home.");
	r.toParagraph();

	r.push("— Owner's Manual, Remote Surgical Unit model 'Caduceus'");
	r.toParagraph();

	r.push("It will cost", App.UI.DOM.makeElement("span", `${cashFormat(V.surgeryCost)}`, ["yellowgreen"]), "to purchase a doctor's telepresence and keep the equipment charged with the necessary materials. These procedures are invasive and will reduce a slave's health. Use drugs or rest to counteract this.");
	r.toNode("p", ["note"]);

 return t;
}, "X-SeriesArchology");

App.Encyclopedia.addArticle("The Pharmaceutical Fab", function() {
 const t = new DocumentFragment();
	const r = new SpacedTextAccumulator(t);

	r.push("Pharmaceutical fabricators are the cutting edge of modern medicine. They are in short supply and are therefore ruinously expensive, but can greatly reduce the cost of maintaining a large stable of slaves by cutting drug overhead. They are also the only source of a new generation of advanced drugs that must be tailored to the individual patient's biochemistry.");
	r.toParagraph();

	r.push("— Dodgson, Jane Elizabeth,", App.UI.DOM.makeElement("span", "Pharmaceutical Review '32", ["note"]));
	r.toNode("div");

 return t;
}, "X-SeriesArchology");

App.Encyclopedia.addArticle("Security Drones", function() {
 const t = new DocumentFragment();
	const r = new SpacedTextAccumulator(t);

	r.push("As built, X-Series arcologies are equipped with basic security systems, and a complement of maintenance and cleaning drones.");
	r.toNode("div", ["note"]);

	r.push("The infrastructure that supports these drones is designed to be easily retrofittable to support new designs and classes of drones. One optional upgrade that may suit some owners particularly well is the addition of security drones. These are radically different than the slow, robust utility drones.");
	r.toNode("p", ["note"]);

	r.push("The X-Series security drone is undergoing a yearly upgrade cycle, but the entire family has some major features in common. All are light, multi-rotor flying drones with between three and six propulsors. Generally speaking, they favor speed and ease of handling over armor or endurance.");
	r.toNode("p", ["note"]);

	r.push("Their mobility is such that they can typically reach any point within the arcology in minutes. They are robust to damage but unarmored, and generally carry payloads of between two and five kilograms. Since they are designed to operate within or very close to the arcology, they have an autonomous endurance of less than an hour.");
	r.toNode("p", ["note"]);

	r.push("Standard kit includes hardened communications links to the arcology's computer systems, loudspeakers for public interface, and nonlethal compliance systems including tasers and chemical emitters.");
	r.toNode("p", ["note"]);

	r.push("—", App.UI.DOM.makeElement("span", "X-Series Arcology Owners' Manual", ["note"]));
	r.toParagraph();

 return t;
}, "X-SeriesArchology");

App.Encyclopedia.addArticle("Water Filtration", function() {
 const t = new DocumentFragment();
	const r = new SpacedTextAccumulator(t);

	r.push(`X-Series arcologies are, in many ways, comparable to massive organisms. Under this metaphor, their circulatory systems include thousands of ${V.showInches === 2 ? 'miles' : 'kilometers'} of plumbing for water distribution and waste removal.`);
	r.toNode("div", ["note"]);

	r.push("The X-Series has established a new state of the art in arcology moisture reclamation. Air conditioning, hydrofarming, sewage treatment, and plumbing systems work together to recycle water with an efficiency greater than 99.99%. When combined with the arcology's skin, which is cleverly shaped to catch and retain almost all rain that falls on it, importing water will become a thing of the past.");
	r.toNode("p", ["note"]);

	r.push("This system is carefully balanced. It is designed to work for decades without major maintenance, but it is limited to a certain maximum population. Major upgrades will be necessary should the arcology population exceed this figure. Fortunately, the system is designed to be almost infinitely expandable.");
	r.toNode("p", ["note"]);

	r.push("Finally, the X-Series has been designed from the ground up by slaveowners, for slaveowners. The standard X-Series arcology is not equipped for dairy operations, but the water filtration system has been designed to support dairy upgrades. With minimal additions, X-Series owners will be able to Pasteurize and store a nearly unlimited quantity of nature's bounty.");
	r.toNode("p", ["note"]);

	r.push("—", App.UI.DOM.makeElement("span", "X-Series Arcology Owners' Manual", ["note"]));
	r.toParagraph();

 return t;
}, "X-SeriesArchology");

App.Encyclopedia.addArticle("Slave Nutrition", function() {
 const t = new DocumentFragment();
	const r = new SpacedTextAccumulator(t);

	r.push("Your X-Series arcology is designed to produce large quantities of high quality foodstuffs, from fresh vegetables to basic nutritive protein. The X-Series also produces the most advanced nutrition in the world. Our proprietary special slave nutrition system has been designed by slaveowners, for slaveowners, and truly makes the X-Series special.");
	r.toNode("div", ["note"]);

	r.push("This system produces a protein-rich drink that provides the physically active female body all its necessary nutrients. The artificial flavoring is specially designed to provide a palatable taste and texture while avoiding too much enjoyment and preventing excessive boredom. It supports a strong immune system and an energetic outlook.");
	r.toNode("p", ["note"]);

	r.push("It even causes a mild increase in sex drive. Our development team found that the slave body experiences a slight gain in libido merely from being so perfectly fed. It was simple and healthy to reinforce this effect with additives.");
	r.toNode("p", ["note"]);

	r.push("Our slave nutrition accomplishes all this while leaving the lower digestive tract extremely clean. We recommend your slaves undergo an occasional deep enema: under this regimen, slaveowners can be forgiven for forgetting that their slaves' anuses are involved in digestion at all. The designers of the X-Series trust that their clients can find other uses for them.");
	r.toNode("p", ["note"]);

	r.push("—", App.UI.DOM.makeElement("span", "X-Series Arcology Owners' Manual", ["note"]));
	r.toParagraph();

 return t;
}, "X-SeriesArchology");

App.Encyclopedia.addCategory("X-SeriesArchology", function() {
 const r = [];
	if (V.encyclopedia !== "The X-Series Arcology") {
		r.push(App.Encyclopedia.Dialog.linkDOM("The X-Series Arcology"));
	}
 r.push(App.Encyclopedia.Dialog.linkDOM("What the Upgrades Do"));
 r.push(App.Encyclopedia.Dialog.linkDOM("Personal Assistant"));
 r.push(App.Encyclopedia.Dialog.linkDOM("The Wardrobe"));
 r.push(App.Encyclopedia.Dialog.linkDOM("The Auto Salon"));
 r.push(App.Encyclopedia.Dialog.linkDOM("The Body Mod Studio"));
 r.push(App.Encyclopedia.Dialog.linkDOM("The Remote Surgery"));
 r.push(App.Encyclopedia.Dialog.linkDOM("The Pharmaceutical Fab"));
 r.push(App.Encyclopedia.Dialog.linkDOM("Security Drones"));
 r.push(App.Encyclopedia.Dialog.linkDOM("Water Filtration"));
 r.push(App.Encyclopedia.Dialog.linkDOM("Slave Nutrition"));
 return App.UI.DOM.generateLinksStrip(r);
});


code:
/** Render a link that toggles the slave's favorite status
 * @param {App.Entity.SlaveState} slave
 * @param {function():void} [handler]
 * @returns {HTMLAnchorElement}
 */
App.UI.favoriteToggle = function(slave, handler) {
	function favLink() {
		const linkID = `fav-link-${slave.ID}`;
		if (V.favorites.includes(slave.ID)) {
			const link = App.UI.DOM.link(String.fromCharCode(0xe800), () => {
				V.favorites.delete(slave.ID);
				$(`#${linkID}`).replaceWith(favLink());

				if (handler) {
					handler();
				}
			});
			link.classList.add("icons", "favorite");
			link.id = linkID;
			return link;
		} else {
			const link = App.UI.DOM.link(String.fromCharCode(0xe801), () => {
				V.favorites.push(slave.ID);
				$(`#${linkID}`).replaceWith(favLink());

				if (handler) {
					handler();
				}
			});
			link.classList.add("icons", "not-favorite");
			link.id = linkID;
			return link;
		}
	}

	return favLink();
};


code:
App.Intro.alphaDisclaimer = function() {
	App.Intro.init();
	const node = new DocumentFragment();

	App.UI.DOM.appendNewElement("h2", node, "Warning");

	App.UI.DOM.appendNewElement("p", node, `This is a text-based game that includes descriptions of sexual activity, graphic violence, drug use, and other subjects not suitable for persons under the age of 18. This is a work of fiction; any resemblance to actual persons, places, or events is unintended.`, "yellow");

	App.UI.DOM.appendNewElement("h2", node, "Welcome!");

	App.UI.DOM.appendNewElement("p", node, `An in-game encyclopedia is available from the sidebar, with answers to most basic gameplay questions.`);
	App.Events.addParagraph(node, [
		App.UI.DOM.makeElement("span", `Important info for new players, and a reminder for FC veterans:`, "bold"),
		`when the player is offered a set of choices, the`,
		App.UI.DOM.makeElement("span", `Continue`, "bold"),
		`button at the top of the left sidebar will almost always remain available. Using this to decline all the options presented is not cheating. If it's available, it's supposed to be available. It represents the player character politely bowing out of the situation.`
	]);

	App.UI.DOM.appendNewElement("h2", node, "Please note");
	const p = App.UI.DOM.appendNewElement("p", node);
	App.Events.addNode(p, [
		App.UI.DOM.makeElement("span", `This is an alpha.`, "bold"),
		`That means the game is missing content, is full of bugs, is imbalanced, and is generally in an incomplete state. The game will keep a start of turn autosave. If you encounter a bug, we strongly recommend you reload your start of turn autosave immediately. Please submit your feedback and bug reports here. Consider attaching a save file and screenshot of the problem.`,
	], "div");
	App.Events.addNode(p, [`Pregmod is a modification of the original <i>Free Cities</i> ${V.ver} created by FCdev, which can be seen <a href='https://freecitiesblog.blogspot.com/' target='_blank'>here</a>.`], "div");

	App.Events.addNode(p, [`mod version: ${V.pmodVer}, build: ${V.releaseID}${App.Version.commitHash ? `, commit: ${App.Version.commitHash}` : ``}`], "div", "note");
	App.Events.addNode(p, [`4.0.0 is an alpha release. This means the new player content has minimal implementation.`], "div", "bold"); /* remove me with 4.0.0! */

	App.Events.addResponses(node, [
		new App.Events.Result(`More version info`, versionInfo)
	]);

	App.UI.DOM.appendNewElement("p", node, App.UI.DOM.passageLink(
		"I am 18 or more years of age, I understand, and I wish to continue",
		"Economy Intro"
	));

	return node;

	function versionInfo() {
		const frag = new DocumentFragment();
		App.Events.addNode(frag, [
			App.UI.DOM.makeElement("span", "Mod: expanded age ranges and other tweaks 2016-08-30", ["green", "note"]),
			App.UI.DOM.makeElement("span", `+SV`, "darkred"),
		], "div");
		App.UI.DOM.appendNewElement("div", frag, "Mod: extra preg content and other crap", ["green", "note"]);
		App.UI.DOM.appendNewElement("div", frag, "Saves from versions prior to 0.6 are not compatible.", "bold");

		return frag;
	}
};


code:
/**
 * Provide a mechanism to inspect multiple slaves at once (for example, for Household Liquidators and recETS).
 * @param {Array<App.Entity.SlaveState>} slaves
 * @param {boolean} showFamilyTree
 * @param {FC.SlaveMarketName | FC.SpecialMarketName} [market]
 * @param {Map<number, string>} [marketText] map of Slave ID to text
 * @returns {DocumentFragment}
 */
App.UI.MultipleInspect = function(slaves, showFamilyTree, market, marketText) {
	const tabBar = new App.UI.Tabs.TabBar("MultipleInspect");

	for (const slave of slaves) {
		const text = marketText ? marketText.get(slave.ID) : null;
		tabBar.addTab(slave.slaveName, `slave${slave.ID}`, App.Desc.longSlave(slave, {market: market, marketText: text}));
	}

	if (slaves.length > 1 && showFamilyTree) {
		tabBar.addTab("Family Tree", "family-tree-tab", renderFamilyTree(slaves, slaves[0].ID));
	}

	return tabBar.render();
};


code:
App.UI.descriptionOptions = function() {
	const f = document.createDocumentFragment();
	App.UI.DOM.appendNewElement("h1", f, "Description Options");

	App.UI.DOM.appendNewElement("p", f,
		"These options will affect both the long form description of each slave and the miniscenes available from the main menu.",
		"scene-intro");

	const options = new App.UI.OptionsGroup();

	options.addOption("", "surnameOrder")
		.addValue("Allow nationality name order", 0).customDescription("Order names ''based on country of origin''.")
		.addValue("Force name surname", 1).customDescription("Names will always be ''Name Surname''.")
		.addValue("Force surname name", 2).customDescription("Names will always be ''Surname Name''.");

	options.addOption("", "seeRace")
		.addValue("Disable most mentions of race", 0).off()
		.customDescription("Ethnicity will ''almost never'' be mentioned.")
		.addValue("Enable mentions of race", 1).on().customDescription("Ethnicity will ''occasionally'' be mentioned.");

	options.addOption("", "seeNationality")
		.addValue("Disable most mentions of nationality", 0).off()
		.customDescription("Nationality will ''almost never'' be mentioned.")
		.addValue("Enable mentions of nationality", 1).on()
		.customDescription("Nationality will ''occasionally'' be mentioned.");

	options.addOption("The effects of implants are", "showImplantEffects")
		.addValue("Shown", 1).on().addValue("Hidden", 0).off();

	options.addOption("Clothing is mostly", "showClothing")
		.addValue("Shown", 1).on().addValue("Hidden", 0).off();

	options.addOption("Detailed slave age information is", "showAgeDetail")
		.addValue("Shown", 1).on().addValue("Hidden", 0).off();

	options.addOption("Approximate height is", "showHeightCMs")
		.addValue("Shown", 1).on().addValue("Hidden", 0).off();

	options.addOption("Cosmetic body mods are", "showBodyMods")
		.addValue("Shown", 1).on().addValue("Hidden", 0).off();

	options.addOption("Sexual histories are", "showSexualHistory")
		.addValue("Shown", 1).on().addValue("Hidden", 0).off();

	options.addOption("Attractiveness and sexual scores are", "showScores")
		.addValue("Shown", 1).on().addValue("Hidden", 0).off();

	options.addOption("Volume, in CCs, of breasts is", "showBoobCCs")
		.addValue("Shown", 1).on().addValue("Hidden", 0).off();

	options.addOption("Height and length units are in", "showInches")
		.addValueList([["Metric", 0], ["Both", 1], ["Imperial", 2]]);

	if (V.seeDicks > 0) {
		options.addOption("Approximate sizes of dicks and balls are", "showDickCMs")
			.addValue("Shown", 1).on().addValue("Hidden", 0).off();
	}

	options.addOption("Numbers are displayed as", "showNumbers")
		.addValueList([["Integers", 2], ["Both", 1], ["Words", 0]]);

	if (V.showNumbers === 1) {
		options.addOption(`Only numbers up to ${V.showNumbersMax} are displayed as words`, "showNumbersMax")
			.addValue("Default (20)", 20).showTextBox();
	}

	App.UI.DOM.appendNewElement("p", f, options.render());

	return f;
};