From 168f7dde9f4451cb6f837003edddd144a117c2e5 Mon Sep 17 00:00:00 2001 From: DCoded <dcoded@live.com> Date: Fri, 4 Sep 2020 23:29:32 -0400 Subject: [PATCH] Added classes --- src/npc/interaction/fAnimal.js | 111 ++++++++++++++++++++++++++------- 1 file changed, 88 insertions(+), 23 deletions(-) diff --git a/src/npc/interaction/fAnimal.js b/src/npc/interaction/fAnimal.js index 8d0f08553ee..5cee5ee4fb1 100644 --- a/src/npc/interaction/fAnimal.js +++ b/src/npc/interaction/fAnimal.js @@ -1,3 +1,4 @@ + /** * @param {App.Entity.SlaveState} slave */ @@ -7,15 +8,15 @@ App.Interact.fAnimal = function(slave, type) { {He, he, him, His, his, girl} = getPronouns(slave), - acts = { + Acts = { VAGINAL: "vaginal", ANAL: "anal", ORAL: "oral", }, - vaginal = acts.VAGINAL, - anal = acts.ANAL, - oral = acts.ORAL, + vaginal = Acts.VAGINAL, + anal = Acts.ANAL, + oral = Acts.ORAL, approvingFetishes = ["masochist", "humiliation", "perverted", "sinful"]; // not strictly fetishes, but approvingFetishesAndBehavioralQuirksAndSexualQuirks doesn't have the same ring to it @@ -299,7 +300,7 @@ App.Interact.fAnimal = function(slave, type) { } if (act !== oral) { - virginityCheck(act); + mainSpan.append(virginityCheck(act)); } function consummationDevotedCanine(type) { @@ -377,7 +378,7 @@ App.Interact.fAnimal = function(slave, type) { } if (act !== oral) { - virginityCheck(act); + mainSpan.append(virginityCheck(act)); } function consummationNondevotedCanine(type) { @@ -455,7 +456,7 @@ App.Interact.fAnimal = function(slave, type) { } if (act !== oral) { - virginityCheck(act); + mainSpan.append(virginityCheck(act)); } function consummationNonresistantCanine(type) { @@ -533,7 +534,7 @@ App.Interact.fAnimal = function(slave, type) { } if (act !== oral) { - virginityCheck(act); + mainSpan.append(virginityCheck(act)); } function consummationResistantCanine(type) { @@ -850,12 +851,16 @@ App.Interact.fAnimal = function(slave, type) { // MARK: Virginity Check Functions function virginityCheck(type) { - const mainSpan = document.createElement("span"); + const + mainSpan = document.createElement("span"), + virginityLossSpan = App.UI.DOM.makeElement("span", '', ["virginity", "loss"]); switch (type) { case vaginal: if (act === vaginal && slave.vagina === 0) { - mainSpan.append(`The slave gives a loud ${slave.devotion > 20 ? `moan` : `groan`} as ${his} virginity is taken from ${him}${slave.devotion < -20 ? ` by force` : ``}.`); + virginityLossSpan.append(`${his} virginity is taken from ${him}${slave.devotion < -20 ? ` by force` : ``}.`); + + mainSpan.append(`The slave gives a loud ${slave.devotion > 20 ? `moan` : `groan`} as `, virginityLossSpan, ` `); mainSpan.append(virginityEffects(type)); } @@ -875,40 +880,72 @@ App.Interact.fAnimal = function(slave, type) { } function virginityEffects(type) { - const mainSpan = document.createElement("span"); + const + mainSpan = document.createElement("span"), + devotionSpan = document.createElement("span"), + trustSpan = document.createElement("span"), + healthSpan = App.UI.DOM.makeElement("span", '', ["health", "dec"]); switch (type) { case vaginal: if (slave.devotion >= -20) { if (slaveApproves()) { - mainSpan.append(`Losing ${his} virginity in such a painful manner has increased ${his} devotion to you.`); + devotionSpan.classList.add("devotion", "inc"); + + devotionSpan.append(`increased ${his} devotion to you. `); + + mainSpan.append(`Losing ${his} virginity in such a painful manner has `, devotionSpan); slave.devotion += 10; } else { if (slave.devotion > 50) { - mainSpan.append(`Since ${he} is well broken, losing ${his} virginity in such a manner has increased ${his} submission to you.`); + devotionSpan.classList.add("devotion", "inc"); + + devotionSpan.append(`increased ${his} submission to you. `); + + mainSpan.append(`Since ${he} is well broken, losing ${his} virginity in such a manner has`, devotionSpan); slave.devotion += 5; } else if (slave.devotion >= -20) { - mainSpan.append(`Losing ${his} virginity in such a manner has increased ${his} submission to you, though ${he} is fearful that you'll decide to only use ${him} to sate your animals' lust.`); + devotionSpan.classList.add("devotion", "inc"); + trustSpan.classList.add("trust", "dec"); + + devotionSpan.append(`increased ${his} submission to you,`); + trustSpan.append(`fearful`); + + mainSpan.append(`Losing ${his} virginity in such a manner has`, devotionSpan, ` though ${he} is `, trustSpan, ` that you'll decide to only use ${him} to sate your animals' lust. `); slave.devotion += 5; slave.trust -= 5; } else { - mainSpan.append(`${He} is clearly unhappy in the manner in which ${his} virginity has been taken, and ${he} fears you'll decide to only use ${him} to sate your animals' lust.`); + devotionSpan.classList.add("devotion", "dec"); + trustSpan.classList.add("trust", "dec"); + + devotionSpan.append(`unhappy`); + trustSpan.append(`fears`); + + mainSpan.append(`${He} is clearly `, devotionSpan, ` in the manner in which ${his} virginity has been taken, and ${he} `, trustSpan, ` you'll decide to only use ${him} to sate your animals' lust. `); slave.devotion -= 10; slave.trust -= 10; } } } else { - mainSpan.append(`Having ${his} pearl of great price taken by a mere beast has reinforced the hatred ${he} holds towards you, and ${he} is terrified you'll only use ${him} as a plaything for your animals.`); + devotionSpan.classList.add("devotion", "dec"); + trustSpan.classList.add("trust", "dec"); + + devotionSpan.append(`reinforced the hatred ${he} holds towards you,`); + trustSpan.append(`terrified`); + + mainSpan.append(`Having ${his} pearl of great price taken by a mere beast has `, devotionSpan, ` and ${he} is `, trustSpan, ` you'll only use ${him} as a plaything for your animals. `); slave.devotion -= 10; slave.trust -= 10; } - mainSpan.append(`Having ${his} cherry popped in such a manner was extremely painful and slightly damaged ${his} health.`); + healthSpan.append(`slightly damaged ${his} health. `); + + mainSpan.append(`Having ${his} cherry popped in such a manner was extremely painful and `, healthSpan); healthDamage(slave, 5); @@ -916,34 +953,62 @@ App.Interact.fAnimal = function(slave, type) { case anal: if (slave.devotion >= -20) { if (slaveApproves()) { - mainSpan.append(`Losing ${his} anal virginity in such a painful manner has increased ${his} devotion to you.`); + devotionSpan.classList.add("devotion", "inc"); + + devotionSpan.append(`increased ${his} devotion to you. `); + + mainSpan.append(`Losing ${his} anal virginity in such a painful manner has `, devotionSpan); slave.devotion += 10; } else { if (slave.devotion > 50) { - mainSpan.append(`Since ${he} is well broken, losing ${his} anal virginity in such a manner has increased ${his} submission to you.`); + devotionSpan.classList.add("devotion", "inc"); + + devotionSpan.append(`increased ${his} submission to you. `); + + mainSpan.append(`Since ${he} is well broken, losing ${his} anal virginity in such a manner has `, devotionSpan); slave.devotion += 5; } else if (slave.devotion >= -20) { - mainSpan.append(`Losing ${his} anal virginity in such a manner has increased ${his} submission to you, though ${he} is fearful that you'll decide to only use ${him} to sate your animals' lust.`); + devotionSpan.classList.add("devotion", "inc"); + trustSpan.classList.add("trust", "dec"); + + devotionSpan.append(`increased ${his} submission to you,`); + trustSpan.append(`fearful`); + + mainSpan.append(`Losing ${his} anal virginity in such a manner has `, devotionSpan, ` though ${he} is `, trustSpan, ` that you'll decide to only use ${him} to sate your animals' lust. `); slave.devotion += 5; slave.trust -= 5; } else { - mainSpan.append(`${He} is clearly unhappy in the manner in which ${his} anal virginity has been taken, and ${he} fears you'll decide to only use ${him} to sate your animals' lust.`); + devotionSpan.classList.add("devotion", "dec"); + trustSpan.classList.add("trust", "dec"); + + devotionSpan.append(`unhappy`); + trustSpan.append(`fears`); + + mainSpan.append(`${He} is clearly `, devotionSpan, ` in the manner in which ${his} anal virginity has been taken, and ${he} `, trustSpan, ` you'll decide to only use ${him} to sate your animals' lust. `); slave.devotion -= 10; slave.trust -= 10; } } } else { - mainSpan.append(`Having ${his} pearl of great price taken by a mere beast has reinforced the hatred ${he} holds towards you, and ${he} is terrified you'll only use ${him} as a plaything for your animals.`); + devotionSpan.classList.add("devotion", "dec"); + trustSpan.classList.add("trust", "dec"); + + devotionSpan.append(`reinforced the hatred ${he} holds towards you,`); + trustSpan.append(`terrified`); + + mainSpan.append(`Having ${his} pearl of great price taken by a mere beast has `, devotionSpan, ` and ${he} is `, trustSpan, ` you'll only use ${him} as a plaything for your animals. `); slave.devotion -= 10; slave.trust -= 10; } - mainSpan.append(`Having ${his} rosebud broken in in such a manner was extremely painful and slightly damaged ${his} health.`); + healthSpan.append(`slightly damaged ${his} health. `); + + mainSpan.append(`Having ${his} rosebud broken in in such a manner was extremely painful and `, healthSpan); healthDamage(slave, 5); -- GitLab