Skip to content
Snippets Groups Projects
Commit dfd0a73c authored by brickode's avatar brickode
Browse files

DOMified childFriendshipRivalries()

parent f5e86c33
No related branches found
No related tags found
1 merge request!7243Children Report Rework
...@@ -288,31 +288,38 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { ...@@ -288,31 +288,38 @@ App.Facilities.Nursery.childrenReport = function childrenReport() {
for (const target of V.cribs) { for (const target of V.cribs) {
const const
div = document.createElement("div"),
{ his } = getPronouns(target), { his } = getPronouns(target),
chance = jsRandom(1, 100); chance = jsRandom(1, 100);
let let
r = [],
friend = 0, friend = 0,
rival = 0; rival = 0;
if (target.actualAge >= 3) { if (target.actualAge >= 3) {
if (target.fetish === child.fetish) { if (target.fetish === child.fetish) {
r.push(`${target.slaveName} and ${child.slaveName} ${target.fetish}s, a fact over which they bond.`); // TODO: redo this
div.append(`${target.slaveName} and ${child.slaveName} ${target.fetish}s, a fact over which they bond.`);
friend++; friend++;
} }
if (target.sexualQuirk === child.sexualQuirk || target.behavioralQuirk === child.behavioralQuirk) { if (target.sexualQuirk === child.sexualQuirk || target.behavioralQuirk === child.behavioralQuirk) {
r.push(`Since ${child.slaveName} and ${target.slaveName} both ${target.sexualQuirk === child.sexualQuirk ? target.sexualQuirk : target.behavioralQuirk}, they learn to get along a bit better.`); div.append(`Since ${child.slaveName} and ${target.slaveName} both ${target.sexualQuirk === child.sexualQuirk ?
target.sexualQuirk :
target.behavioralQuirk}, they learn to get along a bit better.`);
friend++; friend++;
} }
if (target.fetish === "sadist" || target.fetish === "dom") { if (target.fetish === "sadist" || target.fetish === "dom") {
r.push(`${target.slaveName} is a ${target.fetish}, and ${child.slaveName} is often ${his} target, which ${child.slaveName} doesn't particularly like.`); div.append(`${target.slaveName} is a ${target.fetish}, and ${child.slaveName} is often ${his} target, which ${child.slaveName} doesn't particularly like.`);
rival++; rival++;
} else if (child.fetish === "sadist" || child.fetish === "dom") { } else if (child.fetish === "sadist" || child.fetish === "dom") {
r.push(`${child.slaveName} is a ${child.fetish}, and ${target.slaveName} is often ${his} target, which ${target.slaveName} doesn't particularly like.`); div.append(`${child.slaveName} is a ${child.fetish}, and ${target.slaveName} is often ${his} target, which ${target.slaveName} doesn't particularly like.`);
rival++; rival++;
} }
...@@ -320,7 +327,8 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { ...@@ -320,7 +327,8 @@ App.Facilities.Nursery.childrenReport = function childrenReport() {
if (rival) { if (rival) {
if (friend > rival && child.relationshipTarget !== target.ID) { if (friend > rival && child.relationshipTarget !== target.ID) {
if (chance > 75) { if (chance > 75) {
r.push(becomeFriends()); div.append(becomeFriends());
child.relationship = 1; child.relationship = 1;
child.relationshipTarget = target.ID; child.relationshipTarget = target.ID;
...@@ -330,7 +338,8 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { ...@@ -330,7 +338,8 @@ App.Facilities.Nursery.childrenReport = function childrenReport() {
} }
} else { } else {
if (chance > 60) { if (chance > 60) {
r.push(becomeRivals()); div.append(becomeRivals());
child.relationship = 1; child.relationship = 1;
child.relationshipTarget = target.ID; child.relationshipTarget = target.ID;
...@@ -344,12 +353,12 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { ...@@ -344,12 +353,12 @@ App.Facilities.Nursery.childrenReport = function childrenReport() {
if (friend) { if (friend) {
if (rival > friend) { if (rival > friend) {
if (chance > 75) { if (chance > 75) {
r.push(becomeRivals()); div.append(becomeRivals());
} }
} }
} else { } else {
if (chance > 60) { if (chance > 60) {
r.push(becomeFriends()); div.append(becomeFriends());
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment