diff --git a/src/interaction/main/useGuard.js b/src/interaction/main/useGuard.js index 50bbf2e4ab436580a455c2d646eb7284fe205c72..79977929ba8faf5b2504b4454b4063ab9fe77d70 100644 --- a/src/interaction/main/useGuard.js +++ b/src/interaction/main/useGuard.js @@ -1,6 +1,8 @@ - -/* OPEN USEGUARD */ -App.Interact.UseGuard = function(slave) { +/** + * @param slave + * @return {string} + */ +App.Interact.guardPose = function(slave) { "use strict"; let r = ``; /* eslint-disable no-unused-vars*/ @@ -279,4 +281,3 @@ App.Interact.UseGuard = function(slave) { } return r; }; -/* CLOSE USEGUARD */ diff --git a/src/js/main.js b/src/js/main.js index f52619035baf1486db77b8dbfaa28c14f5b9c64c..c817c75707eec6c8c924fff53825075fe130e436 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -1,3 +1,6 @@ +/** + * @return {Text} + */ App.MainView.fcnn = function() { let text; @@ -9,3 +12,57 @@ App.MainView.fcnn = function() { return document.createTextNode(`${text} `); }; + +/** + * @return {HTMLDivElement} + */ +App.MainView.useGuard = function() { + const guard = V.slaves[V.slaveIndices[V.Bodyguard.ID]]; + + const outerDiv = document.createElement("div"); + + if (guard === undefined || guard.assignment !== "guard you" || V.useSlaveSummaryOverviewTab === 1) { + return outerDiv; + } + + outerDiv.append(App.UI.DOM.makeSpan(App.Interact.guardPose(guard), "scene-intro")); + + function setEnvironment() { + V.activeSlave = guard; + V.nextButton = "Back"; + V.nextLink = "AS Dump"; + V.returnTo = passage(); + } + + const {him, his} = getPronouns(guard); + const optionDiv = document.createElement("div"); + optionDiv.classList.add("indent"); + + optionDiv.append( + App.UI.DOM.passageLink(`Use ${his} mouth`, "FLips", setEnvironment), + " | ", + App.UI.DOM.passageLink(`Play with ${his} tits`, "FBoobs", setEnvironment) + ); + + if (canDoVaginal(guard)) { + optionDiv.append(" | ", App.UI.DOM.passageLink(`Fuck ${him}`, "FVagina", setEnvironment)); + if (canDoAnal(guard)) { + optionDiv.append(" | ", App.UI.DOM.passageLink(`Use ${his} holes`, "FButt", setEnvironment)); + } + if (guard.belly >= 300000) { + optionDiv.append(" | ", App.UI.DOM.passageLink(`Fuck ${him} over ${his} belly`, "FBellyFuck", setEnvironment)); + } + } + + if (canPenetrate(guard)) { + optionDiv.append(" | ", App.UI.DOM.passageLink(`Ride ${him}`, "FDick", setEnvironment)); + } + if (canDoAnal(guard)) { + optionDiv.append(" | ", App.UI.DOM.passageLink(`Fuck ${his} ass`, "FAnus", setEnvironment)); + } + optionDiv.append(" | ", App.UI.DOM.passageLink(`Abuse ${him}`, "Gameover", () => { V.gameover = "idiot ball"; })); + + outerDiv.append(optionDiv); + + return outerDiv; +}; diff --git a/src/js/slaveListing.js b/src/js/slaveListing.js index f6902d60843ae88cfd6a0a91bb912da3adf7dee2..4c9bd8e53b6aac555648479cdb34302eb43534b3 100644 --- a/src/js/slaveListing.js +++ b/src/js/slaveListing.js @@ -845,7 +845,7 @@ App.UI.SlaveList.penthousePage = function() { const p = getPronouns(BG); V.i = App.Utils.slaveIndexForId(BG.ID); const interactLinkSetters = `$activeSlave = $slaves[${V.i}], $nextButton = "Back", $nextLink = "AS Dump", $returnTo = "Main"`; - r += `<br><span class='scene-intro'>${App.Interact.UseGuard(BG)}</span>`; + r += `<br><span class='scene-intro'>${App.Interact.guardPose(BG)}</span>`; let useHimLinks = []; useHimLinks.push(App.UI.passageLink(`Use ${p.his} mouth`, "FLips", interactLinkSetters)); useHimLinks.push(App.UI.passageLink(`Play with ${p.his} tits`, "FBoobs", interactLinkSetters)); diff --git a/src/uncategorized/main.tw b/src/uncategorized/main.tw index 8f05fc2c90ca60ed04f8ea87d74bbcdf515b8080..de9fd7e0af9c88db65a91767bbf236496fef02e3 100644 --- a/src/uncategorized/main.tw +++ b/src/uncategorized/main.tw @@ -154,34 +154,14 @@ __''MAIN MENU''__ //[[Summary Options]]// <</for>> <</if>> -<<if (def _BG) && ($slaves[_BG].assignment == "guard you") && ($useSlaveSummaryOverviewTab != 1)>> - <<set $i = _BG>> - <<set _j = "Back", _k = "AS Dump", _l = "Main">> - <<setLocalPronouns $slaves[$i]>> - <<set _GO = "idiot ball">> - <br> - //<<= App.Interact.UseGuard($slaves[$i])>>// - <br> [["Use "+$his+" mouth"|FLips][$activeSlave = $slaves[_BG], $nextButton = _j, $nextLink = _k, $returnTo = _l]] - | [["Play with "+$his+" tits"|FBoobs][$activeSlave = $slaves[_BG], $nextButton = _j, $nextLink = _k, $returnTo = _l]] - <<if canDoVaginal($slaves[_BG])>> - | [["Fuck "+$him|FVagina][$activeSlave = $slaves[_BG], $nextButton = _j, $nextLink = _k, $returnTo = _l]] - <<if canDoAnal($slaves[_BG])>> - | [["Use "+$his+" holes"|FButt][$activeSlave = $slaves[_BG],$nextButton = _j, $nextLink = _k, $returnTo = _l]] - <</if>> - <<if $slaves[_BG].belly >= 300000>> - | [["Fuck "+$him+" over "+$his+" belly"|FBellyFuck][$activeSlave = $slaves[_BG], $nextButton = _j, $nextLink = _k, $returnTo = _l]] - <</if>> - <</if>> - /*check*/ - <<if canPenetrate($slaves[_BG])>> - | [["Ride "+$him|FDick][$activeSlave = $slaves[_BG], $nextButton = _j, $nextLink = _k, $returnTo = _l]] - <</if>> - <<if canDoAnal($slaves[_BG])>> - | [["Fuck "+$his+" ass"|FAnus][$activeSlave = $slaves[_BG], $nextButton = _j, $nextLink = _k, $returnTo = _l]] - <</if>> - | [["Abuse "+$him|Gameover][$gameover = _GO]] -<</if>> - +<span id="BG"></span> +<<script>> + $(document).one(':passageend', () => { + $('#BG').append( + App.MainView.useGuard(), + ); + }); +<</script>> <<set $activeSlave = $slaves.random()>> <<if $activeSlave && ($activeSlave.assignment != "please you") && ($activeSlave.assignment != "guard you")>>