JavaScript must be enabled to play.
Browser lacks capabilities required to play.
Upgrade or switch to another browser.
Loading…
<div id="main-content"> <div id="main-text"> <h1>GHOST: Chaos</h1> <hr> <p class="warning"> ⚠️ <b>ADULT CONTENT — 21+ ONLY</b><br> This game contains explicit adult themes and is intended strictly for mature audiences. </p> <hr> <p> <b>Status:</b> Early <b>ALPHA</b><br> This is an early development version of the game.<br> Content, balance, and systems are incomplete and subject to change. </p> <p> <b>Current focus:</b><br> • Core gameplay loop<br> • House locations (Act 1)<br> • Energy, time, and control systems </p> <p> <b>Planned features:</b><br> • Expanded rooms & interactions<br> • Random events & deeper schedules<br> • Relationship & corruption depth<br> • New locations (Act 2: City)<br> • Multiple endings </p> <hr> <p> Player feedback directly shapes future updates.<br> If you want to support development: </p> <p> <a href="https://www.patreon.com/cw/NonPlayer" target="_blank" class="neobutton"> <b>Support on Patreon</b> </a> </p> <hr> <p> <<link "▶ Continue">> <<goto "Intro">> <</link>> </p> </div> </div>
<div id="main-content"><div id="main-text"> <h2>Hall</h2> <div class="rooms-columns-container"> <!-- ===== COLUMN 1: MAIN ===== --> <div class="rooms-column"> <h3>🏠 Main rooms</h3> <div class="rooms-container"> <<nobr>> <<set _col1 = ["DaughterRoom","ParentsRoom","Kitchen","Bathroom","LivingRoom"]>> <<for _room range _col1>> <<if $unlockedRooms[_room]>> <<link $rooms[_room] _room>><</link>> <<else>> <div class="locked-room"> 🔒 <<print $rooms[_room]>> <<if $roomPrices && $roomPrices[_room] != null>> <div class="room-price">Price: $<<print $roomPrices[_room]>></div> <<if $money >= $roomPrices[_room]>> <<link "Buy">> <<set $money -= $roomPrices[_room]>> <<set $unlockedRooms[_room] = true>> <<goto "Hall">> <</link>> <<else>> <div class="no-money">Not enough money</div> <</if>> <</if>> </div> <</if>> <</for>> <</nobr>> </div> </div> <!-- ===== COLUMN 2: UTILITY ===== --> <div class="rooms-column"> <h3>🛠 Utility rooms</h3> <div class="rooms-container"> <<nobr>> <<set _col2 = ["FathersStudy","Attic","Garage","Basement"]>> <<for _room range _col2>> <<if $unlockedRooms[_room]>> <<link $rooms[_room] _room>><</link>> <<else>> <div class="locked-room"> 🔒 <<print $rooms[_room]>> <<if $roomPrices && $roomPrices[_room] != null>> <div class="room-price">Price: $<<print $roomPrices[_room]>></div> <<if $money >= $roomPrices[_room]>> <<capture _room>> <<link "Buy">> <<set $money -= $roomPrices[_room]>> <<set $unlockedRooms[_room] = true>> <<goto "Hall">> <</link>> <</capture>> <<else>> <div class="no-money">Not enough money</div> <</if>> <</if>> </div> <</if>> <</for>> <</nobr>> </div> </div> <!-- ===== COLUMN 3: SPECIAL ===== --> <div class="rooms-column"> <h3>✨ Special</h3> <div class="rooms-container"> <div class="locked-room">🔒 Coming soon…</div> </div> </div> </div> </div></div>
:: DaughterRoom <div id="main-content"> <div id="main-text"> <h2>Daughter's Room</h2> <img src="img/build/rooms/dayghterroon.png" class="story-image"> <<if $characterLocations.daughter == "DaughterRoom">> <p>👧 Daughter is here.</p> <p><i>For control use sidebar → "Quick Control"</i></p> <<else>> <p>Daughter is not here.</p> <</if>> [[Return to hall->Hall]] </div> </div>
<div id="main-content"><div id="main-text"> <div class="room" style="background-image:url('img/build/rooms/kitchen.png')"> <div class="room-content"> <h2 class="room-title">Kitchen</h2> <!-- WHO IS HERE --> <<set _here = []>> <<if $characterLocations.daughter is "Kitchen">><<set _here.push("👧")>><</if>> <<if $characterLocations.father is "Kitchen">><<set _here.push("👨")>><</if>> <<if $characterLocations.mother is "Kitchen">><<set _here.push("👩")>><</if>> <div class="room-card"> <<if _here.length is 0>> <span class="empty">Empty</span> <<else>> <span class="occupied">Present: <<print _here.join(" ")>></span> <</if>> </div> <!-- INTERACTIONS --> <<if $controlledCharacter is "daughter">> <<if $characterLocations.mother is "Kitchen">> <div class="room-card"> <div class="section-title">👩 Mother</div> <div class="actions"> <!-- Help with cooking (1⚡) --> <<if window.canSpendEnergy(1)>> <<link '<span class="action-btn primary"><span class="left"><span>🍽️</span><span class="label">Help with cooking</span></span><span class="cost">1⚡</span></span>'>> <<run window.spendEnergy(1)>> <<set $chars.mother.relations.daughter += 4>> <<set $chars.daughter.corruption += 1>> <<run updateAllUI()>> <<goto "DaughterToMotherKitchenScene1">> <</link>> <<else>> <span class="action-btn disabled"> <span class="left"><span>🍽️</span><span class="label">Help with cooking</span></span> <span class="cost">1⚡</span> </span> <</if>> <!-- Close conversation (2⚡) --> <<if $chars.daughter.corruption >= 8 and $chars.mother.relations.daughter >= 12>> <<if window.canSpendEnergy(2)>> <<link '<span class="action-btn"><span class="left"><span>💬</span><span class="label">Close conversation</span></span><span class="cost">2⚡</span></span>'>> <<run window.spendEnergy(2)>> <<run updateAllUI()>> <<goto "DaughterToMotherKitchenScene2">> <</link>> <<else>> <span class="action-btn disabled"> <span class="left"><span>💬</span><span class="label">Close conversation</span></span> <span class="cost">2⚡</span> </span> <</if>> <</if>> </div> <div class="action-hint">Some actions require energy and relationship levels.</div> </div> <<else>> <div class="room-card"> <div class="notice">No one to interact with here.</div> </div> <</if>> <<else>> <div class="room-card"> <div class="notice">Take control of a character in sidebar.</div> </div> <</if>> <!-- BACK --> <div class="room-card"> <<link '<span class="action-btn"><span class="left"><span>⬅</span><span class="label">Back to Hall</span></span></span>'>> <<goto "Hall">> <</link>> </div> </div> </div> </div></div>
:: Bathroom <div id="main-content"> <div id="main-text"> <h2>Bathroom</h2> <img src="img/build/rooms/bathroom.png" class="story-image"> <<nobr>> <!-- WHO IS IN THE ROOM --> <<set _here = []>> <<if $characterLocations.daughter == "Bathroom">><<set _here.push("👧")>><</if>> <<if $characterLocations.father == "Bathroom">><<set _here.push("👨")>><</if>> <<if $characterLocations.mother == "Bathroom">><<set _here.push("👩")>><</if>> <<if _here.length == 0>> <span class="empty">Empty</span> <<else>> <span class="occupied">Present: <<print _here.join(" ")>></span> <div class="warning">⚠️ Bathroom is a risky place! Detection chance +20%</div> <</if>> <</nobr>> <!-- INTERACTIONS IN THE BATHROOM --> <<if $controlledCharacter == "daughter">> <!-- FATHER in the bathroom --> <<if $characterLocations.father == "Bathroom">> <<nobr>><h3>👨 Father in the bathroom:</h3><</nobr>> <<nobr>><<link "🚿 Interact with father">> <<goto "DaughterFatherBathroomChoice">> <</link>><</nobr>> <</if>> <!-- MOTHER in the bathroom --> <<if $characterLocations.mother == "Bathroom">> <<nobr>><h3>👩 Mother in the bathroom:</h3><</nobr>> <<nobr>><<link "🛁 Interact with mother">> <<goto "DaughterMotherBathroomChoice">> <</link>><</nobr>> <</if>> <<elseif $controlledCharacter>> <<nobr>> <div class="notice"> Controlled: <<if $chars[$controlledCharacter]>><<print $chars[$controlledCharacter].name>><<else>><<print $controlledCharacter>><</if>> <br>Interactions require controlling the daughter. </div> <</nobr>> <<else>> <<nobr>><div class="notice">Take control of a character from the sidebar.</div><</nobr>> <</if>> <<nobr>> <div class="return-link"> [[← Return to Hall->Hall]] </div> <</nobr>> </div> </div>
<<set $hasDaughter = false>> <<set $hasFather = false>> <<set $hasMother = false>> <<set $controlledCharacter = null>> <<set $energy = 3>> <<set $maxEnergy = 10>> <<set $day = 1>> <<set $time = 1>> <<set $timeNames = ["", "Morning", "Day", "Evening", "Night"]>> <<set $dayNames = ["", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]>> <<set $weekDay = 1>> <<set $choiceMadeFath = false>> <<set $choiceMadeMom = false>> <<set $choiceMadeDaughter = false>> <<set $chars = { father: { name: "Father", corruption: 0, relations: { daughter: 0, mother: 0 } }, mother: { name: "Mother", corruption: 0, relations: { daughter: 0, father: 0 } }, daughter: { name: "Daughter", corruption: 0, relations: { father: 0, mother: 0 } } }>> <<set $characterLocations = { daughter: "DaughterRoom", father: "ParentsRoom", mother: "Kitchen" }>> <<set $rooms = { Hall: "Hall", DaughterRoom: "Daughter's Room", ParentsRoom: "Parents' Bedroom", Kitchen: "Kitchen", Bathroom: "Bathroom", FathersStudy: "Father's Study", Attic: "Attic", Garage: "Garage", Basement: "Basement", LivingRoom: "Living Room", FindCharacter:"FindCharacter" }>> <<set $unlockedRooms = { Hall: true, DaughterRoom: true, ParentsRoom: true, Kitchen: true, Bathroom: true, FathersStudy: true, Attic: true, Garage: false, Basement: false, LivingRoom: false, FindCharacter:true }>> <<set $money = 100>> <<set $schedules = { daughter: { weekday: {1: "DaughterRoom", 2: "Kitchen", 3: "Bathroom", 4: "ParentsRoom"}, weekend: {1: "DaughterRoom", 2: "LivingRoom", 3: "Bathroom", 4: "DaughterRoom"} }, father: { weekday: {1: "ParentsRoom", 2: "FathersStudy", 3: "FathersStudy", 4: "Bathroom"}, weekend: {1: "ParentsRoom", 2: "LivingRoom", 3: "Bathroom", 4: "ParentsRoom"} }, mother: { weekday: {1: "Bathroom", 2: "Kitchen", 3: "Kitchen", 4: "ParentsRoom"}, weekend: {1: "Bathroom", 2: "LivingRoom", 3: "Kitchen", 4: "ParentsRoom"} } }>> <<set $roomPrices = { LivingRoom: 900, Garage: 1100, Basement: 1500 }>> <<widget "TEST_WIDGET">> TEST OK <</widget>>
:: ParentsRoom <div id="main-content"> <div id="main-text"> <h2>Parents' Bedroom</h2> <img src="img/build/rooms/parentsbed.png" class="story-image"> <<nobr>> <!-- WHO'S IN THE ROOM --> <<set _here = []>> <<if $characterLocations.daughter == "ParentsRoom">><<set _here.push("👧")>><</if>> <<if $characterLocations.father == "ParentsRoom">><<set _here.push("👨")>><</if>> <<if $characterLocations.mother == "ParentsRoom">><<set _here.push("👩")>><</if>> <<if _here.length == 0>> <span class="empty">Empty</span> <<else>> <span class="occupied">Are located: <<print _here.join(" ")>></span> <</if>> <</nobr>> <!-- INTERACTIONS --> <<if $controlledCharacter == "daughter">> <!-- FATHER --> <<if $characterLocations.father == "ParentsRoom">> <<nobr>><h3>👨 Father:</h3><</nobr>> <!-- Level 1 --> <<nobr>><<link "💋Seduce (1⚡)">> <<if window.canSpendEnergy(1)>> <<run window.spendEnergy(1)>> <<set $chars.father.relations.daughter += 5>> <<set $chars.daughter.corruption += 3>> <<run updateAllUI()>> <<goto "FatherBedRoomScene1">> <<else>> <span class="no-energy">Not enough power</span> <</if>> <</link>><</nobr>> <!-- Level 2 --> <<if $chars.daughter.corruption >= 10 && $chars.father.relations.daughter >= 15>> <<nobr>><<link "Intense Seduction (2⚡)">> <<if window.canSpendEnergy(1)>> <<run window.spendEnergy(1)>> <<goto "FatherBedRoomScene2">> <<else>> <span class="no-energy">Not enough power</span> <</if>> <</link>><</nobr>> <<else>> <<nobr>><div class="locked">🔒 Required: corruption ≥ 10, relationship ≥ 15</div><</nobr>> <</if>> <!-- Level 3 --> <<if $chars.daughter.corruption >= 20 && $chars.father.relations.daughter >= 25>> <<nobr>><<link "💞 Intimate interaction (3⚡)">> <<if window.canSpendEnergy(1)>> <<run window.spendEnergy(1)>> <<goto "FatherBedRoomScene3">> <<else>> <span class="no-energy">Not enough power</span> <</if>> <</link>><</nobr>> <<elseif $chars.daughter.corruption >= 10>> <<nobr>><div class="locked">🔒 Required: corruption ≥ 20, relationships ≥ 25</div><</nobr>> <</if>> <</if>> <!-- MOTHER --> <<if $characterLocations.mother == "ParentsRoom">> <<nobr>><h3>👩 Mother:</h3><</nobr>> <!-- Level 1 --> <<nobr>><<link "Seduce (1)">> <<if window.canSpendEnergy(1)>> <<run window.spendEnergy(1)>> <<set $chars.mother.relations.daughter += 5>> <<set $chars.daughter.corruption += 2>> <<run updateAllUI()>> <<goto "MotherBedRoomScene1">> <<else>> <span class="no-energy">Not enough power</span> <</if>> <</link>><</nobr>> <!-- Level 2 --> <<if $chars.daughter.corruption >= 8 && $chars.mother.relations.daughter >= 12>> <<nobr>><<link "💝 Close conversation (2⚡)">> <<if window.canSpendEnergy(2)>> <<run window.spendEnergy(2)>> <<goto "MotherBedRoomScene2">> <<else>> <span class="no-energy">Not enough power</span> <</if>> <</link>><</nobr>> <<else>> <<nobr>><div class="locked">🔒 Required: corruption ≥ 8, relationship ≥ 12</div><</nobr>> <</if>> <!-- Level 3 --> <<if $chars.daughter.corruption >= 15 && $chars.mother.relations.daughter >= 20>> <<nobr>><<link "🌹 Intimate interaction (3⚡)">> <<if window.canSpendEnergy(3)>> <<run window.spendEnergy(3)>> <<goto "MotherBedRoomScene3">> <<else>> <span class="no-energy">Not enough power</span> <</if>> <</link>><</nobr>> <<elseif $chars.daughter.corruption >= 8>> <<nobr>><div class="locked">🔒 Required: corruption ≥ 15, relationships ≥ 20</div><</nobr>> <</if>> <</if>> <<elseif $controlledCharacter == "father">> <!-- FATHER can interact with MOTHER --> <<if $characterLocations.mother == "ParentsRoom">> <<nobr>><h3>👩 Mother:</h3><</nobr>> <<nobr>><<link "💬Talk to my wife (1⚡)">> <<if window.canSpendEnergy(1)>> <<run window.spendEnergy(1)>> <<goto "FatherToMotherBedroomScene1">> <<else>> <span class="no-energy">Not enough power</span> <</if>> <</link>><</nobr>> <</if>> <<elseif $controlledCharacter == "mother">> <!-- MOTHER can interact with DAUGHTER --> <<if $characterLocations.daughter == "ParentsRoom">> <<nobr>><h3>👧 Daughter:</h3><</nobr>> <<nobr>><<link "💬Talk to my daughter (1⚡)">> <<if window.canSpendEnergy(1)>> <<run window.spendEnergy(1)>> <<goto "MotherToDaughterBedroomScene1">> <<else>> <span class="no-energy">Not enough power</span> <</if>> <</link>><</nobr>> <</if>> <<elseif $controlledCharacter>> <<nobr>> <div class="notice"> Controlled by: <<if $chars[$controlledCharacter]>><<print $chars[$controlledCharacter].name>><<else>><<print $controlledCharacter>><</if>> <br>Interactions require control over a suitable character. </div> <</nobr>> <<else>> <<nobr>><div class="notice">Take control of your character in the sidebar.</div><</nobr>> <</if>> <<nobr>> <div class="return-link"> [[← Return to the hall->Hall]] </div> <</nobr>> </div> </div>
<div id="main-content"> <div id="main-text"> <h2>Father and daughter</h2> <div style="transform: scale(0.5); transform-origin: top left;"> [img[String.format('img/daughter/seduce/tease' + random(1, 2) + '.gif')]] </div> <<if $controlledCharacter == "daughter">> <<set _daughterCorruption = $chars.daughter.corruption>> <<set _fatherToDaughter = $chars.father.relations.daughter>> <p>The daughter approaches the father. He looks at her with interest.</p> <<if $energy > 0>> <<if not $choiceMadeFath>> <div class="player-choice"> <div class="choice-title">What should I do?</div> <<link "Try to seduce">> <<set $choiceMadeFath = "seduce">> <<goto "FatherBedRoomScene1">> <</link>> <<link "Just to talk">> <<set $choiceMadeFath = "talk">> <<goto "FatherBedRoomScene1">> <</link>> <<link "Leave">> <<set $choiceMadeFath = "leave">> <<goto "UncurentFath">> <</link>> </div> <<else>> <<if $choiceMadeFath == "seduce">> <<set _energyOk = spendEnergy(1)>> <<if not _energyOk>> <p>The energy is gone — you lose control and go back to the lobby.</p> <<goto "Hall">> <</if>> <<if _daughterCorruption >= 5 and _fatherToDaughter >= 10>> <div class="success-result"> <p>Father doesn't understand what's going on, but he doesn't do anything</p> <img src="img/daughter/seduce/tease4.gif" width="400"> <<set $chars.daughter.corruption += 3>> <<set $chars.father.relations.daughter += 5>> <<set $chars.father.corruption += 2>> </div> <<elseif _daughterCorruption >= 3 and _fatherToDaughter >= 5>> <div class="partial-result"> <p>The father hesitates, but allows him to continue.</p> <<set $chars.daughter.corruption += 1>> <<set $chars.father.relations.daughter += 2>> </div> <<else>> <div class="fail-result"> <p>The father pulls away: "Not now, daughter!"</p> <<set $chars.father.relations.daughter -= 1>> </div> <</if>> <<elseif $choiceMadeFath == "talk">> <div class="neutral-result"> <p>Daughter makes small talk. The father smiles.</p> <img src="img/daughter/seduce/talk1.gif" width="400"> <<set $chars.father.relations.daughter += 1>> </div> <<elseif $choiceMadeFath == "leave">> <div class="neutral-result"> <p>You decide not to take any chances and leave.</p> </div> <</if>> <div class="continue-button"> <<link "Continue">> <<set $choiceMadeFath = false>> <<run window.nextTime()>> <!-- Обновляем UI ПОСЛЕ смены времени --> <<script>> setTimeout(function() { window.updateAllUI(); }, 10); <</script>> <<goto "Hall">> <</link>> </div> <</if>> <<else>> <p>You don't have the energy.</p> [[Return to the hall->Hall]] <</if>> <<else>> <p>You don't control your daughter!</p> [[Return to the lobby->Hall]] <</if>> </div> </div>
:: MotherBedRoomScene1 <div id="main-content"> <div id="main-text"> <h2>Daughter and mother</h2> <<if $controlledCharacter == "daughter">> <<set _daughterCorruption = $chars.daughter.corruption>> <<set _motherToDaughter = $chars.mother.relations.daughter>> <p>The daughter approaches the mother. She smiles.</p> <<if not $choiceMadeMom>> <div class="player-choice"> <div class="choice-title">What should I do with my mother?</div> <<link to "Hug">> <<set $choiceMadeMom = "hug">> <<goto "MotherBedRoomScene1">> <</link>> <<link "Ask for advice">> <<set $choiceMadeMom = "advice">> <<goto "MotherBedRoomScene1">> <</link>> <<link "Check borders">> <<set $choiceMadeMom = "test">> <<goto "MotherBedRoomScene1">> <</link>> <<link "Leave">> <<set $choiceMadeMom = "leave">> <<goto "UncurentMom">> <</link>> </div> <<else>> <<set _energyOk = spendEnergy(1)>> <<if not _energyOk>> <p>The energy is gone!</p> <<goto "Hall">> <</if>> <<if $choiceMadeMom == "hug">> <div class="success-result"> <p>The mother happily hugs her daughter back.</p> <<set $chars.mother.relations.daughter += 4>> </div> <<elseif $choiceMadeMom == "advice">> <div class="success-result"> <p>A mother gives maternal advice. Talking brings you closer together.</p> <<set $chars.mother.relations.daughter += 3>> </div> <<elseif $choiceMadeMom == "test">> <<if _daughterCorruption >= 5>> <div class="success-result"> <p>Daughter "accidentally" touches mother intimately. She reacts ambiguously...</p> <<set $chars.mother.relations.daughter += 5>> <<set $chars.daughter.corruption += 3>> <<set $chars.mother.corruption += 1>> </div> <<else>> <div class="fail-result"> <p>The mother pulls away: "What are you doing, darling?" <<set $chars.mother.relations.daughter -= 2>> </div> <</if>> <<elseif $choiceMadeMom == "leave">> <p>You decide not to take any chances.</p> <</if>> <div class="continue-button"> <<link "Continue">> <<set $choiceMadeMom = false>> <<run window.nextTime()>> <<script>> setTimeout(function() { window.updateAllUI(); }, 10); <</script>> <<goto "Hall">> <</link>> </div> <</if>> <<else>> <p>You don't control your daughter!</p> [[Return->ParentsRoom]] <</if>> </div> </div>
<div id="main-content"> <div id="main-text"> <h2>Attic</h2> <p>This is a resting place. Here you can restore your energy.</p> <<if $energy <= 10>> <<link "Rest">> <<set $energy = 10>> <!-- or any value you prefer --> <<set $controlledCharacter = null>> <<set $hasDaughter = false>> <<set $hasFather = false>> <<set $hasMother = false>> <<run updateAllUI()>> <<run window.nextTime()>> <<goto "Attic">> <</link>> [[Return to Hall->Hall]] <<else>> <p>You already have enough energy. You can move on.</p> [[Return to Hall->Hall]] <</if>> </div> </div>
[[Hall]] <<print Macro.has("RoomStart")>> <<print " | ">> <<print Macro.has("CardStart")>> <<print " | ">> <<print Macro.has("ActionStart")>> <<link "🔨 Построить гараж (500$)">> <<if $money >= 500>> <<set $money -= 500>> <<set $roomsUnlocked.Garage = true>> <<run window.showNotification("Гараж построен! Отец теперь может там работать.")>> <<goto "Hall">> <<else>> <span class="no-money">Недостаточно денег!</span> <</if>> <</link>> <div style="transform: scale(0.5); transform-origin: top left;"> [img[String.format('img/daughter/fathercabinet/sex' + random(1, 2) + '.gif')]] </div> <img src="img/daughter/bathroom/mast.gif" width="400"> <img src="img/daughter/bathroom/bj.gif" width="400"> <div style="transform: scale(0.5); transform-origin: top left;"> [img[String.format('img/daughter/bathroom/sex' + random(1, 2) + '.gif')]] </div> <div style="transform: scale(0.5); transform-origin: top left;"> [img[String.format('img/daughter/seduce/tease' + random(1, 2) + '.gif')]] </div> <<set _rand = random(1, 2)>> <img src="img/daughter/seduce/tease<<print _rand>>.gif" width="400"> [img[String.format('img/daughter/seduce/tease5.gif')]] [img['img/daughter/seduce/tease5.gif']] <img src="img/daughter/seduce/tease5.gif"> <img src="img/daughter/seduce/tease5.gif" alt="Гифка"> <img src="img/daughter/seduce/tease5.gif"> [img[String.format('img/daughter/seduce/tease5.gif') width="400"]] [img[String.format('img/daughter/seduce/tease5.gif') height="300"]] [img[String.format('img/daughter/seduce/tease5.gif') width="400" height="auto"]] [img[String.format('img/daughter/seduce/tease5.gif') style="width: 400px; height: auto;"]] [img[String.format('img/daughter/seduce/tease5.gif') style="max-width: 400px; height: auto;"]] <img src="img/daughter/seduce/tease5.gif" width="400"> <img src="img/daughter/seduce/tease5.gif" height="300"> <img src="img/daughter/seduce/tease5.gif" width="400" height="auto"> <img src="img/daughter/seduce/tease5.gif" style="width: 400px; height: auto;"> <img src="img/daughter/seduce/tease5.gif" style="max-width: 400px; height: auto;"> <img src="img/daughter/seduce/tease5.gif" style="width: 50%; height: auto;"> <img src="img/daughter/seduce/tease5.gif" style="width: 400px; height: 300px; object-fit: cover;"> <div style="width: 400px; height: auto;"> <img src="img/daughter/seduce/tease5.gif" style="width: 100%; height: auto;"> </div>
:: FatherBedRoomScene2 <<if $chars.daughter.corruption < 10 || $chars.father.relations.daughter < 15>> <p>You don't have enough corruption or a relationship with your father!</p> [[Return->ParentsRoom]] <<else>> <div id="main-content"> <div id="main-text"> <h2>Advanced interaction</h2> <p>With increased corruption and improved relationships, you decide to take a bolder step...</p> <<if not $fatherScene2Choice>> <<link "💋 Show underwear">> <<set $fatherScene2Choice = "kiss">> <<goto "FatherBedRoomScene2">> <</link>> <<link "👋 "accidentally show the body"">> <<set $fatherScene2Choice = "touch">> <<goto "FatherBedRoomScene2">> <</link>> <<link "💬 Say something ambiguous">> <<set $fatherScene2Choice = "hint">> <<goto "FatherBedRoomScene2">> <</link>> <<else>> <<if window.canSpendEnergy(2)>> <<run window.spendEnergy(2)>> <<if $fatherScene2Choice == "kiss">> <p>The father froze and stared intently...</p> <img src="img/daughter/seduce/tease5.gif" width="400"> <<set $chars.father.relations.daughter += 8>> <<set $chars.daughter.corruption += 4>> <<set $chars.father.corruption += 2>> <<elseif $fatherScene2Choice == "touch">> <p> He looks at you differently...</p> <<nobr>> <video autoplay loop muted playsinline class="story-image" width="600" height="600"> <source src="img/daughter/seduce/tease4.webm" type="video/webm"> </video> <</nobr>> <<set $chars.father.relations.daughter += 6>> <<set $chars.daughter.corruption += 3>> <<set $chars.father.corruption += 1>> <<else>> <p>Your ambiguous comment makes my father have mixed feelings...</p> <<set $chars.father.relations.daughter += 5>> <<set $chars.daughter.corruption += 2>> <</if>> <<link "Continue">> <<set $fatherScene2Choice = false>> <<run window.nextTime()>> <<goto "Hall">> <</link>> <<else>> <p>Not enough energy!</p> [[Return to the hall->Hall]] <</if>> <</if>> </div> </div> <</if>>
:: FatherBedRoomScene3 <<if $chars.daughter.corruption < 20 || $chars.father.relations.daughter < 25>> <p>More corruption and an improved relationship with the father are needed!</p> [[Return->ParentsRoom]] <<else>> <div id="main-content"> <div id="main-text"> <h2>Intimate interaction</h2> <p> Having reached a high level of corruption and having established a deep connection with your father, you are ready for the boldest step...</p> <<if not $fatherScene3Choice>> <<link "💞 Offer to "relieve his stress"">> <<set $fatherScene3Choice = "intimate">> <<goto "FatherBedRoomScene3">> <</link>> <<link "🔥 Offer to be alone">> <<set $fatherScene3Choice = "alone">> <<goto "FatherBedRoomScene3">> <</link>> <<link "⚠️ Retreat (too risky)">> <<set $fatherScene3Choice = "retreat">> <<goto "FatherBedRoomScene3">> <</link>> <<else>> <<if window.canSpendEnergy(1)>> <<run window.spendEnergy(1)>> <<if $fatherScene3Choice == "intimate">> <p>You're overstepping the mark... The father, though resisting at first, eventually succumbs.</p> <div style="transform: scale(0.75); transform-origin: top left;"> [img[String.format('img/daughter/bljob/bl' + random(1, 2) + '.gif')]] </div> <<set $chars.father.relations.daughter += 15>> <<set $chars.daughter.corruption += 8>> <<set $chars.father.corruption += 5>> <<elseif $fatherScene3Choice == "alone">> <p>You're offering to be alone. The father agrees, and something special happens between you...</p> [img[String.format('img/daughter/sex/dsex1.gif')]] <img src="img/daughter/sex/dsex1.gif" width="600"> <<set $chars.father.relations.daughter += 12>> <<set $chars.daughter.corruption += 6>> <<set $chars.father.corruption += 3>> <<else>> <p>You decide it's too early. The father looks relieved.</p> <<set $chars.father.relations.daughter += 2>> <</if>> <<link "Continue">> <<set $fatherScene3Choice = false>> <<run window.nextTime()>> <<goto "Hall">> <</link>> <<else>> <p>Not enough energy!</p> [[Return to the hall->Hall]] <</if>> <</if>> </div> </div> <</if>>
<div id="main-content"> <div id="main-text"> <h2>Random Encounter 1</h2> <!-- Random encounter 1 --> <p>While you were in the hall, something unexpected happened...</p> <!-- While you were in the lobby, something unexpected happened... <!-- Example: father and mother encounter --> <<if $characterLocations.father == "Hall" && $characterLocations.mother == "Hall">> <p>You see the father and mother talking about something. They seem worried.</p> <!-- You see your father and mother discussing something. They seem worried. --> <p>Perhaps they suspect something...</p> <!-- Perhaps they suspect something... --> <<set $chars.father.relations.mother += random(1, 3)>> <<set $chars.mother.relations.father += random(1, 3)>> <</if>> <<link "Continue">> <!-- Continue --> <<goto "Hall">> <</link>> </div> </div>
<div id="main-content"> <div id="main-text"> <h2>Random Encounter 1</h2> <!-- Random encounter 1 --> <p>While you were in the hall, something unexpected happened...</p> <!-- While you were in the lobby, something unexpected happened... <!-- Example: father and mother encounter --> <<if $characterLocations.father == "Hall" && $characterLocations.mother == "Hall">> <p>You see the father and mother talking about something. They seem worried.</p> <!-- You see your father and mother discussing something. They seem worried. --> <p>Perhaps they suspect something...</p> <!-- Perhaps they suspect something... --> <<set $chars.father.relations.mother += random(1, 3)>> <<set $chars.mother.relations.father += random(1, 3)>> <</if>> <<link "Continue">> <!-- Continue --> <<goto "Hall">> <</link>> </div> </div>
<div id="main-content"> <div id="main-text"> <h2>Random Encounter 1</h2> <!-- Random encounter 1 --> <p>While you were in the hall, something unexpected happened...</p> <!-- While you were in the lobby, something unexpected happened... <!-- Example: father and mother encounter --> <<if $characterLocations.father == "Hall" && $characterLocations.mother == "Hall">> <p>You see the father and mother talking about something. They seem worried.</p> <!-- You see your father and mother discussing something. They seem worried. --> <p>Perhaps they suspect something...</p> <!-- Perhaps they suspect something... --> <<set $chars.father.relations.mother += random(1, 3)>> <<set $chars.mother.relations.father += random(1, 3)>> <</if>> <<link "Continue">> <!-- Continue --> <<goto "Hall">> <</link>> </div> </div>
:: MotherBedRoomScene2 <<if $chars.daughter.corruption < 8 || $chars.mother.relations.daughter < 12>> <p>You don't have enough corruption or a relationship with your mother!</p> [[Return->ParentsRoom]] <<else>> <div id="main-content"> <div id="main-text"> <h2>Close conversation with mother</h2> <<if $controlledCharacter == "daughter">> <<set _energyOk = spendEnergy(2)>> <<if not _energyOk>> <p>Not enough energy!</p> [[Return to the hall->Hall]] <<else>> <p>Now that the relationship has become closer, you decide to have a more open conversation.</p> <<if not $motherScene2Choice>> <div class="player-choice"> <div class="choice-title">Topic of conversation:</div> <<link "Discuss relationship with father">> <<set $motherScene2Choice = "father">> <<goto "MotherBedRoomScene2">> <</link>> <<link "Talk about growing up">> <<set $motherScene2Choice = "growing">> <<goto "MotherBedRoomScene2">> <</link>> <<link "Touch mother's cheek">> <<set $motherScene2Choice = "touch">> <<goto "MotherBedRoomScene2">> <</link>> </div> <<else>> <<if $motherScene2Choice == "father">> <p>You start talking about your father. The mother looks thoughtful.</p> <<set $chars.mother.relations.daughter += 7>> <<set $chars.daughter.corruption += 2>> <<elseif $motherScene2Choice == "growing">> <p>Talking about growing up makes a mother nostalgic.</p> <<set $chars.mother.relations.daughter += 6>> <<elseif $motherScene2Choice == "touch">> <p>Your touch silences the mother for a moment.</p> <<set $chars.mother.relations.daughter += 8>> <<set $chars.daughter.corruption += 4>> <<set $chars.mother.corruption += 2>> <</if>> <<link "Continue">> <<set $motherScene2Choice = false>> <<run window.nextTime()>> <<goto "Hall">> <</link>> <</if>> <</if>> <<else>> <p>You don't control your daughter!</p> [[Return->ParentsRoom]] <</if>> </div> </div> <</if>>
:: MotherToDaughterKitchenScene1 <div id="main-content"> <div id="main-text"> <h2>Kitchen: Mother and Daughter</h2> <!-- Kitchen: Mother and Daughter --> <<if $controlledCharacter == "mother">> <<set _energyOk = spendEnergy(1)>> <<if not _energyOk>> <p>Not enough energy!</p> <!-- Not enough energy! --> [[Return to Hall->Hall]] <!-- Return to the lobby --> <<else>> <p>You start a conversation with your daughter in the kitchen.</p> <!-- You start a conversation with your daughter in the kitchen. --> <<if not $sceneChoice>> <div class="player-choice"> <<link "💬 Ask about her day">> <!-- 💬 Ask about her affairs --> <<set $sceneChoice = "ask">> <<goto "MotherToDaughterKitchenScene1">> <</link>> <<link "🍎 Offer some fruit">> <!-- 🍎 Offer fruit --> <<set $sceneChoice = "fruit">> <<goto "MotherToDaughterKitchenScene1">> <</link>> <<link "🤗 Hug">> <!-- 🤗 Hug --> <<set $sceneChoice = "hug">> <<goto "MotherToDaughterKitchenScene1">> <</link>> </div> <<else>> <<if $sceneChoice == "ask">> <p>Your daughter talks about her day. You listen attentively.</p> <!-- The daughter talks about her affairs. You're listening carefully. --> <<set $chars.daughter.relations.mother += 4>> <<elseif $sceneChoice == "fruit">> <p>You offer your daughter an apple. She gratefully takes it.</p> <!-- You offer your daughter an apple. She takes it gratefully. --> <<set $chars.daughter.relations.mother += 3>> <<elseif $sceneChoice == "hug">> <<if $chars.mother.corruption >= 3>> <p>Your hug lasts a little longer than usual...</p> <!-- Your hugs last a little longer than usual... --> <<set $chars.daughter.relations.mother += 5>> <<set $chars.daughter.corruption += 1>> <<set $chars.mother.corruption += 1>> <<else>> <p>You hug your daughter. She smiles.</p> <!-- You're hugging your daughter. She smiles. --> <<set $chars.daughter.relations.mother += 4>> <</if>> <</if>> <div class="continue-button"> <<link "Continue">> <!-- Continue --> <<set $sceneChoice = false>> <<run window.nextTime()>> <<goto "Hall">> <</link>> </div> <</if>> <</if>> <<else>> <p>Only the mother can interact with the daughter!</p> <!-- Only a mother can interact with her daughter! --> [[Go Back->Kitchen]] <!-- Go back --> <</if>> </div> </div>
::DaughtertoMotherKitchenScene2 <<if $chars.daughter.corruption < 8 || $chars.mother.relations.daughter < 12>> <p>You don’t have enough corruption or relationship points with your mother!</p> <!-- You don't have enough corruption or a relationship with your mother! --> [[Go Back->Kitchen]] <!-- Go back --> <<else>> <div id="main-content"> <div id="main-text"> <h2>Kitchen: A Close Conversation</h2> <!-- Kitchen: A Close Conversation --> <<if $controlledCharacter == "daughter">> <<set _energyOk = spendEnergy(2)>> <<if not _energyOk>> <p>Not enough energy!</p> <!-- Not enough energy! --> [[Return to Hall->Hall]] <!-- Return to the lobby --> <<else>> <p>You decide to take advantage of the moment while your mother is preparing dinner.</p> <!-- You decide to take advantage of the moment when your mother is preparing dinner. --> <<if not $sceneChoice>> <div class="player-choice"> <div class="choice-title">How do you approach your mother?</div> <!-- How do I approach my mother? --> <<link "🤗 Hug from behind">> <!-- 🤗 Hug from behind --> <<set $sceneChoice = "hug">> <<goto "DaughtertoMotherKitchenScene2">> <</link>> <<link "💬 Ask about her youth">> <!-- 💬 Ask about her youth --> <<set $sceneChoice = "past">> <<goto "DaughtertoMotherKitchenScene2">> <</link>> <<link "👋 Stroke her back">> <!-- 👋 Run your hand over her back --> <<set $sceneChoice = "touch">> <<goto "DaughtertoMotherKitchenScene2">> <</link>> </div> <<else>> <<if $sceneChoice == "hug">> <<if window.checkDetection("daughter", "mother", "Kitchen")>> <div class="detected"> <p>Your mother flinches: "What are you doing?!"</p> <!-- The mother shudders: "What are you doing?!" --> <p>She looks embarrassed and steps back.</p> <!-- She looks confused and pulls away. --> </div> <<else>> <div class="success"> <p>Your mother relaxes in your embrace.</p> <!-- The mother relaxes in your arms. --> <p>"You’ve become so affectionate..." she whispers.</p> <!--"How affectionate you've become..." she whispers. --> <<set $chars.mother.relations.daughter += 8>> <<set $chars.daughter.corruption += 3>> <<set $chars.mother.corruption += 2>> </div> <</if>> <<elseif $sceneChoice == "past">> <div class="success"> <p>Your mother thoughtfully talks about her youth.</p> <!-- Mother talks thoughtfully about her youth. --> <p>You notice her blushing as she remembers something...</p> <!-- Do you notice how she blushes, remembering something... --> <<set $chars.mother.relations.daughter += 6>> <<set $chars.daughter.corruption += 2>> </div> <<elseif $sceneChoice == "touch">> <<if window.checkDetection("daughter", "mother", "Kitchen")>> <div class="detected"> <p>Your mother quickly turns around!</p> <!-- The mother turns around sharply! --> <p>"Don’t touch me like that! That's inappropriate!"</p> <!-- "Don't touch me like that! It's indecent!" --> </div> <<else>> <div class="success"> <p>Your touch makes your mother catch her breath.</p> <!-- Your touch makes the mother hold her breath. --> <p>She doesn't pull away, only quietly says: "Sweetie..."</p> <!-- She doesn't pull away, just speaks softly: "My daughter..." --> <<set $chars.mother.relations.daughter += 10>> <<set $chars.daughter.corruption += 5>> <<set $chars.mother.corruption += 3>> </div> <</if>> <</if>> <div class="continue-button"> <<link "Continue">> <!-- Continue --> <<set $sceneChoice = false>> <<run window.nextTime()>> <<script>> setTimeout(function() { window.updateAllUI(); }, 10); <</script>> <<goto "Hall">> <</link>> </div> <</if>> <</if>> <<else>> <p>You are not controlling the daughter!</p> <!-- You don't control your daughter! --> [[Go Back->Kitchen]] <!-- Go back --> <</if>> </div> </div> <</if>>
:: FatherToMotherScene1 <div id="main-content"> <div id="main-text"> <h2>Father and mother</h2> <<if $controlledCharacter == "father">> <<if $characterLocations.mother == $characterLocations.father>> <p>You are in the same room with your mother.</p> <<if not $fatherToMotherChoice>> <div class="player-choice"> <div class="choice-title">How to interact with your wife?</div> <<link "💬 Discuss daughter">> <<set $fatherToMotherChoice = "talkDaughter">> <<goto "FatherToMotherBedroomScene1">> <</link>> <<link "💋 Try to kiss">> <<set $fatherToMotherChoice = "kiss">> <<goto "FatherToMotherBedroomScene1">> <</link>> <<link "🫂 Hug">> <<set $fatherToMotherChoice = "hug">> <<goto "FatherToMotherBedroomScene1">> <</link>> </div> <<else>> <<set _energyOk = spendEnergy(1)>> <<if not _energyOk>> <p>Not enough energy!</p> <<goto "Hall">> <<else>> <<if $fatherToMotherChoice == "talkDaughter">> <p>You start talking about your daughter.</p> <<if $chars.father.corruption >= 5>> <p>"You've noticed how she's become... attractive?" - You're talking.</p> <<set $chars.mother.relations.father += 5>> <<set $chars.father.corruption += 2>> <<else>> <p>"Our daughter is growing up to be such a good girl," you say.</p> <<set $chars.mother.relations.father += 3>> <</if>> <<elseif $fatherToMotherChoice == "kiss">> <<if $chars.father.corruption >= 3>> <<if window.checkDetection("father", "mother", $characterLocations.father)>> <div class="detected"> <p>The daughter comes into the room just at that moment!</p> <p>The mother shyly pulls away.</p> <<set $chars.mother.relations.father -= 5>> <<set $chars.daughter.corruption += 3>> <!-"I saw it! --> </div> <<else>> <div class="success"> <p>The mother responds to your kiss.</p> <<set $chars.mother.relations.father += 8>> <<set $chars.father.corruption += 3>> </div> <</if>> <<else>> <p>You don't have the guts.</p> <<set $chars.father.corruption += 1>> <!-- Gets bolder --> <</if>> <<elseif $fatherToMotherChoice == "hug">> <p>You hug your wife.</p> <<set $chars.mother.relations.father += 4>> <</if>> <div class="continue-button"> <<link "Continue">> <<set $fatherToMotherChoice = false>> <<run window.nextTime()>> <<goto "Hall">> <</link>> </div> <</if>> <</if>> <<else>> <p>Mother is not in this room.</p> [[Return to the hall->Hall]] <</if>> <<else>> <p>Only the father can interact with the mother!</p> [[Back->ParentsRoom]] <</if>> </div> </div>
:: MotherToDaughterBedroomScene1 <div id="main-content"> <div id="main-text"> <h2>Mother and daughter in the bedroom</h2> <<if $controlledCharacter == "mother">> <<if $characterLocations.daughter == "ParentsRoom">> <p>You are in the bedroom with your daughter.</p> <<if not $sceneChoice>> <div class="player-choice"> <div class="choice-title">How to interact with your daughter?</div> <<link "💬 Give maternal advice">> <<set $sceneChoice = "advice">> <<goto "MotherToDaughterBedroomScene1">> <</link>> <<link "💆♀️ Pat on the head">> <<set $sceneChoice = "pat">> <<goto "MotherToDaughterBedroomScene1">> <</link>> <<link "👚 Check her clothes">> <<set $sceneChoice = "clothes">> <<goto "MotherToDaughterBedroomScene1">> <</link>> </div> <<else>> <<set _energyOk = spendEnergy(1)>> <<if not _energyOk>> <p>Not enough energy!</p> <<goto "Hall">> <<else>> <<if $sceneChoice == "advice">> <p>You're giving your daughter advice about life.</p> <<if $chars.mother.corruption >= 3>> <p>"When I was your age... I've been experimenting," you say.</p> <<set $chars.daughter.relations.mother += 6>> <<set $chars.daughter.corruption += 2>> <<set $chars.mother.corruption += 1>> <<else>> <p>"Be a good girl and obey your parents," you say.</p> <<set $chars.daughter.relations.mother += 3>> <</if>> <<elseif $sceneChoice == "pat">> <p>You gently stroke your daughter's head.</p> <<if $chars.mother.corruption >= 5>> <p>Your hand slides down to her shoulder...</p> <<if window.checkDetection("mother", "daughter", "ParentsRoom")>> <div class="detected"> <p>The father comes into the room!</p> <p>You quickly withdraw your hand.</p> </div> <<else>> <div class="success"> <p>The daughter smiles at your touch.</p> <<set $chars.daughter.relations.mother += 8>> <<set $chars.daughter.corruption += 3>> <<set $chars.mother.corruption += 2>> </div> <</if>> <<else>> <p>The daughter smiles.</p> <<set $chars.daughter.relations.mother += 4>> <</if>> <<elseif $sceneChoice == "clothes">> <p>You check how your daughter's clothes fit.</p> <<if $chars.mother.corruption >= 8>> <p>"You've become like this... curvy," you say, straightening her blouse.</p> <<set $chars.daughter.relations.mother += 10>> <<set $chars.daughter.corruption += 5>> <<set $chars.mother.corruption += 3>> <<else>> <p>"The dress is a little short," you say.</p> <<set $chars.daughter.relations.mother += 2>> <<set $chars.daughter.corruption += 1>> <</if>> <</if>> <div class="continue-button"> <<link "Continue">> <<set $sceneChoice = false>> <<run window.nextTime()>> <<goto "Hall">> <</link>> </div> <</if>> <</if>> <<else>> <p>The daughter is not in the bedroom.</p> [[Return to the hall->Hall]] <</if>> <<else>> <p>Only a mother can interact with her daughter!</p> [[Back->ParentsRoom]] <</if>> </div> </div>
:: LivingRoom <<if not $unlockedRooms.livingRoom>> <p>The living room hasn't been built yet!</p> [[Return to Hall->Hall]] <<else>> <div id="main-content"> <div id="main-text"> <h2>Living Room</h2> <p>A new spacious room with a sofa and a TV.</p> <img src="img/build/rooms/livingroom.png" class="story-image"> <!-- WHO IS IN THE ROOM --> <<nobr>> <<set _here = []>> <<if $characterLocations.daughter == "LivingRoom">><<set _here.push("👧")>><</if>> <<if $characterLocations.father == "LivingRoom">><<set _here.push("👨")>><</if>> <<if $characterLocations.mother == "LivingRoom">><<set _here.push("👩")>><</if>> <<if _here.length == 0>> <span class="empty">Empty</span> <<else>> <span class="occupied">Present: <<print _here.join(" ")>></span> <</if>> <</nobr>> <!-- TEST BUTTON: CALL EVERYONE TO WATCH TV --> <<nobr>> <div class="test-action"> <h3>🎬 Living Room Test</h3> <<link "📢 Call everyone to watch TV (1⚡)">> <<if window.canSpendEnergy(1)>> <<run window.spendEnergy(1)>> <!-- Move everyone to the living room --> <<set $characterLocations.daughter = "LivingRoom">> <<set $characterLocations.father = "LivingRoom">> <<set $characterLocations.mother = "LivingRoom">> <<run updateAllUI()>> <<goto "FamilyTVTestScene">> <</if>> <</link>> </div> <</nobr>> <!-- INTERACTIONS FOR DAUGHTER --> <<if $controlledCharacter == "daughter">> <<if $characterLocations.father == "LivingRoom">> <<nobr>><h3>👨 Father:</h3><</nobr>> <<nobr>><<link "💬 Talk on the sofa (1⚡)">> <<if window.canSpendEnergy(1)>> <<run window.spendEnergy(1)>> <<set $chars.father.relations.daughter += 3>> <<goto "LivingRoomSofaScene1">> <</if>> <</link>><</nobr>> <</if>> <<if $characterLocations.mother == "LivingRoom">> <<nobr>><h3>👩 Mother:</h3><</nobr>> <<nobr>><<link "💬 Talk on the sofa (1⚡)">> <<if window.canSpendEnergy(1)>> <<run window.spendEnergy(1)>> <<set $chars.mother.relations.daughter += 3>> <<goto "LivingRoomSofaScene1">> <</if>> <</link>><</nobr>> <</if>> <</if>> <!-- FAMILY TV WATCHING (EVENING - time == 3, NIGHT = 4) --> <<if $time == 3>> <<if $characterLocations.father == "LivingRoom" and $characterLocations.mother == "LivingRoom">> <<nobr>> <div class="family-event"> <h3>📺 Family TV Time</h3> <<link "Join">> <<goto "FamilyTVScene1">> <</link>> </div> <</nobr>> <</if>> <</if>> [[← Return to Hall->Hall]] </div> </div> <</if>>
:: FathersStudy <div id="main-content"> <div id="main-text"> <h2>Father's office</h2> <img src="img/build/rooms/father_study.png" class="story-image"> <p> A strict office with massive wooden furniture. There are documents on the table, and hunting trophies on the wall.</p> <<nobr>> <!-- WHO'S IN THE ROOM --> <<set _here = []>> <<if $characterLocations.daughter == "FathersStudy">><<set _here.push("👧")>><</if>> <<if $characterLocations.father == "FathersStudy">><<set _here.push("👨")>><</if>> <<if $characterLocations.mother == "FathersStudy">><<set _here.push("👩")>><</if>> <<if _here.length == 0>> <span class="empty">Empty</span> <<else>> <span class="occupied">Are located: <<print _here.join(" ")>></span> <</if>> <</nobr>> <!-- INTERACTIONS FOR THE FATHER --> <<if $controlledCharacter == "father">> <<nobr>><<link "💼Work with documents (1⚡)">> <<if window.canSpendEnergy(1)>> <<run window.spendEnergy(1)>> <<run window.nextTime()>> <<set _earned = random(20, 50)>> <<set $money += _earned>> <<set $chars.father.corruption += random(0, 2)>> <<run updateAllUI()>> <p>You spend several hours working with documents.</p> <p class="money"> +<span class="money-amount"><<print _earned>></span>$ (Total: <<print $money>>$) </p> <<if random(1, 100) <= 30>> <p>We have found an opportunity for a "gray" scheme. Corruption has increased.</p> <</if>> <<goto "FathersStudy">> <<else>> <span class="no-energy">Not enough power</span> <</if>> <</link>><</nobr>> <!-- INTERACTIONS FOR THE DAUGHTER --> <<elseif $controlledCharacter == "daughter">> <<if $characterLocations.father == "FathersStudy">> <<nobr>> <div class="interaction-section"> <h3>👨 My father is in the study:</h3> <<link "🗣️ Interact with the father">> <<goto "FatherStudyInteraction">> <</link>> </div> <</nobr>> <</if>> <</if>> <<nobr>> <div class="return-link"> [[← Return to the hall->Hall]] </div> <</nobr>> </div> </div>
:: FamilyTVTestScene <div id="main-content"> <div id="main-text"> <h2>Family TV Evening</h2> <p>You called the whole family to watch TV. Everyone has gathered on the sofa.</p> <<if $controlledCharacter == "daughter">> <<set _energyOk = spendEnergy(1)>> <<if not _energyOk>> <p>Not enough energy!</p> <<goto "LivingRoom">> <<else>> <<if not $sceneChoice>> <div class="player-choice"> <div class="choice-title">What to do during the show?</div> <<link "🍿 Grab some popcorn">> <<set $sceneChoice = "popcorn">> <<goto "FamilyTVTestScene">> <</link>> <<link "🛋️ Lie on the sofa">> <<set $sceneChoice = "lay">> <<goto "FamilyTVTestScene">> <</link>> <<link "👀 Play with your foot">> <<set $sceneChoice = "foot">> <<goto "FamilyTVTestScene">> <</link>> </div> <<else>> <<if $sceneChoice == "popcorn">> <p>You take a bowl of popcorn and share it with your parents.</p> <<set $chars.father.relations.daughter += 4>> <<set $chars.mother.relations.daughter += 4>> <p><i>+4 relationship points with both parents</i></p> <<elseif $sceneChoice == "lay">> <p>You lie down on the sofa, resting your head on a pillow.</p> <<if $chars.daughter.corruption >= 5>> <p>You "accidentally" touch your father with your foot...</p> <<if window.checkDetection("daughter", "father", "LivingRoom")>> <div class="detected"> <p>Mother noticed the contact!</p> <<set $chars.mother.relations.daughter -= 3>> <<set $chars.mother.relations.father -= 2>> </div> <<else>> <<set $chars.father.relations.daughter += 6>> <<set $chars.daughter.corruption += 3>> <<set $chars.father.corruption += 1>> <</if>> <<else>> <p>The parents smile, seeing you get comfortable.</p> <<set $chars.father.relations.daughter += 3>> <<set $chars.mother.relations.daughter += 3>> <</if>> <<elseif $sceneChoice == "foot">> <<if $chars.daughter.corruption >= 8>> <p>You start playing with your foot, "accidentally" touching...</p> <<link "👨 ...your father">> <<if window.checkDetection("daughter", "father", "LivingRoom")>> <div class="detected"> <p>Mother spins around! "What are you doing?!"</p> <<set $chars.mother.relations.daughter -= 5>> <<set $chars.mother.relations.father -= 5>> </div> <<else>> <p>Father flinches but does not pull away...</p> <<set $chars.father.relations.daughter += 8>> <<set $chars.daughter.corruption += 5>> <<set $chars.father.corruption += 3>> <</if>> <<goto "FamilyTVTestSceneEnd">> <</link>> <<link "👩 ...your mother">> <<if window.checkDetection("daughter", "mother", "LivingRoom")>> <div class="detected"> <p>Father notices! "Stop that!"</p> <<set $chars.father.relations.daughter -= 5>> <<set $chars.father.relations.mother -= 3>> </div> <<else>> <p>Mother looks at you strangely...</p> <<set $chars.mother.relations.daughter += 7>> <<set $chars.daughter.corruption += 4>> <<set $chars.mother.corruption += 2>> <</if>> <<goto "FamilyTVTestSceneEnd">> <</link>> <<else>> <p>You don't have enough courage for such games.</p> <<set $chars.daughter.corruption += 1>> <<goto "FamilyTVTestSceneEnd">> <</if>> <</if>> <<if $sceneChoice != "foot">> :: FamilyTVTestSceneEnd <div class="continue-button"> <<link "🎬 Finish watching">> <<set $sceneChoice = false>> <<run window.nextTime()>> <<run updateAllUI()>> <<goto "Hall">> <</link>> </div> <</if>> <</if>> <</if>> <<else>> <p>Only the daughter can initiate family TV time!</p> [[Return to Living Room->LivingRoom]] <</if>> </div> </div>
:: DaughterToMotherKitchenScene1 <div id="main-content"> <div id="main-text"> <h2>Helping in the Kitchen</h2> <!-- Help in the kitchen --> <<if $controlledCharacter == "daughter">> <<set _energyOk = spendEnergy(1)>> <<if not _energyOk>> <p>Not enough energy!</p> <!-- Not enough energy! --> <<goto "Kitchen">> <<else>> <p>You help your mother prepare dinner.</p> <!-- You're helping your mother cook dinner. --> <<if not $sceneChoice>> <div class="player-choice"> <<link "🥦 Talk">> <!-- 🥦 Talk --> <<set $sceneChoice = "vegetables">> <<goto "DaughterToMotherKitchenScene1">> <</link>> <<link "🍲 Wash Dishes">> <!-- 🍲To wash the dishes --> <<set $sceneChoice = "soup">> <<goto "DaughterToMotherKitchenScene1">> <</link>> <<link "🍽️ Check the Food">> <!-- 🍽️ Check the food --> <<set $sceneChoice = "table">> <<goto "DaughterToMotherKitchenScene1">> <</link>> </div> <<else>> <<if $sceneChoice == "vegetables">> <p>You start a conversation. She smiles at you.</p> <!-- You start a dialogue. She's smiling at you. --> <img src="img/daughter/kitchen/talk.gif" width="400"> <<set $chars.mother.relations.daughter += 3>> <<set $chars.daughter.corruption += 1>> <<elseif $sceneChoice == "soup">> <p>Your hands occasionally touch your mother's hand while washing the dishes.</p> <!-- Your hands sometimes touch your mother's hand when you wash the dishes --> <img src="img/daughter/kitchen/wash.gif" width="400"> <<set $chars.mother.relations.daughter += 4>> <<set $chars.daughter.corruption += 2>> <<elseif $sceneChoice == "table">> <p>You check the food, and your mother watches you closely.</p> <!-- You are checking the food, the mother is watching you closely --> <img src="img/daughter/kitchen/seduce.gif" width="400"> <<set $chars.mother.relations.daughter += 3>> <<set $chars.daughter.corruption += 2>> <</if>> <div class="continue-button"> <<link "Continue">> <!-- Continue --> <<set $sceneChoice = false>> <<run window.nextTime()>> <<goto "Hall">> <</link>> </div> <</if>> <</if>> <<else>> <p>Only the daughter can help the mother in the kitchen!</p> <!-- Only a daughter can help her mother in the kitchen! --> [[Go Back->Kitchen]] <!-- Go back --> <</if>> </div> </div>
// ===== ФУНКЦИЯ ОБНОВЛЕНИЯ ВСЕГО UI ===== window.updateAllUI = function() { try { var v = State.variables; // Если State.variables не существует - выходим if (!v) { console.warn("State.variables не определен"); return; } // Устанавливаем дефолтные значения если чего-то нет v.energy = v.energy || 0; v.day = v.day || 1; v.time = v.time || 1; v.maxEnergy = v.maxEnergy || 10; if (!v.timeNames) { v.timeNames = ["", "Утро", "День", "Вечер", "Ночь"]; } if (!v.chars) { v.chars = { daughter: { name: "Дочь", corruption: 0, relations: { father: 0, mother: 0 } }, father: { name: "Отец", corruption: 0, relations: { daughter: 0, mother: 0 } }, mother: { name: "Мать", corruption: 0, relations: { daughter: 0, father: 0 } } }; } // ОБНОВЛЯЕМ ПОЗИЦИИ ПРИ СТАРТЕ if (v.characterLocations && typeof updateCharacterPositions === 'function') { updateCharacterPositions(); } // КОНТРОЛЬ ПЕРСОНАЖА if ($("#ui-controlled").length) { if (v.energy > 0 && v.controlledCharacter && v.chars && v.chars[v.controlledCharacter]) { var charName = v.chars[v.controlledCharacter].name; $("#ui-controlled").text("Контроль: " + charName) .css("color", "#4CAF50"); } else { $("#ui-controlled").text("Контроль: никто") .css("color", "#888"); } } // Энергия if ($("#ui-energy").length) { $("#ui-energy").text(v.energy); } // День и время if ($("#ui-day").length) { $("#ui-day").text(v.day); } if ($("#ui-time").length) { var timeText = "Утро"; if (v.timeNames && v.timeNames[v.time]) { timeText = v.timeNames[v.time]; } $("#ui-time").text(timeText); } // Дочь (с проверкой существования) if ($("#ui-daughter-corruption").length) { if (v.chars && v.chars.daughter) { $("#ui-daughter-corruption").text(v.chars.daughter.corruption || 0); $("#ui-daughter-father").text(v.chars.daughter.relations.father || 0); $("#ui-daughter-mother").text(v.chars.daughter.relations.mother || 0); } } // Отец (с проверкой существования) if ($("#ui-father-corruption").length) { if (v.chars && v.chars.father) { $("#ui-father-corruption").text(v.chars.father.corruption || 0); $("#ui-father-daughter").text(v.chars.father.relations.daughter || 0); $("#ui-father-mother").text(v.chars.father.relations.mother || 0); } } // Мать (с проверкой существования) if ($("#ui-mother-corruption").length) { if (v.chars && v.chars.mother) { $("#ui-mother-corruption").text(v.chars.mother.corruption || 0); $("#ui-mother-daughter").text(v.chars.mother.relations.daughter || 0); $("#ui-mother-father").text(v.chars.mother.relations.father || 0); } } // ОБНОВЛЯЕМ КНОПКИ КОНТРОЛЯ В САЙДБАРЕ if (typeof updateSidebarControls === 'function') { updateSidebarControls(); } } catch (error) { console.error("Ошибка в updateAllUI:", error); } }; // ===== Перемещение персонажей ===== window.updateCharacterPositions = function() { try { var v = State.variables; if (!v) return; // НЕ перемещаем персонажей под контролем! // Только свободных NPC // Если дочь не под контролем if (v.controlledCharacter !== "daughter") { var daughterSchedule = { 1: "DaughterRoom", 2: "Kitchen", 3: "Bathroom", 4: "ParentsRoom" }; v.characterLocations.daughter = daughterSchedule[v.time] || "DaughterRoom"; } // Если отец не под контролем if (v.controlledCharacter !== "father") { var fatherSchedule = { 1: "ParentsRoom", 2: "ParentsRoom", 3: "ParentsRoom", 4: "ParentsRoom" }; v.characterLocations.father = fatherSchedule[v.time] || "FatherRoom"; } // Если мать не под контролем if (v.controlledCharacter !== "mother") { var motherSchedule = { 1: "Kitchen", 2: "Kitchen", 3: "ParentsRoom", 4: "ParentsRoom" }; v.characterLocations.mother = motherSchedule[v.time] || "Kitchen"; } } catch (error) { console.error("Ошибка в updateCharacterPositions:", error); } }; // ===== ВЗЯТИЕ КОНТРОЛЯ ===== window.takeControl = function(character) { try { var v = State.variables; if (v.energy < 1) { console.log("Недостаточно энергии"); return false; } // Сбрасываем ВСЕ флаги контроля v.hasDaughter = false; v.hasFather = false; v.hasMother = false; // Устанавливаем нового персонажа switch(character) { case "daughter": v.hasDaughter = true; break; case "father": v.hasFather = true; break; case "mother": v.hasMother = true; break; } v.controlledCharacter = character; v.energy -= 1; // ПЕРЕМЕЩАЕМ персонажа в текущую комнату! var currentRoom = SugarCube.Engine.activePassage.name; v.characterLocations[character] = currentRoom; console.log("Взят контроль над: " + character + " в комнате: " + currentRoom); updateAllUI(); return true; } catch (error) { console.error("Ошибка в takeControl:", error); return false; } }; // ===== БЫСТРЫЙ КОНТРОЛЬ ИЗ САЙДБАРА ===== // ===== БЫСТРЫЙ КОНТРОЛЬ ИЗ САЙДБАРА ===== window.takeControlFromSidebar = function(character) { try { var v = State.variables; // 1. Проверка энергии if (v.energy < 1) { alert("Недостаточно энергии для контроля!"); return false; } // 2. Если уже контролируем этого персонажа - освобождаем if (v.controlledCharacter === character) { // Освобождаем контроль v.controlledCharacter = null; v.hasDaughter = false; v.hasFather = false; v.hasMother = false; console.log("Освобождён контроль: " + character); // ОБНОВЛЯЕМ ВСЁ window.updateAllUI(); return true; } // 3. Берём контроль var success = window.takeControl(character); // 4. НЕ ПЕРЕНОСИМСЯ в другую локацию - остаёмся здесь // Просто обновляем UI if (success) { window.updateAllUI(); // Показываем сообщение в текущей комнате var charName = v.chars[character] ? v.chars[character].name : character; var roomName = v.rooms[SugarCube.Engine.activePassage.name] || SugarCube.Engine.activePassage.name; // Добавляем сообщение прямо в интерфейс setTimeout(function() { var msg = document.createElement('div'); msg.className = 'control-notification'; msg.innerHTML = '👻 <b>Взят контроль над ' + charName + '</b> в ' + roomName; msg.style.cssText = 'background:#4CAF50;color:white;padding:10px;margin:10px 0;border-radius:5px;'; document.getElementById('main-text').prepend(msg); }, 100); } return success; } catch (error) { console.error("Ошибка в takeControlFromSidebar:", error); return false; } }; // ===== ОБНОВЛЕНИЕ КНОПОК КОНТРОЛЯ В САЙДБАРЕ ===== window.updateSidebarControls = function() { try { var v = State.variables; if (!v) return; var chars = ["daughter", "father", "mother"]; var roomNames = v.rooms || {}; chars.forEach(function(charId) { var btn = $("#btn-" + charId); var status = $("#status-" + charId); var row = $("#control-row-" + charId); if (!btn.length || !status.length) return; // 1. Получаем локацию персонажа var location = "?"; if (v.characterLocations && v.characterLocations[charId]) { var roomCode = v.characterLocations[charId]; location = roomNames[roomCode] || roomCode; } // Сокращаем длинные названия if (location.length > 12) { location = location.substring(0, 10) + ".."; } // 2. Обновляем статус (локацию) status.text("(" + location + ")"); // 3. Обновляем кнопку if (v.controlledCharacter === charId) { // Под контролем btn.text("Out"); btn.css({ "background": "#d32f2f", "color": "white" }); btn.prop("title", "out " + getCharName(charId)); if (row.length) row.css("opacity", "1"); } else if (v.energy < 1) { // Нет энергии btn.text("НЕТ ЭНЕРГИИ"); btn.css({ "background": "#666", "color": "#aaa" }); btn.prop("disabled", true); btn.prop("title", "Недостаточно энергии"); if (row.length) row.css("opacity", "0.7"); } else { // Свободен btn.text("IN"); btn.css({ "background": "#4CAF50", "color": "white" }); btn.prop("disabled", false); btn.prop("title", "Взять контроль над " + getCharName(charId) + " (в " + location + ")"); if (row.length) row.css("opacity", "1"); } }); function getCharName(id) { if (v.chars && v.chars[id]) { return v.chars[id].name; } var names = { daughter: "Дочь", father: "Отец", mother: "Мать" }; return names[id]; } } catch (error) { console.error("Ошибка в updateSidebarControls:", error); } }; // ===== ФУНКЦИЯ СМЕНЫ ВРЕМЕНИ ===== window.nextTime = function() { try { var v = State.variables; v.time += 1; if (v.time > 4) { v.time = 1; v.day += 1; } // Обновляем позиции персонажей updateCharacterPositions(); updateAllUI(); } catch (error) { console.error("Ошибка в nextTime:", error); } }; // ===== СОЗДАНИЕ САЙДБАРА ===== $(document).on(':passagestart', function() { setTimeout(function() { try { var v = State.variables; // Создаём сайдбар только если его нет if ($("#custom-sidebar").length === 0) { // Устанавливаем безопасные значения var energy = v.energy || 0; var maxEnergy = v.maxEnergy || 10; var day = v.day || 1; var time = v.time || 1; // Безопасное получение имени персонажа var controlledName = "никто"; if (v.controlledCharacter && v.chars && v.chars[v.controlledCharacter]) { controlledName = v.chars[v.controlledCharacter].name; } // Безопасные значения для статистики var daughterCorruption = (v.chars && v.chars.daughter) ? v.chars.daughter.corruption : 0; var daughterFather = (v.chars && v.chars.daughter && v.chars.daughter.relations) ? v.chars.daughter.relations.father : 0; var daughterMother = (v.chars && v.chars.daughter && v.chars.daughter.relations) ? v.chars.daughter.relations.mother : 0; var fatherCorruption = (v.chars && v.chars.father) ? v.chars.father.corruption : 0; var fatherDaughter = (v.chars && v.chars.father && v.chars.father.relations) ? v.chars.father.relations.daughter : 0; var fatherMother = (v.chars && v.chars.father && v.chars.father.relations) ? v.chars.father.relations.mother : 0; var motherCorruption = (v.chars && v.chars.mother) ? v.chars.mother.corruption : 0; var motherDaughter = (v.chars && v.chars.mother && v.chars.mother.relations) ? v.chars.mother.relations.daughter : 0; var motherFather = (v.chars && v.chars.mother && v.chars.mother.relations) ? v.chars.mother.relations.father : 0; var timeText = "Утро"; if (v.timeNames && v.timeNames[time]) { timeText = v.timeNames[time]; } // ===== УНИВЕРСАЛЬНАЯ НАВИГАЦИЯ ===== window.navBack = function() { try { // Вариант 1: Современный SugarCube if (typeof window.story !== 'undefined' && window.story.state !== 'undefined') { var history = window.story.state.history; if (history && history.length > 1) { window.story.show(history[history.length - 2].title); return; } } // Вариант 2: Old SugarCube if (typeof History !== 'undefined' && History.length > 1) { History.back(); return; } // Вариант 3: Стандартный браузер if (typeof history !== 'undefined' && history.length > 1) { history.back(); return; } // Вариант 4: Просто перезагрузка alert("Невозможно вернуться назад"); SugarCube.Engine.play("Hall"); } catch (error) { console.error("Ошибка навигации назад:", error); SugarCube.Engine.play("Hall"); } }; window.navForward = function() { try { // В SugarCube нет реального "вперёд", только в браузере if (typeof history !== 'undefined') { history.forward(); } else { alert("Навигация 'вперёд' не поддерживается в этой версии"); } } catch (error) { console.error("Ошибка навигации вперёд:", error); } }; // HTML САЙДБАРА var sidebarHTML = '\ <div id="custom-sidebar">\ <h3>Ghost</h3>\ \ <!-- КОМПАКТНЫЙ КОНТРОЛЬ -->\ <div class="stat-block compact-control">\ <div class="stat-title">👻 КОНТРОЛЬ</div>\ <div class="compact-control-grid">\ <!-- ДОЧЬ -->\ <div class="compact-char">\ <span class="compact-icon">👧</span>\ <button class="compact-btn free" id="btn-daughter" \ onclick="window.takeControlFromSidebar(\'daughter\')" \ title="Взять контроль: Дочь">\ Д\ </button>\ <span class="compact-status" id="status-daughter">спальня</span>\ </div>\ \ <!-- ОТЕЦ -->\ <div class="compact-char">\ <span class="compact-icon">👨</span>\ <button class="compact-btn free" id="btn-father" \ onclick="window.takeControlFromSidebar(\'father\')" \ title="Взять контроль: Отец">\ О\ </button>\ <span class="compact-status" id="status-father">ванная</span>\ </div>\ \ <!-- МАТЬ -->\ <div class="compact-char">\ <span class="compact-icon">👩</span>\ <button class="compact-btn free" id="btn-mother" \ onclick="window.takeControlFromSidebar(\'mother\')" \ title="Взять контроль: Мать">\ М\ </button>\ <span class="compact-status" id="status-mother">кухня</span>\ </div>\ </div>\ <div class="energy-hint">Энергия контроля: 1</div>\ </div>\ \ <!-- СТАТИСТИКА -->\ <div class="stat-block">\ <div class="stat-title">📊 СТАТИСТИКА</div>\ <div>Энергия: <b><span id="ui-energy">' + energy + '</span> / ' + maxEnergy + '</b></div>\ </div>\ \ <!-- ТЕКУЩИЙ КОНТРОЛЬ -->\ <div class="stat-block">\ <div class="stat-title">👻 КОНТРОЛЬ</div>\ <div id="ui-controlled">Контроль: ' + controlledName + '</div>\ </div>\ \ <!-- ДОЧЬ -->\ <div class="stat-block">\ <div class="stat-title">👧 ДОЧЬ</div>\ <div>Коррупция: <span id="ui-daughter-corruption">' + daughterCorruption + '</span></div>\ <div>К отцу: <span id="ui-daughter-father">' + daughterFather + '</span></div>\ <div>К матери: <span id="ui-daughter-mother">' + daughterMother + '</span></div>\ </div>\ \ <!-- ОТЕЦ -->\ <div class="stat-block">\ <div class="stat-title">👨 ОТЕЦ</div>\ <div>Коррупция: <span id="ui-father-corruption">' + fatherCorruption + '</span></div>\ <div>К дочери: <span id="ui-father-daughter">' + fatherDaughter + '</span></div>\ <div>К матери: <span id="ui-father-mother">' + fatherMother + '</span></div>\ </div>\ \ <!-- МАТЬ -->\ <div class="stat-block">\ <div class="stat-title">👩 МАТЬ</div>\ <div>Коррупция: <span id="ui-mother-corruption">' + motherCorruption + '</span></div>\ <div>К дочери: <span id="ui-mother-daughter">' + motherDaughter + '</span></div>\ <div>К отцу: <span id="ui-mother-father">' + motherFather + '</span></div>\ </div>\ \ <!-- ВРЕМЯ -->\ <div class="stat-block">\ <div class="stat-title">⏰ ВРЕМЯ</div>\ <div>День: <span id="ui-day">' + day + '</span></div>\ <div>Время: <span id="ui-time">' + timeText + '</span></div>\ </div>\ \ <!-- НАВИГАЦИЯ -->\ <div class="sidebar-menu">\ <div class="stat-title">НАВИГАЦИЯ</div>\ <button class="nav-btn" onclick="window.navBack()">⬅️ Назад</button>\ <button class="nav-btn" onclick="window.navForward()">➡️ Вперёд</button>\ <button class="nav-btn" onclick="SugarCube.Engine.restart()">🔄 Начать сначала</button>\ </div>\ \ <!-- УТИЛИТЫ -->\ <div class="stat-block">\ <div class="stat-title">⚙️ УТИЛИТЫ</div>\ <div class="utility-buttons">\ <button class="util-btn" onclick="window.saveGame()">\ <span class="util-btn-icon">💾</span> Сохранить\ </button>\ <button class="util-btn" onclick="window.loadGame()">\ <span class="util-btn-icon">📂</span> Загрузить\ </button>\ <button class="util-btn" onclick="window.reportBug()">\ <span class="util-btn-icon">🐛</span> Баг-репорт\ </button>\ <button class="util-btn restart-btn" onclick="window.restartGame()">\ <span class="util-btn-icon">🔄</span> Рестарт\ </button>\ </div>\ </div>\ </div>'; // Вставляем сайдбар $("#story").prepend(sidebarHTML); // Сдвигаем основной контент $("#passages").css({ "margin-left": "300px", "width": "calc(100vw - 300px)" }); } // Обновляем UI updateAllUI(); } catch (error) { console.error("Ошибка при создании сайдбара:", error); } }, 50); }); // ===== ПРОВЕРКА ЭНЕРГИИ ===== window.canAct = function() { try { return State.variables.energy > 0; } catch (error) { console.error("Ошибка в canAct:", error); return false; } }; window.canSpendEnergy = function(amount) { try { var v = State.variables; return v.energy >= amount; } catch (error) { console.error("Ошибка в canSpendEnergy:", error); return false; } }; // ===== ТРАТА ЭНЕРГИИ ===== window.spendEnergy = function(amount) { try { var v = State.variables; if (v.energy < amount) { return false; } v.energy -= amount; if (v.energy > v.maxEnergy) v.energy = v.maxEnergy; if (v.energy <= 0) { v.energy = 0; v.hasDaughter = false; v.hasFather = false; v.hasMother = false; v.controlledCharacter = null; updateAllUI(); } return true; } catch (error) { console.error("Ошибка в spendEnergy:", error); return false; } }; // ===== ВОССТАНОВЛЕНИЕ ЭНЕРГИИ ===== window.restoreEnergy = function(amount) { try { var v = State.variables; v.controlledCharacter = null; v.hasDaughter = false; v.hasFather = false; v.hasMother = false; v.energy += amount; if (v.energy > 10) v.energy = 10; updateAllUI(); } catch (error) { console.error("Ошибка в restoreEnergy:", error); } }; // ===== ОБРАБОТЧИК ПРИ СМЕНЕ ПАССАЖА ===== $(document).on(':passagestart', function () { try { var v = State.variables; if (v.energy <= 0) { v.choiceMadeFath = false; v.choiceMadeMom = false; if (SugarCube.Engine.activePassage.name === "UncurentFath" || SugarCube.Engine.activePassage.name === "UncurentMom" || SugarCube.Engine.activePassage.name === "DaughterRoom") { SugarCube.Engine.play("Hall"); } } } catch (error) { console.error("Ошибка в обработчике passagestart:", error); } }); // ===== ФУНКЦИЯ ПРОВЕРКИ КОНТРОЛЯ ===== window.isControlling = function(character) { try { var v = State.variables; return v.controlledCharacter === character; } catch (error) { console.error("Ошибка в isControlling:", error); return false; } }; // ===== НАВИГАЦИЯ ===== window.navBack = function() { try { // Попробуем разные методы для совместимости if (typeof History !== 'undefined' && History.back) { History.back(); } else if (typeof history !== 'undefined' && history.back) { history.back(); } else if (typeof SugarCube !== 'undefined' && SugarCube.Engine && SugarCube.Engine.back) { SugarCube.Engine.back(); } else { console.warn("Навигация назад недоступна"); alert("Навигация назад не поддерживается в этом браузере"); } } catch (error) { console.error("Ошибка навигации назад:", error); } }; window.navForward = function() { try { if (typeof History !== 'undefined' && History.forward) { History.forward(); } else if (typeof history !== 'undefined' && history.forward) { history.forward(); } else if (typeof SugarCube !== 'undefined' && SugarCube.Engine && SugarCube.Engine.forward) { SugarCube.Engine.forward(); } else { console.warn("Навигация вперёд недоступна"); alert("Навигация вперёд не поддерживается в этом браузере"); } } catch (error) { console.error("Ошибка навигации вперёд:", error); } }; // ===== УТИЛИТЫ ===== window.saveGame = function() { try { if (typeof SaveSystem !== 'undefined' && SaveSystem.save) { SaveSystem.save(); alert("Игра сохранена!"); } else { // Простое сохранение через localStorage var saveData = { energy: State.variables.energy, day: State.variables.day, time: State.variables.time, chars: State.variables.chars, characterLocations: State.variables.characterLocations, controlledCharacter: State.variables.controlledCharacter, timestamp: new Date().toISOString() }; localStorage.setItem('ghostRevengeSave', JSON.stringify(saveData)); alert("Игра сохранена локально!"); } } catch (error) { console.error("Ошибка сохранения:", error); alert("Ошибка сохранения: " + error.message); } }; window.loadGame = function() { try { if (typeof SaveSystem !== 'undefined' && SaveSystem.load) { SaveSystem.load(); } else { var saved = localStorage.getItem('ghostRevengeSave'); if (saved) { var saveData = JSON.parse(saved); // Восстанавливаем данные State.variables.energy = saveData.energy || 3; State.variables.day = saveData.day || 1; State.variables.time = saveData.time || 1; State.variables.chars = saveData.chars || State.variables.chars; State.variables.characterLocations = saveData.characterLocations || State.variables.characterLocations; State.variables.controlledCharacter = saveData.controlledCharacter || null; alert("Игра загружена!\nСохранено: " + (new Date(saveData.timestamp)).toLocaleString()); updateAllUI(); } else { alert("Нет сохранённых игр!"); } } } catch (error) { console.error("Ошибка загрузки:", error); alert("Ошибка загрузки: " + error.message); } }; window.reportBug = function() { var bugReport = prompt("Опишите баг или проблему:"); if (bugReport) { // Можно добавить отправку на сервер или сохранение в localStorage var reports = JSON.parse(localStorage.getItem('bugReports') || '[]'); reports.push({ text: bugReport, timestamp: new Date().toISOString(), page: SugarCube.Engine.activePassage.name, state: { energy: State.variables.energy, day: State.variables.day, time: State.variables.time } }); localStorage.setItem('bugReports', JSON.stringify(reports)); alert("Спасибо! Баг-репорт сохранён."); } }; window.restartGame = function() { if (confirm("Начать игру заново? Весь прогресс будет потерян.")) { if (typeof SugarCube.Engine.restart === 'function') { SugarCube.Engine.restart(); } else { window.location.reload(); } } }; // Быстрые клавиши $(document).on('keydown', function(e) { // Ctrl+S - сохранить if (e.ctrlKey && e.key === 's') { e.preventDefault(); window.saveGame(); } // Ctrl+L - загрузить if (e.ctrlKey && e.key === 'l') { e.preventDefault(); window.loadGame(); } // Ctrl+R - рестарт if (e.ctrlKey && e.key === 'r') { e.preventDefault(); window.restartGame(); } }); // ===== СИСТЕМА ОБНАРУЖЕНИЯ ===== window.checkDetection = function(actor, target, location) { try { var v = State.variables; // Базовый шанс обнаружения: 30% var detectionChance = 30; // Модификаторы: // - Чем выше коррупция цели, тем ниже шанс обнаружения if (v.chars[target] && v.chars[target].corruption > 0) { detectionChance -= v.chars[target].corruption * 0.5; // -0.5% за каждую единицу коррупции } // - В публичных местах шанс выше var publicPlaces = ["Hall", "Kitchen", "LivingRoom"]; if (publicPlaces.includes(location)) { detectionChance += 10; } // Гарантируем разумные границы detectionChance = Math.max(5, Math.min(90, detectionChance)); // Бросок кубика var roll = Math.random() * 100; var detected = roll < detectionChance; console.log("Проверка обнаружения: " + actor + " -> " + target + " в " + location + ", шанс: " + detectionChance.toFixed(1) + "%, результат: " + (detected ? "ОБНАРУЖЕНО" : "НЕТ")); if (detected) { // Последствия обнаружения var penalty = -10; // -10 к отношениям // Уменьшаем отношения между обнаруженными персонажами if (v.chars[actor] && v.chars[actor].relations[target]) { v.chars[actor].relations[target] += penalty; } if (v.chars[target] && v.chars[target].relations[actor]) { v.chars[target].relations[actor] += penalty; } // Создаём событие обнаружения v.lastDetection = { actor: actor, target: target, location: location, time: v.time, day: v.day }; } return detected; } catch (error) { console.error("Ошибка в checkDetection:", error); return false; } };
:: DaughterFatherBathroomChoice <div id="main-content"> <div id="main-text"> <h2>Father in the Bathroom</h2> <p>You enter the bathroom. Your father is taking a shower, steam obscures his figure behind frosted glass. What will you do?</p> <div class="player-choice"> <div class="choice-title">Choose your level of interaction:</div> <div id="bath-choice-lvl1"> <<linkreplace "🚿 Level 1: Enter under a pretext (1⚡)">> <<if window.canSpendEnergy(1)>> <<run window.spendEnergy(1)>> <<goto "DaughterFatherBathroomLvl1">> <<else>> <span class="no-energy">Not enough energy</span> <</if>> <</linkreplace>> </div> <div id="bath-choice-lvl2"> <<linkreplace "🛁 Level 2: Offer to help (2⚡)">> <<if $chars.daughter.corruption >= 12 && $chars.father.relations.daughter >= 18>> <<if window.canSpendEnergy(2)>> <<run window.spendEnergy(2)>> <<goto "DaughterFatherBathroomLvl2">> <<else>> <span class="no-energy">Not enough energy</span> <</if>> <<else>> <div class="locked">🔒 Requires: corruption ≥ 12, relationship ≥ 18</div> <</if>> <</linkreplace>> </div> <div id="bath-choice-lvl3"> <<linkreplace "💦 Level 3: Advanced help (3⚡)">> <<if $chars.daughter.corruption >= 25 && $chars.father.relations.daughter >= 30>> <<if window.canSpendEnergy(3)>> <<run window.spendEnergy(3)>> <<goto "DaughterFatherBathroomLvl3">> <<else>> <span class="no-energy">Not enough energy</span> <</if>> <<else>> <div class="locked">🔒 Requires: corruption ≥ 25, relationship ≥ 30</div> <</if>> <</linkreplace>> </div> <<link "⬅️ Return to the Bathroom">> <<goto "Bathroom">> <</link>> </div> </div> </div>
:: DaughterFatherBathroomLvl1 <div id="main-content"> <div id="main-text"> <h2>Enter Under a Pretext</h2> <!-- MEDIA: bath_daughter_father_lvl1.gif --> <div class="media-placeholder"> [GIF LEVEL 1: Daughter enters the bathroom, father is in the shower] </div> <p>You say, "Dad, I forgot my toothbrush!" and enter the bathroom. Your father is behind the frosted shower glass.</p> <<if not $choiceMadeBathFatherLvl1>> <div class="player-choice"> <div class="choice-title">Your actions:</div> <<link "Pretend to search for the toothbrush">> <<set $choiceMadeBathFatherLvl1 = "search">> <<goto "DaughterFatherBathroomLvl1">> <</link>> <<link "Talk to dad through the glass">> <<set $choiceMadeBathFatherLvl1 = "talk">> <<goto "DaughterFatherBathroomLvl1">> <</link>> <<link "Quickly grab the toothbrush and leave">> <<set $choiceMadeBathFatherLvl1 = "leave">> <<goto "DaughterFatherBathroomLvl1">> <</link>> </div> <<else>> <<if $choiceMadeBathFatherLvl1 == "search">> <!-- MEDIA: bath_search.gif --> <div class="media-placeholder"> [GIF: Daughter "searches" for toothbrush, glancing at shower] </div> <<if $chars.daughter.skill >= 3>> <div class="success-result"> <p>You pretend to look for the toothbrush, but really glance at your father behind the glass. He doesn’t notice.</p> <<set $chars.father.relations.daughter += 3>> <<set $chars.daughter.corruption += 2>> </div> <<else>> <div class="partial-result"> <p>You nervously search and quickly find the toothbrush. Your father calls out, "Found it?"</p> <<set $chars.father.relations.daughter += 1>> </div> <</if>> <<elseif $choiceMadeBathFatherLvl1 == "talk">> <!-- MEDIA: bath_talk.gif --> <div class="media-placeholder"> [GIF: Daughter talks to father through the glass] </div> <<if $chars.father.relations.daughter >= 10>> <div class="success-result"> <p>"Dad, how’s work?" you ask. He answers calmly while continuing his shower.</p> <<set $chars.father.relations.daughter += 4>> <<set $chars.daughter.corruption += 1>> </div> <<else>> <div class="fail-result"> <p>"Uh… daughter, maybe you should leave? I’m almost done," he says awkwardly.</p> <<set $chars.father.relations.daughter -= 1>> </div> <</if>> <<else>> <p>You quickly grab the toothbrush and leave. "Got it!" you call, closing the door.</p> <<set $chars.father.relations.daughter += 1>> <</if>> <!-- DETECTION CHECK --> <<set _detected = window.checkDetection("daughter", "father", "Bathroom")>> <<if _detected>> <div class="detected-warning"> <p>⚠️ <strong>DETECTED!</strong> Your father suspects something!</p> <<set $chars.father.relations.daughter -= 3>> </div> <</if>> <div class="continue-button"> <<link "Continue">> <<set $choiceMadeBathFatherLvl1 = false>> <<run window.nextTime()>> <<goto "Bathroom">> <</link>> </div> <</if>> </div> </div>
:: DaughterFatherBathroomLvl2 <<if $chars.daughter.corruption < 12 || $chars.father.relations.daughter < 18>> <p>У вас недостаточно коррупции или отношений с отцом для этого уровня!</p> [[Вернуться к выбору->DaughterFatherBathroomChoice]] <<else>> <div id="main-content"> <div id="main-text"> <h2>Предложить помочь</h2> <!-- МЕДИА: bath_daughter_father_lvl2.gif --> <div class="media-placeholder"> [ГИФКА УРОВНЯ 2: Дочь предлагает помощь отцу в ванной] </div> <p>Вы стучите в дверь душа: "Пап, нужна помощь с мочалкой? Я тут рядом." Отец немного колеблется.</p> <<if not $choiceMadeBathFatherLvl2>> <div class="player-choice"> <div class="choice-title">Как предложить помощь?</div> <<link "💋 Соблазнительно: 'Давай я помогу...'">> <<set $choiceMadeBathFatherLvl2 = "seduce">> <<goto "DaughterFatherBathroomLvl2">> <</link>> <<link "😊 Невинно: 'Просто передам мочалку'">> <<set $choiceMadeBathFatherLvl2 = "innocent">> <<goto "DaughterFatherBathroomLvl2">> <</link>> <<link "👀 'Случайно' приоткрыть дверь">> <<set $choiceMadeBathFatherLvl2 = "open">> <<goto "DaughterFatherBathroomLvl2">> <</link>> </div> <<else>> <<if $choiceMadeBathFatherLvl2 == "seduce">> <!-- МЕДИА: bath_seduce.gif --> <div class="media-placeholder"> [ГИФКА: Дочь соблазнительно предлагает помощь] </div> <<if $chars.daughter.corruption >= 15 && $chars.father.relations.daughter >= 20>> <div class="success-result"> <p>Отец замирает на мгновение, затем тихо говорит: "Ладно... передай мочалку". Его голос дрожит.</p> <<set $chars.father.relations.daughter += 8>> <<set $chars.daughter.corruption += 5>> <<set $chars.father.corruption += 3>> </div> <<else>> <div class="partial-result"> <p>— Нет-нет, я сам! — быстро отвечает отец. — Выйди, пожалуйста.</p> <<set $chars.father.relations.daughter += 2>> <<set $chars.daughter.corruption += 1>> </div> <</if>> <<elseif $choiceMadeBathFatherLvl2 == "innocent">> <!-- МЕДИА: bath_innocent.gif --> <div class="media-placeholder"> [ГИФКА: Дочь невинно протягивает мочалку] </div> <<if $chars.father.relations.daughter >= 22>> <div class="success-result"> <p>Отец приоткрывает дверь, берет мочалку. Ваши пальцы ненадолго соприкасаются.</p> <<set $chars.father.relations.daughter += 6>> <<set $chars.daughter.corruption += 3>> <<set $chars.father.corruption += 1>> </div> <<else>> <div class="neutral-result"> <p>— Положи на стул, я потом возьму, — говорит отец через дверь.</p> <<set $chars.father.relations.daughter += 3>> </div> <</if>> <<else>> <!-- МЕДИА: bath_open.gif --> <div class="media-placeholder"> [ГИФКА: Дочь приоткрывает дверь душа] </div> <<if $chars.daughter.corruption >= 18>> <div class="risk-result"> <p>Вы 'случайно' приоткрываете дверь. Отец вскрикивает и быстро закрывает её.</p> <<set $chars.father.relations.daughter += 10>> <<set $chars.daughter.corruption += 7>> <<set $chars.father.corruption += 4>> <!-- Высокий шанс обнаружения --> <<set _detected = true>> </div> <<else>> <div class="fail-result"> <p>— Что ты делаешь?! — кричит отец. — Выйди немедленно!</p> <<set $chars.father.relations.daughter -= 5>> </div> <</if>> <</if>> <!-- ПРОВЕРКА ОБНАРУЖЕНИЯ (особенно для варианта "open") --> <<if $choiceMadeBathFatherLvl2 == "open">> <<set _detected = window.checkDetection("daughter", "father", "Bathroom")>> <<set _detected = _detected || true>> <!-- Увеличиваем шанс --> <<else>> <<set _detected = window.checkDetection("daughter", "father", "Bathroom")>> <</if>> <<if _detected>> <div class="detected-warning"> <p>⚠️ <strong>ОБНАРУЖЕНИЕ!</strong> Отец явно заподозрил ваши намерения!</p> <<set $chars.father.relations.daughter -= 8>> </div> <</if>> <div class="continue-button"> <<link "Продолжить">> <<set $choiceMadeBathFatherLvl2 = false>> <<run window.nextTime()>> <<goto "Bathroom">> <</link>> </div> <</if>> </div> </div> <</if>>
:: DaughterFatherBathroomLvl3 <<if $chars.daughter.corruption < 25 || $chars.father.relations.daughter < 30>> <p>У вас недостаточно коррупции или отношений с отцом для интимного уровня!</p> [[Вернуться к выбору->DaughterFatherBathroomChoice]] <<else>> <div id="main-content"> <div id="main-text"> <h2>Интимная помощь</h2> <!-- МЕДИА: bath_daughter_father_lvl3.gif --> <div class="media-placeholder"> [ГИФКА УРОВНЯ 3: Интимная сцена в ванной] </div> <p>Вы заходите в ванную без предупреждения. Отец только вышел из душа, накинув полотенце на бедра.</p> <<if not $choiceMadeBathFatherLvl3>> <div class="player-choice"> <div class="choice-title">Ваш следующий шаг:</div> <<link "Спросить хочет ли он посмотреть как она снимает стресс?">> <<set $choiceMadeBathFatherLvl3 = "dry">> <<goto "DaughterFatherBathroomLvl3">> <</link>> <<link "💦 Предложить ему свой рот'">> <<set $choiceMadeBathFatherLvl3 = "press">> <<goto "DaughterFatherBathroomLvl3">> <</link>> <<link "👄Предложить себя">> <<set $choiceMadeBathFatherLvl3 = "kiss">> <<goto "DaughterFatherBathroomLvl3">> <</link>> <<link "⚠️ Отступить (слишком рискованно)">> <<set $choiceMadeBathFatherLvl3 = "retreat">> <<goto "DaughterFatherBathroomLvl3">> <</link>> </div> <<else>> <<if $choiceMadeBathFatherLvl3 == "dry">> <!-- МЕДИА: bath_dry.gif --> bj <div class="media-placeholder"> <img src="img/daughter/bathroom/mast.gif" width="400"> </div> <<if $chars.father.relations.daughter >= 35>> <div class="success-result"> <p>Отец наслаждается.</p> <<set $chars.father.relations.daughter += 12>> <<set $chars.daughter.corruption += 8>> <<set $chars.father.corruption += 6>> </div> <<else>> <div class="partial-result"> <p>— Я сам... — бормочет отец, но позволяет вам продолжить несколько секунд.</p> <<set $chars.father.relations.daughter += 6>> <<set $chars.daughter.corruption += 4>> <<set $chars.father.corruption += 2>> </div> <</if>> <<elseif $choiceMadeBathFatherLvl3 == "press">> <!-- МЕДИА: bath_press.gif --> <div class="media-placeholder"> <img src="img/daughter/bathroom/bj.gif" width="400"> </div> <<if $chars.daughter.corruption >= 30>> <div class="success-result"> <p>Вы 'спотыкаетесь' и прижимаетесь к его мокрому телу. Отец не отталкивает вас.</p> <<set $chars.father.relations.daughter += 15>> <<set $chars.daughter.corruption += 10>> <<set $chars.father.corruption += 8>> </div> <<else>> <div class="risk-result"> <p>Отец отстраняется: "Осторожнее!" Но в его глазах вы видите замешательство, а не злость.</p> <<set $chars.father.relations.daughter += 8>> <<set $chars.daughter.corruption += 5>> <<set $chars.father.corruption += 3>> </div> <</if>> <<elseif $choiceMadeBathFatherLvl3 == "kiss">> <!-- МЕДИА: bath_kiss.gif --> <div class="media-placeholder"> <div style="transform: scale(0.5); transform-origin: top left;"> [img[String.format('img/daughter/bathroom/sex' + random(1, 2) + '.gif')]] </div> </div> <<if $chars.daughter.corruption >= 35 && $chars.father.relations.daughter >= 40>> <div class="success-result"> <p>Вы целуете его шею. Отец стонет и обнимает вас, отвечая на поцелуй.</p> <<set $chars.father.relations.daughter += 20>> <<set $chars.daughter.corruption += 15>> <<set $chars.father.corruption += 12>> </div> <<elseif $chars.daughter.corruption >= 25>> <div class="partial-result"> <p>Отец резко отстраняется: "Нет! Мы не можем..." Но он тяжело дышит.</p> <<set $chars.father.relations.daughter += 10>> <<set $chars.daughter.corruption += 7>> <<set $chars.father.corruption += 5>> </div> <<else>> <div class="fail-result"> <p>— Что ты делаешь?! — отец отталкивает вас. — Выйди немедленно!</p> <<set $chars.father.relations.daughter -= 15>> </div> <</if>> <<else>> <p>Вы отступаете в последний момент. Отец выглядит облегчённым, но также немного разочарованным.</p> <<set $chars.father.relations.daughter += 3>> <</if>> <!-- ОБЯЗАТЕЛЬНАЯ ПРОВЕРКА ОБНАРУЖЕНИЯ НА УРОВНЕ 3 --> <<set _detected = window.checkDetection("daughter", "father", "Bathroom")>> <<if _detected>> <div class="detected-warning"> <p>⚠️ <strong>КРИТИЧЕСКОЕ ОБНАРУЖЕНИЕ!</strong> Отец полностью осознал ваши намерения!</p> <<set $chars.father.relations.daughter -= 20>> <<set $chars.father.corruption -= 10>> </div> <</if>> <div class="continue-button"> <<link "Продолжить">> <<set $choiceMadeBathFatherLvl3 = false>> <<run window.nextTime()>> <<goto "Bathroom">> <</link>> </div> <</if>> </div> </div> <</if>>
:: DaughterMotherBathroomChoice <div id="main-content"> <div id="main-text"> <h2>Mother in the Bathroom</h2> <p>You enter the bathroom. Mother is lying in the bathtub, covered in bubbles. She smiles at you.</p> <div class="player-choice"> <div class="choice-title">Choose interaction level:</div> <<link "🛁 Level 1: Help with bath (1⚡)">> <<if window.canSpendEnergy(1)>> <<run window.spendEnergy(1)>> <<goto "DaughterMotherBathroomLvl1">> <<else>> <span class="no-energy">Not enough energy</span> <</if>> <</link>> <<link "🧖♀️ Level 2: Bath massage (2⚡)">> <<if $chars.daughter.corruption >= 10 && $chars.mother.relations.daughter >= 16>> <<if window.canSpendEnergy(2)>> <<run window.spendEnergy(2)>> <<goto "DaughterMotherBathroomLvl2">> <<else>> <span class="no-energy">Not enough energy</span> <</if>> <<else>> <div class="locked">🔒 Requires: corruption ≥ 10, relationship ≥ 16</div> <</if>> <</link>> <<link "💆♀️ Level 3: Intimate help (3⚡)">> <<if $chars.daughter.corruption >= 22 && $chars.mother.relations.daughter >= 28>> <<if window.canSpendEnergy(3)>> <<run window.spendEnergy(3)>> <<goto "DaughterMotherBathroomLvl3">> <<else>> <span class="no-energy">Not enough energy</span> <</if>> <<else>> <div class="locked">🔒 Requires: corruption ≥ 22, relationship ≥ 28</div> <</if>> <</link>> <<link "⬅️ Return to bathroom">> <<goto "Bathroom">> <</link>> </div> </div> </div>
:: DaughterMotherBathroomLvl1 <div id="main-content"> <div id="main-text"> <h2>Helping with the Bath</h2> <!-- MEDIA: bath_daughter_mother_lvl1.gif --> <div class="media-placeholder"> [GIF LEVEL 1: Daughter helping mother in the bathtub] </div> <p>"Mom, do you need help? I can bring a towel or add some hot water," you offer.</p> <<if not $choiceMadeBathMotherLvl1>> <div class="player-choice"> <div class="choice-title">How do you want to help?</div> <<link "Bring a towel and stay">> <<set $choiceMadeBathMotherLvl1 = "towel">> <<goto "DaughterMotherBathroomLvl1">> <</link>> <<link "Add hot water">> <<set $choiceMadeBathMotherLvl1 = "water">> <<goto "DaughterMotherBathroomLvl1">> <</link>> <<link "Just talk">> <<set $choiceMadeBathMotherLvl1 = "talk">> <<goto "DaughterMotherBathroomLvl1">> <</link>> </div> <<else>> <<if $choiceMadeBathMotherLvl1 == "towel">> <!-- MEDIA: bath_towel_mother.gif --> <div class="media-placeholder"> [GIF: Daughter handing a towel to mother] </div> <<if $chars.mother.relations.daughter >= 12>> <div class="success-result"> <p>"You’re so caring," smiles mother, taking the towel. She doesn’t shy away from your gaze.</p> <<set $chars.mother.relations.daughter += 4>> <<set $chars.daughter.corruption += 2>> </div> <<else>> <div class="partial-result"> <p>"Just put it on the chair, I’ll take it later," says mother, covering herself with bubbles.</p> <<set $chars.mother.relations.daughter += 2>> </div> <</if>> <<elseif $choiceMadeBathMotherLvl1 == "water">> <!-- MEDIA: bath_water_mother.gif --> <div class="media-placeholder"> [GIF: Daughter adding hot water to the bath] </div> <div class="success-result"> <p>You carefully add hot water. "Oh, that’s nice! Thank you, dear," mother says gratefully.</p> <<set $chars.mother.relations.daughter += 3>> <<set $chars.daughter.corruption += 1>> </div> <<else>> <!-- MEDIA: bath_talk_mother.gif --> <div class="media-placeholder"> [GIF: Daughter talking with mother in the bath] </div> <div class="neutral-result"> <p>You discuss plans for the weekend. Mother is relaxed and open.</p> <<set $chars.mother.relations.daughter += 3>> </div> <</if>> <!-- DETECTION CHECK (lower chance than with father) --> <<set _detected = window.checkDetection("daughter", "mother", "Bathroom")>> <<if _detected>> <div class="detected-warning"> <p>⚠️ <strong>DETECTED!</strong> Mother suspects something in your behavior!</p> <<set $chars.mother.relations.daughter -= 3>> </div> <</if>> <div class="continue-button"> <<link "Continue">> <<set $choiceMadeBathMotherLvl1 = false>> <<run window.nextTime()>> <<goto "Hall">> </</link>> </div> <</if>> </div> </div>
:: DaughterMotherBathroomLvl2 <<if $chars.daughter.corruption < 10 || $chars.mother.relations.daughter < 16>> <p>You don't have enough corruption or relationship with your mother for this level!</p> [[Return to choice->DaughterMotherBathroomChoice]] <<else>> <div id="main-content"> <div id="main-text"> <h2>Bath Massage</h2> <!-- MEDIA: bath_daughter_mother_lvl2.gif --> <div class="media-placeholder"> [GIF LEVEL 2: Daughter giving mother a massage in the bath] </div> <p>— Mom, your shoulders are so tense… Let me massage them? — you suggest, approaching the bathtub.</p> <<if not $choiceMadeBathMotherLvl2>> <div class="player-choice"> <div class="choice-title">How to massage?</div> <<link "💆♀️ Gently massage the shoulders">> <<set $choiceMadeBathMotherLvl2 = "shoulders">> <<goto "DaughterMotherBathroomLvl2">> <</link>> <<link "✋ Massage the back through the bubbles">> <<set $choiceMadeBathMotherLvl2 = "back">> <<goto "DaughterMotherBathroomLvl2">> <</link>> <<link "🫳 'Accidentally' touch the chest">> <<set $choiceMadeBathMotherLvl2 = "chest">> <<goto "DaughterMotherBathroomLvl2">> <</link>> </div> <<else>> <<if $choiceMadeBathMotherLvl2 == "shoulders">> <!-- MEDIA: bath_massage_shoulders.gif --> <div class="media-placeholder"> [GIF: Daughter massages mother's shoulders] </div> <<if $chars.mother.relations.daughter >= 20>> <div class="success-result"> <p>— Oh, that feels so good… — the mother moans, relaxing under your fingers. — You have magical hands.</p> <<set $chars.mother.relations.daughter += 8>> <<set $chars.daughter.corruption += 4>> <<set $chars.mother.corruption += 2>> </div> <<else>> <div class="partial-result"> <p>The mother lets you massage her shoulders for a few minutes, then says, "Thank you, dear".</p> <<set $chars.mother.relations.daughter += 5>> <<set $chars.daughter.corruption += 2>> </div> <</if>> <<elseif $choiceMadeBathMotherLvl2 == "back">> <!-- MEDIA: bath_massage_back.gif --> <div class="media-placeholder"> [GIF: Daughter massages mother's back through the bubbles] </div> <<if $chars.daughter.corruption >= 14>> <div class="success-result"> <p>Your hands glide along her wet back under the bubbles. Mother sighs with pleasure.</p> <<set $chars.mother.relations.daughter += 10>> <<set $chars.daughter.corruption += 6>> <<set $chars.mother.corruption += 4>> </div> <<else>> <div class="neutral-result"> <p>You carefully massage her back. — Nice, — says mother, but doesn't fully relax.</p> <<set $chars.mother.relations.daughter += 6>> <<set $chars.daughter.corruption += 3>> </div> <</if>> <<else>> <!-- MEDIA: bath_touch_chest.gif --> <div class="media-placeholder"> [GIF: Daughter 'accidentally' touches mother's chest] </div> <<if $chars.daughter.corruption >= 18>> <div class="risk-result"> <p>Your hand 'accidentally' slides over her chest. Mother freezes, but doesn't stop you.</p> <<set $chars.mother.relations.daughter += 12>> <<set $chars.daughter.corruption += 8>> <<set $chars.mother.corruption += 6>> <<set _detected = true>> <!-- Increased chance of detection --> </div> <<else>> <div class="fail-result"> <p>— What are you doing?! — mother pulls away. — That's… not necessary.</p> <<set $chars.mother.relations.daughter -= 4>> </div> <</if>> </<if>> <!-- DETECTION CHECK --> <<if $choiceMadeBathMotherLvl2 == "chest">> <<set _detected = window.checkDetection("daughter", "mother", "Bathroom")>> <<set _detected = _detected || true>> <!-- Increase chance --> <<else>> <<set _detected = window.checkDetection("daughter", "mother", "Bathroom")>> <</if>> <<if _detected>> <div class="detected-warning"> <p>⚠️ <strong>DETECTED!</strong> Mother clearly suspected your intentions!</p> <<set $chars.mother.relations.daughter -= 8>> <<set $chars.mother.corruption -= 3>> </div> <</if>> <div class="continue-button"> <<link "Continue">> <<set $choiceMadeBathMotherLvl2 = false>> <<run window.nextTime()>> <<goto "Hall">> </</link>> </div> <</if>> </div> </div> <</if>>
:: DaughterMotherBathroomLvl3 (safe version) <<if $chars.daughter.skill < 22 || $chars.mother.relations.daughter < 28>> <p>You don’t have enough skill or relationship with your mother for this level!</p> [[Return to choice->DaughterMotherBathroomChoice]] <<else>> <div id="main-content"> <div id="main-text"> <h2>Helping in the Bath</h2> <div class="media-placeholder"> [GIF LEVEL 3: Daughter helping mother in the bath] </div> <p>You stay in the bathroom as your mother prepares to leave. — Let me help you dry off? — you ask quietly.</p> <<if not $choiceMadeBathMotherLvl3>> <div class="player-choice"> <div class="choice-title">Your next action:</div> <<link "🧽 Help dry with a towel">> <<set $choiceMadeBathMotherLvl3 = "dry">> <<goto "DaughterMotherBathroomLvl3">> <</link>> <<link "💬 Give a comforting hug">> <<set $choiceMadeBathMotherLvl3 = "hug">> <<goto "DaughterMotherBathroomLvl3">> <</link>> <<link "⚠️ Step back (too risky)">> <<set $choiceMadeBathMotherLvl3 = "retreat">> <<goto "DaughterMotherBathroomLvl3">> <</link>> </div> <<else>> <<if $choiceMadeBathMotherLvl3 == "dry">> <div class="media-placeholder"> [GIF: Daughter helping mother dry off with a towel] </div> <p>You carefully help her dry off. Mother seems relaxed and grateful.</p> <<set $chars.mother.relations.daughter += 15>> <<set $chars.daughter.skill += 10>> <<elseif $choiceMadeBathMotherLvl3 == "hug">> <div class="media-placeholder"> [GIF: Daughter gives mother a comforting hug] </div> <p>You give a warm, supportive hug. Mother smiles and feels comforted.</p> <<set $chars.mother.relations.daughter += 25>> <<set $chars.daughter.skill += 18>> <<else>> <p>You step back. Mother looks relieved, but a little disappointed.</p> <<set $chars.mother.relations.daughter += 4>> <</if>> <<set _detected = window.checkDetection("daughter", "mother", "Bathroom")>> <<if _detected>> <div class="detected-warning"> <p>⚠️ DETECTED! Mother noticed your actions carefully.</p> <<set $chars.mother.relations.daughter -= 10>> </div> <</if>> <div class="continue-button"> <<link "Continue">> <<set $choiceMadeBathMotherLvl3 = false>> <<run window.nextTime()>> <<goto "Hall">> </</link>> </div> <</if>> </div> </div> <</if>>
:: FatherStudyInteraction <div id="main-content"> <div id="main-text"> <h2>Father's office</h2> <p>You are with your father in his office.</p> <!-- CHECK: DAUGHTER MUST BE UNDER CONTROL --> <<if $controlledCharacter != "daughter">> <<nobr>> <div class="error"> Only the daughter can interact with the father in this office. </div> <</nobr>> <<nobr>> <div class="return-link"> [[← Back to cabinet->FathersStudy]] </div> <</nobr>> <<stop>> <</if>> <<nobr>><h3>Your actions with your father:</h3><</nobr>> <!-- LEVEL 1: Basic interactions --> <<nobr>> <div id="talk-action"> <<link "💬Talk (1⚡)">> <<if window.canSpendEnergy(1)>> <<run window.spendEnergy(1)>> <<set $chars.father.relations.daughter += random(5, 15)>> <<run updateAllUI()>> <<replace "#talk-action">> <div class="gif-scene"> <img src="img/daughter/fathercabinet/talk1.gif" width="600"> <p>You are discussing the latest news with your father. He listens attentively and gives advice.</p> <p class="positive">+ to the relationship</p> </div> <</replace>> <<else>> <<replace "#talk-action">> <span class="no-energy">Not enough power</span> <</replace>> <</if>> <</link>> </div> <</nobr>> <nobr> <div id="help-action"> <<link "☕ Offer to help (1⚡)">> <<if window.canSpendEnergy(1)>> <<run window.spendEnergy(1)>> <<set $chars.father.relations.daughter += 10>> <<run updateAllUI()>> <<replace "#help-action">> <div class="gif-scene"> <div style="transform: scale(0.5); transform-origin: top left;"> [img[String.format('img/daughter/fathercabinet/bj' + random(1, 2) + '.gif')]] </div> </div> <p>You bring your father freshly brewed coffee. He smiles and thanks.</p> <p class="positive">+10 relationships</p> <</replace>> <<else>> <<replace "#help-action">> <span class="no-energy">Not enough power</span> <</replace>> <</if>> <</link>> </div> </nobr> <!-- LEVEL 2: SEX --> <<if $chars.daughter.corruption >= 15>> <<nobr>> <div id="bj-action"> <<link "💋 BJ (2⚡)">> <<if window.canSpendEnergy(2)>> <<run window.spendEnergy(2)>> <<set $chars.daughter.corruption += 5>> <<set $chars.father.corruption += 3>> <<run updateAllUI()>> <<set _randomImg = random(1, 2)>> <<replace "#bj-action">> <div class="gif-scene"> <div style="transform: scale(0.5); transform-origin: top left;"> [img[String.format('img/daughter/fathercabinet/sex' + random(1, 2) + '.gif')]] </div> </div> <p>You put on an open dress and deliberately lean over the table.</p> <p class="corruption">+5 corruption (daughter), +3 corruption (father)</p> </div> <</replace>> <<else>> <<replace "#bj-action">> <span class="no-energy">Not enough power</span> <</replace>> <</if>> <</link>> </div> <</nobr>> <<else>> <<nobr>><div class="locked">🔒 Seduction: corruption of a daughter ≥ 15</div><</nobr>> <</if>> <!-- Deepthroath --> <<if $chars.daughter.corruption >= 50 && $chars.father.relations.daughter >= 40>> <<nobr>> <div id="dt-action"> <<link "😈 Deepthroath (4⚡)">> <<if window.canSpendEnergy(4)>> <<run window.spendEnergy(4)>> <<set $chars.daughter.corruption += 15>> <<set $chars.father.corruption += 10>> <<run updateAllUI()>> <<replace "#dt-action">> <div class="gif-scene"> <img src="img/daughter/fathercabinet/dt1.gif" width="600"> <p>You climb onto his lap. His hands slide over your body.</p> The table creaks under your weight, but it can't stop.</p> <!-- THE BUTTON FOR THE SECOND GIF --> <<nobr>> <div id="cum-action"> <<link "🔥 Cum">> <<replace "#cum-action">> <div class="gif-scene continuation"> <img src="img/daughter/fathercabinet/cum.gif" width="600"> <p>He throws the documents off the table and presses you to the surface.</p> <p>His movements are becoming more insistent...</p> <p class="corruption">The boundary between father and man is finally erased.</p> </div> <</replace>> <</link>> </div> <</nobr>> </div> <</replace>> <<else>> <<replace "#dt-action">> <span class="no-energy">Not enough power</span> <</replace>> <</if>> <</link>> </div> <</nobr>> <<elseif $chars.daughter.corruption >= 30>> <<nobr>><div class="locked">🔒 Deepthrath: corruption ≥ 50, relationships ≥ 40</div><</nobr>> <</if>> <<nobr>> <div class="return-link"> [[← Back to cabinet->FathersStudy]] </div> <</nobr>> </div> </div>
:: DaughterRoom <div id="main-content"> <div id="main-text"> <h2>Daughter's Room</h2> <img src="img/build/rooms/dayghterroon.png" class="story-image"> <<if $characterLocations.daughter == "DaughterRoom">> <p>👧 Daughter is here.</p> <p><i>For control use sidebar → "Quick Control"</i></p> <<else>> <p>Daughter is not here.</p> <</if>> [[Return to hall->Hall]] </div> </div>
// ===== ФУНКЦИЯ ОБНОВЛЕНИЯ ВСЕГО UI ===== window.updateAllUI = function() { try { var v = State.variables; if (!v) { console.warn("State.variables не определен"); return; } v.energy = v.energy || 0; v.day = v.day || 1; v.time = v.time || 1; v.maxEnergy = v.maxEnergy || 10; if (!v.timeNames) { v.timeNames = ["", "Morning", "Day", "Evening", "Night"]; } if (!v.chars) { v.chars = { daughter: { name: "Daughter", corruption: 0, relations: { father: 0, mother: 0 } }, father: { name: "Father", corruption: 0, relations: { daughter: 0, mother: 0 } }, mother: { name: "Mother", corruption: 0, relations: { daughter: 0, father: 0 } } }; } // КОНТРОЛЬ ПЕРСОНАЖА if ($("#ui-controlled").length) { if (v.energy > 0 && v.controlledCharacter && v.chars && v.chars[v.controlledCharacter]) { var charName = v.chars[v.controlledCharacter].name; $("#ui-controlled").text("Control: " + charName) .css("color", "#4CAF50"); } else { $("#ui-controlled").text("Control: none") .css("color", "#888"); } } // Энергия if ($("#ui-energy").length) { $("#ui-energy").text(v.energy); } // День и время if ($("#ui-day").length) { $("#ui-day").text(v.day); } if ($("#ui-time").length) { var timeText = "Morning"; if (v.timeNames && v.timeNames[v.time]) { timeText = v.timeNames[v.time]; } $("#ui-time").text(timeText); } // День недели if ($("#ui-weekday").length) { var weekdayText = "Monday"; if (v.dayNames && v.dayNames[v.weekDay]) { weekdayText = v.dayNames[v.weekDay]; } $("#ui-weekday").text(weekdayText); } // Дочь if ($("#ui-daughter-corruption").length) { if (v.chars && v.chars.daughter) { $("#ui-daughter-corruption").text(v.chars.daughter.corruption || 0); $("#ui-daughter-father").text(v.chars.daughter.relations.father || 0); $("#ui-daughter-mother").text(v.chars.daughter.relations.mother || 0); } } // Отец if ($("#ui-father-corruption").length) { if (v.chars && v.chars.father) { $("#ui-father-corruption").text(v.chars.father.corruption || 0); $("#ui-father-daughter").text(v.chars.father.relations.daughter || 0); $("#ui-father-mother").text(v.chars.father.relations.mother || 0); } } // Мать if ($("#ui-mother-corruption").length) { if (v.chars && v.chars.mother) { $("#ui-mother-corruption").text(v.chars.mother.corruption || 0); $("#ui-mother-daughter").text(v.chars.mother.relations.daughter || 0); $("#ui-mother-father").text(v.chars.mother.relations.father || 0); } } // ОБНОВЛЯЕМ КНОПКИ КОНТРОЛЯ В САЙДБАРЕ if (typeof updateSidebarControls === 'function') { updateSidebarControls(); } } catch (error) { console.error("Ошибка в updateAllUI:", error); } }; // ===== Перемещение персонажей ===== window.updateCharacterPositions = function() { try { var v = State.variables; if (!v) return; if (!v.schedules) { // Старая логика v.characterLocations.daughter = "DaughterRoom"; v.characterLocations.father = "ParentsRoom"; v.characterLocations.mother = "Kitchen"; return; } var weekDay = (v.day % 7) || 7; var isWeekend = (weekDay >= 6); ["daughter", "father", "mother"].forEach(function(charId) { if (v.controlledCharacter !== charId) { var scheduleType = isWeekend ? "weekend" : "weekday"; var plannedRoom = v.schedules[charId][scheduleType][v.time]; var actualRoom = plannedRoom; if (!window.isRoomAvailable(plannedRoom)) { // ЛОГИКА ЗАМЕНЫ НЕДОСТУПНЫХ КОМНАТ: if (plannedRoom === "Bathroom") { actualRoom = isWeekend ? "DaughterRoom" : "Kitchen"; } else if (plannedRoom === "FathersStudy") { actualRoom = "ParentsRoom"; } else if (plannedRoom === "Garage") { actualRoom = isWeekend ? "ParentsRoom" : "ParentsRoom"; } else if (plannedRoom === "Attic") { actualRoom = "DaughterRoom"; } else if (plannedRoom === "LivingRoom" && v.day < 7) { actualRoom = "Hall"; } else { actualRoom = charId === "daughter" ? "DaughterRoom" : charId === "father" ? "ParentsRoom" : "Kitchen"; } if (!window.isRoomAvailable(actualRoom)) { actualRoom = "Hall"; } } v.characterLocations[charId] = actualRoom; } }); } catch (error) { console.error("Ошибка в updateCharacterPositions:", error); } }; // ===== ВЗЯТИЕ КОНТРОЛЯ ===== window.takeControl = function(character) { try { var v = State.variables; if (v.energy < 1) { console.log("Not enough energy"); return false; } v.hasDaughter = false; v.hasFather = false; v.hasMother = false; switch(character) { case "daughter": v.hasDaughter = true; break; case "father": v.hasFather = true; break; case "mother": v.hasMother = true; break; } v.controlledCharacter = character; v.energy -= 1; var currentRoom = SugarCube.Engine.activePassage.name; v.characterLocations[character] = currentRoom; console.log("Control taken: " + character + " in room: " + currentRoom); updateAllUI(); return true; } catch (error) { console.error("Ошибка в takeControl:", error); return false; } }; // ===== БЫСТРЫЙ КОНТРОЛЬ ИЗ САЙДБАРА ===== window.takeControlFromSidebar = function(character) { try { var v = State.variables; if (v.energy < 1) { alert("Not enough energy to take control!"); return false; } if (v.controlledCharacter === character) { v.controlledCharacter = null; v.hasDaughter = false; v.hasFather = false; v.hasMother = false; console.log("Control released: " + character); window.updateAllUI(); return true; } var success = window.takeControl(character); if (success) { window.updateAllUI(); setTimeout(function() { var mainText = document.getElementById('main-text'); if (mainText) { var msg = document.createElement('div'); msg.className = 'control-notification'; var charName = v.chars[character] ? v.chars[character].name : character; var roomName = v.rooms[SugarCube.Engine.activePassage.name] || SugarCube.Engine.activePassage.name; msg.innerHTML = '👻 <b>Control taken over ' + charName + '</b> in ' + roomName; msg.style.cssText = 'background:#4CAF50;color:white;padding:10px;margin:10px 0;border-radius:5px;'; mainText.prepend(msg); setTimeout(function() { if (msg.parentNode) { msg.parentNode.removeChild(msg); } }, 3000); } }, 100); } return success; } catch (error) { console.error("Ошибка в takeControlFromSidebar:", error); return false; } }; // ===== ОБНОВЛЕНИЕ КНОПОК КОНТРОЛЯ В САЙДБАРЕ ===== window.updateSidebarControls = function() { try { var v = State.variables; if (!v) return; var chars = ["daughter", "father", "mother"]; var roomNames = v.rooms || {}; chars.forEach(function(charId) { var btn = $("#btn-" + charId); var status = $("#status-" + charId); var row = $("#control-row-" + charId); if (!btn.length || !status.length) return; var location = "?"; if (v.characterLocations && v.characterLocations[charId]) { var roomCode = v.characterLocations[charId]; location = roomNames[roomCode] || roomCode; } if (location.length > 12) { location = location.substring(0, 10) + ".."; } status.text("(" + location + ")"); if (v.controlledCharacter === charId) { btn.text("Out"); btn.css({ "background": "#d32f2f", "color": "white" }); btn.prop("title", "Release: " + getCharName(charId)); if (row.length) row.css("opacity", "1"); } else if (v.energy < 1) { btn.text("NO ⚡"); btn.css({ "background": "#666", "color": "#aaa" }); btn.prop("disabled", true); btn.prop("title", "Not enough energy"); if (row.length) row.css("opacity", "0.7"); } else { btn.text("IN"); btn.css({ "background": "#4CAF50", "color": "white" }); btn.prop("disabled", false); btn.prop("title", "Take control: " + getCharName(charId) + " (in " + location + ")"); if (row.length) row.css("opacity", "1"); } }); function getCharName(id) { if (v.chars && v.chars[id]) { return v.chars[id].name; } var names = { daughter: "Daughter", father: "Father", mother: "Mother" }; return names[id]; } } catch (error) { console.error("Ошибка в updateSidebarControls:", error); } }; // ===== ФУНКЦИЯ СМЕНЫ ВРЕМЕНИ ===== window.nextTime = function() { try { var v = State.variables; v.time += 1; if (v.time > 4) { v.time = 1; v.day += 1; v.weekDay = (v.weekDay % 7) + 1; } updateCharacterPositions(); updateAllUI(); } catch (error) { console.error("Ошибка в nextTime:", error); } }; // ===== СОЗДАНИЕ САЙДБАРА ===== $(document).on(':passagestart', function() { setTimeout(function() { try { var v = State.variables; if ($("#custom-sidebar").length === 0) { var energy = v.energy || 0; var maxEnergy = v.maxEnergy || 10; var day = v.day || 1; var time = v.time || 1; var controlledName = "none"; if (v.controlledCharacter && v.chars && v.chars[v.controlledCharacter]) { controlledName = v.chars[v.controlledCharacter].name; } var daughterCorruption = (v.chars && v.chars.daughter) ? v.chars.daughter.corruption : 0; var daughterFather = (v.chars && v.chars.daughter && v.chars.daughter.relations) ? v.chars.daughter.relations.father : 0; var daughterMother = (v.chars && v.chars.daughter && v.chars.daughter.relations) ? v.chars.daughter.relations.mother : 0; var fatherCorruption = (v.chars && v.chars.father) ? v.chars.father.corruption : 0; var fatherDaughter = (v.chars && v.chars.father && v.chars.father.relations) ? v.chars.father.relations.daughter : 0; var fatherMother = (v.chars && v.chars.father && v.chars.father.relations) ? v.chars.father.relations.mother : 0; var motherCorruption = (v.chars && v.chars.mother) ? v.chars.mother.corruption : 0; var motherDaughter = (v.chars && v.chars.mother && v.chars.mother.relations) ? v.chars.mother.relations.daughter : 0; var motherFather = (v.chars && v.chars.mother && v.chars.mother.relations) ? v.chars.mother.relations.father : 0; var timeText = "Morning"; if (v.timeNames && v.timeNames[time]) { timeText = v.timeNames[time]; } var weekdayText = "Monday"; if (v.dayNames && v.dayNames[v.weekDay]) { weekdayText = v.dayNames[v.weekDay]; } // HTML САЙДБАРА (английский) var sidebarHTML = '\ <div id="custom-sidebar">\ <h3>Ghost Chaos</h3>\ \ <!-- COMPACT CONTROL -->\ <div class="stat-block compact-control">\ <div class="stat-title">👻 QUICK CONTROL</div>\ <div class="compact-control-grid">\ <!-- DAUGHTER -->\ <div class="compact-char">\ <span class="compact-icon">👧</span>\ <button class="compact-btn free" id="btn-daughter" \ onclick="window.takeControlFromSidebar(\'daughter\')" \ title="Take/release: Daughter">\ D\ </button>\ <span class="compact-status" id="status-daughter">bedroom</span>\ </div>\ \ <!-- FATHER -->\ <div class="compact-char">\ <span class="compact-icon">👨</span>\ <button class="compact-btn free" id="btn-father" \ onclick="window.takeControlFromSidebar(\'father\')" \ title="Take/release: Father">\ F\ </button>\ <span class="compact-status" id="status-father">bathroom</span>\ </div>\ \ <!-- MOTHER -->\ <div class="compact-char">\ <span class="compact-icon">👩</span>\ <button class="compact-btn free" id="btn-mother" \ onclick="window.takeControlFromSidebar(\'mother\')" \ title="Take/release: Mother">\ M\ </button>\ <span class="compact-status" id="status-mother">kitchen</span>\ </div>\ </div>\ <div class="energy-hint">Control energy: 1</div>\ </div>\ \ <!-- STATISTICS -->\ <div class="stat-block">\ <div class="stat-title">📊 STATISTICS</div>\ <div>Energy: <b><span id="ui-energy">' + energy + '</span> / ' + maxEnergy + '</b></div>\ </div>\ \ <!-- CURRENT CONTROL -->\ <div class="stat-block">\ <div class="stat-title">👻 CURRENT CONTROL</div>\ <div id="ui-controlled">Control: ' + controlledName + '</div>\ </div>\ \ <!-- DAUGHTER -->\ <div class="stat-block">\ <div class="stat-title">👧 DAUGHTER</div>\ <div>Corruption: <span id="ui-daughter-corruption">' + daughterCorruption + '</span></div>\ <div>To father: <span id="ui-daughter-father">' + daughterFather + '</span></div>\ <div>To mother: <span id="ui-daughter-mother">' + daughterMother + '</span></div>\ </div>\ \ <!-- FATHER -->\ <div class="stat-block">\ <div class="stat-title">👨 FATHER</div>\ <div>Corruption: <span id="ui-father-corruption">' + fatherCorruption + '</span></div>\ <div>To daughter: <span id="ui-father-daughter">' + fatherDaughter + '</span></div>\ <div>To mother: <span id="ui-father-mother">' + fatherMother + '</span></div>\ </div>\ \ <!-- MOTHER -->\ <div class="stat-block">\ <div class="stat-title">👩 MOTHER</div>\ <div>Corruption: <span id="ui-mother-corruption">' + motherCorruption + '</span></div>\ <div>To daughter: <span id="ui-mother-daughter">' + motherDaughter + '</span></div>\ <div>To father: <span id="ui-mother-father">' + motherFather + '</span></div>\ </div>\ \ <!-- TIME -->\ <div class="stat-block">\ <div class="stat-title">⏰ TIME</div>\ <div>Day: <span id="ui-day">' + day + '</span></div>\ <div>Time: <span id="ui-time">' + timeText + '</span></div>\ <div>Weekday: <span id="ui-weekday">' + weekdayText + '</span></div>\ </div>\ \ <!-- UTILITIES -->\ <div class="stat-block">\ <div class="stat-title">⚙️ MANAGEMENT</div>\ <div class="utility-buttons">\ <button class="util-btn" onclick="window.saveGame()">\ <span class="util-btn-icon">💾</span> Save (Ctrl+S)\ </button>\ <button class="util-btn" onclick="window.loadGame()">\ <span class="util-btn-icon">📂</span> Load (Ctrl+L)\ </button>\ <button class="util-btn restart-btn" onclick="window.restartGame()">\ <span class="util-btn-icon">🔄</span> Restart (Ctrl+R)\ </button>\ </div>\ </div>\ </div>'; $("#story").prepend(sidebarHTML); $("#passages").css({ "margin-left": "300px", "width": "calc(100vw - 300px)" }); } updateAllUI(); } catch (error) { console.error("Ошибка при создании сайдбара:", error); } }, 50); }); // ===== ПРОВЕРКА ЭНЕРГИИ ===== window.canAct = function() { try { return State.variables.energy > 0; } catch (error) { console.error("Ошибка в canAct:", error); return false; } }; window.canSpendEnergy = function(amount) { try { var v = State.variables; return v.energy >= amount; } catch (error) { console.error("Ошибка в canSpendEnergy:", error); return false; } }; // ===== ТРАТА ЭНЕРГИИ ===== window.spendEnergy = function(amount) { try { var v = State.variables; if (v.energy < amount) { return false; } v.energy -= amount; if (v.energy > v.maxEnergy) v.energy = v.maxEnergy; return true; } catch (error) { console.error("Ошибка в spendEnergy:", error); return false; } }; // ===== ВОССТАНОВЛЕНИЕ ЭНЕРГИИ ===== window.restoreEnergy = function(amount) { try { var v = State.variables; v.energy += amount; if (v.energy > 10) v.energy = 10; updateAllUI(); } catch (error) { console.error("Ошибка в restoreEnergy:", error); } }; // ===== ОБРАБОТЧИК ПРИ СМЕНЕ ПАССАЖА ===== $(document).on(':passagestart', function () { try { var v = State.variables; if (v.energy <= 0) { v.choiceMadeFath = false; v.choiceMadeMom = false; if (SugarCube.Engine.activePassage.name === "UncurentFath" || SugarCube.Engine.activePassage.name === "UncurentMom" || SugarCube.Engine.activePassage.name === "DaughterRoom") { SugarCube.Engine.play("Hall"); } } } catch (error) { console.error("Ошибка в обработчике passagestart:", error); } }); // ===== ФУНКЦИЯ ПРОВЕРКИ КОНТРОЛЯ ===== window.isControlling = function(character) { try { var v = State.variables; return v.controlledCharacter === character; } catch (error) { console.error("Ошибка в isControlling:", error); return false; } }; // ===== УТИЛИТЫ ===== window.saveGame = function() { try { if (typeof Save !== 'undefined' && Save.slots && Save.slots.save) { Save.slots.save(0); } else { var saveData = { energy: State.variables.energy, day: State.variables.day, time: State.variables.time, chars: State.variables.chars, characterLocations: State.variables.characterLocations, controlledCharacter: State.variables.controlledCharacter, unlockedRooms: State.variables.unlockedRooms, timestamp: new Date().toISOString() }; localStorage.setItem('ghostRevengeSave', JSON.stringify(saveData)); alert("Game saved locally! (slot 0)"); } } catch (error) { console.error("Ошибка сохранения:", error); alert("Save error: " + error.message); } }; window.loadGame = function() { try { if (typeof Save !== 'undefined' && Save.slots && Save.slots.load) { Save.slots.load(0); } else { var saved = localStorage.getItem('ghostRevengeSave'); if (saved) { if (!confirm("Load saved game? Current progress will be lost.")) { return; } var saveData = JSON.parse(saved); State.variables.energy = saveData.energy || 3; State.variables.day = saveData.day || 1; State.variables.time = saveData.time || 1; State.variables.chars = saveData.chars || State.variables.chars; State.variables.characterLocations = saveData.characterLocations || State.variables.characterLocations; State.variables.controlledCharacter = saveData.controlledCharacter || null; State.variables.unlockedRooms = saveData.unlockedRooms || State.variables.unlockedRooms; alert("Game loaded from slot 0!\nSaved: " + (new Date(saveData.timestamp)).toLocaleString()); updateAllUI(); } else { alert("No saved games in slot 0!"); } } } catch (error) { console.error("Ошибка загрузки:", error); alert("Load error: " + error.message); } }; window.restartGame = function() { if (confirm("Start a new game? All progress will be lost.")) { if (typeof SugarCube.Engine.restart === 'function') { SugarCube.Engine.restart(); } else { window.location.reload(); } } }; // Быстрые клавиши $(document).on('keydown', function(e) { if (e.ctrlKey && e.key === 's') { e.preventDefault(); window.saveGame(); } if (e.ctrlKey && e.key === 'l') { e.preventDefault(); window.loadGame(); } if (e.ctrlKey && e.key === 'r') { e.preventDefault(); window.restartGame(); } }); // ===== СИСТЕМА ОБНАРУЖЕНИЯ ===== window.checkDetection = function(actor, target, location) { try { var v = State.variables; var detectionChance = 30; if (v.chars[target] && v.chars[target].corruption > 0) { detectionChance -= v.chars[target].corruption * 0.5; } var publicPlaces = ["Hall", "Kitchen", "LivingRoom"]; if (publicPlaces.includes(location)) { detectionChance += 10; } detectionChance = Math.max(5, Math.min(90, detectionChance)); var roll = Math.random() * 100; var detected = roll < detectionChance; console.log("Detection check: " + actor + " -> " + target + " in " + location + ", chance: " + detectionChance.toFixed(1) + "%, result: " + (detected ? "DETECTED" : "NOT DETECTED")); if (detected) { var penalty = -10; if (v.chars[actor] && v.chars[actor].relations[target]) { v.chars[actor].relations[target] += penalty; } if (v.chars[target] && v.chars[target].relations[actor]) { v.chars[target].relations[actor] += penalty; } v.lastDetection = { actor: actor, target: target, location: location, time: v.time, day: v.day }; } return detected; } catch (error) { console.error("Ошибка в checkDetection:", error); return false; } }; // ===== ДОБАВЛЯЕМ CSS ДЛЯ УВЕДОМЛЕНИЙ ===== $(document).on(':passagestart', function() { if (!$('#notification-styles').length) { var notificationCSS = '\ <style id="notification-styles">\ .control-notification {\ background: #4CAF50 !important;\ color: white !important;\ padding: 10px !important;\ margin: 10px 0 !important;\ border-radius: 5px !important;\ animation: fadeIn 0.5s, fadeOut 0.5s 2.5s forwards;\ }\ @keyframes fadeIn {\ from { opacity: 0; transform: translateY(-10px); }\ to { opacity: 1; transform: translateY(0); }\ }\ @keyframes fadeOut {\ from { opacity: 1; }\ to { opacity: 0; }\ }\ </style>'; $('head').append(notificationCSS); } }); // ===== МОБИЛЬНОЕ СВОРАЧИВАНИЕ САЙДБАРА ===== $(document).on(':passagestart', function() { setTimeout(function() { if ($("#mobile-toggle").length === 0 && $("#custom-sidebar").length > 0) { var toggleBtn = '<button id="mobile-toggle" class="mobile-toggle">☰</button>'; $("body").append(toggleBtn); $("#mobile-toggle").on("click", function() { $("#custom-sidebar").toggleClass("collapsed"); $(this).text($("#custom-sidebar").hasClass("collapsed") ? "☰" : "✕"); }); } if (window.innerWidth <= 768 && $("#custom-sidebar").length > 0) { $("#custom-sidebar").addClass("collapsed"); if ($("#mobile-toggle").length > 0) { $("#mobile-toggle").text("☰"); } } }, 200); }); // ===== ПРОВЕРКА ДОСТУПНОСТИ КОМНАТЫ ===== window.isRoomAvailable = function(roomCode) { var v = State.variables; var alwaysAvailable = ["Hall", "DaughterRoom", "ParentsRoom", "Kitchen"]; if (alwaysAvailable.includes(roomCode)) return true; if (v.unlockedRooms && v.unlockedRooms[roomCode]) { return true; } if (roomCode === "LivingRoom" && v.day >= 7) { return true; } return false; }; // ===== ПРОСТАЯ СИСТЕМА УВЕДОМЛЕНИЙ ===== window.showNotification = function(message, type = 'info') { var notification = document.createElement('div'); notification.style.cssText = 'position:fixed;top:20px;right:20px;background:#4CAF50;color:white;padding:15px;border-radius:5px;z-index:9999;max-width:300px;'; notification.innerHTML = message; document.body.appendChild(notification); setTimeout(function() { if (notification.parentNode) { notification.parentNode.removeChild(notification); } }, 3000); };
/* САЙДБАР */ #custom-sidebar { position: fixed; left: 0; top: 0; width: 280px; height: 100vh; background: #1a1a24; color: #fff; padding: 20px; overflow-y: auto; border-right: 2px solid #2a2a3a; z-index: 1000; box-sizing: border-box; } #custom-sidebar h3 { color: #f0c040; text-align: center; margin-bottom: 20px; border-bottom: 2px solid #333350; padding-bottom: 10px; } .stat-block { background: #222232; border: 1px solid #333350; border-radius: 8px; padding: 12px; margin-bottom: 15px; /* ← ИСПРАВЛЕНО! */ } /* МЕНЮ НАВИГАЦИИ В САЙДБАРЕ */ .sidebar-menu { background: #222232; border: 1px solid #333350; border-radius: 8px; padding: 10px 0; margin-bottom: 15px; } .sidebar-menu .stat-title { color: #f0c040; font-weight: bold; padding: 0 15px 10px 15px; border-bottom: 1px solid #333350; margin-bottom: 10px; font-size: 14px; } .sidebar-menu a { display: block; color: #e0e0ff; text-decoration: none; padding: 10px 15px; font-size: 14px; transition: all 0.2s; border-left: 3px solid transparent; } .sidebar-menu a:hover { background-color: #2a2a3a; border-left: 3px solid #f0c040; color: #ffffff; padding-left: 20px; } /* === КОМПАКТНЫЙ КОНТРОЛЬ === */ .compact-control { padding: 10px !important; } .compact-control-grid { display: flex; justify-content: space-between; gap: 8px; margin: 10px 0 5px 0; } .compact-char { display: flex; flex-direction: column; align-items: center; flex: 1; } .compact-icon { font-size: 1.5em; margin-bottom: 3px; opacity: 0.9; } .compact-btn { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #444; background: #2a2a3a; color: #e0e0ff; font-weight: bold; font-size: 1em; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; padding: 0; } .compact-btn:hover { transform: scale(1.1); border-color: #f0c040; box-shadow: 0 0 10px rgba(240, 192, 64, 0.4); } .compact-btn:active { transform: scale(0.95); } /* СВОБОДЕН (можно взять контроль) */ .compact-btn.free { background: #2a2a3a; border-color: #4CAF50; color: #4CAF50; } .compact-btn.free:hover { background: #4CAF50; color: white; } /* ПОД КОНТРОЛЕМ */ .compact-btn.controlled { background: #4CAF50; border-color: #4CAF50; color: white; } .compact-btn.controlled:hover { background: #d32f2f; border-color: #d32f2f; box-shadow: 0 0 10px rgba(211, 47, 47, 0.4); } /* НЕТ ЭНЕРГИИ */ .compact-btn.disabled { background: #333; border-color: #555; color: #888; cursor: not-allowed; } .compact-btn.disabled:hover { transform: none; box-shadow: none; border-color: #555; } /* СТАТУС ПОД КНОПКОЙ */ .compact-status { font-size: 0.7em; color: #aaa; margin-top: 3px; height: 12px; text-align: center; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* ПОДСКАЗКА ПО ЭНЕРГИИ */ .energy-hint { font-size: 0.8em; color: #888; text-align: center; margin-top: 8px; border-top: 1px dashed #333; padding-top: 8px; } /* === УТИЛИТЫ === */ .utility-buttons { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; } .util-btn { background: #2a2a3a; border: 1px solid #444; border-radius: 6px; color: #e0e0ff; padding: 10px 15px; text-align: center; cursor: pointer; font-size: 0.9em; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; } .util-btn:hover { background: #333350; border-color: #f0c040; color: white; transform: translateY(-2px); } .util-btn:active { transform: translateY(0); } .restart-btn { border-color: #d32f2f; color: #d32f2f; } .restart-btn:hover { background: #d32f2f; color: white; } .util-btn-icon { font-size: 1.1em; } /* ЗАКРЫТЫЕ КОМНАТЫ */ .locked-room { color: #888; font-size: 0.9em; padding: 8px 12px; background: rgba(255, 255, 255, 0.05); border-radius: 6px; margin: 5px 0; border-left: 3px solid #555; } /* СОБЫТИЯ В КОМНАТАХ */ .family-event { background: rgba(240, 192, 64, 0.1); border: 1px solid #f0c040; border-radius: 8px; padding: 15px; margin: 15px 0; } .family-event h3 { color: #f0c040; margin-top: 0; } .family-event a { display: inline-block; background: #f0c040; color: #1a1a24; padding: 8px 15px; border-radius: 4px; text-decoration: none; font-weight: bold; margin-top: 10px; } .family-event a:hover { background: #ffd54f; transform: translateY(-2px); } /* === АДАПТИВНЫЙ ДИЗАЙН ДЛЯ МОБИЛЬНЫХ === */ @media screen and (max-width: 1024px) { /* На планшетах уменьшаем сайдбар */ #custom-sidebar { width: 240px; padding: 15px; } #passages { margin-left: 240px !important; width: calc(100vw - 240px) !important; } } @media screen and (max-width: 768px) { /* На мобильных - сайдбар становится верхней панелью */ #custom-sidebar { position: relative; width: 100% !important; height: auto; max-height: 60vh; overflow-y: auto; border-right: none; border-bottom: 2px solid #2a2a3a; } #passages { margin-left: 0 !important; width: 100% !important; padding: 10px; } /* Скрываем неважное на мобильных */ .compact-status { display: none; } .stat-block:not(.compact-control) { display: none; } .compact-control { display: block !important; } /* Показываем кнопку для разворачивания */ .mobile-toggle { display: block; position: fixed; top: 10px; right: 10px; z-index: 1001; background: #4CAF50; color: white; border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 20px; cursor: pointer; } /* Свёрнутый режим */ #custom-sidebar.collapsed { max-height: 50px; overflow: hidden; padding: 5px 15px; } #custom-sidebar.collapsed .stat-block { display: none; } #custom-sidebar.collapsed .compact-control { display: none !important; } #custom-sidebar.collapsed h3 { margin-bottom: 0; padding-bottom: 5px; } } /* Улучшаем внешний вид для мобильных */ @media screen and (max-width: 480px) { .compact-control-grid { gap: 5px; } .compact-btn { width: 32px; height: 32px; font-size: 0.9em; } .compact-icon { font-size: 1.2em; } .rooms-container a { display: block; margin: 5px 0; padding: 10px; font-size: 1.1em; } }
<div id="custom-sidebar"> <button class="util-btn back-btn" onclick="SugarCube.Engine.backward()" title="Go back"> ⬅ Back </button> <h3>Ghost Chaos</h3> <div class="stat-block compact-control"> <div class="stat-title">👻 QUICK CONTROL</div> <div class="compact-control-grid"> <div class="compact-char"> <span class="compact-icon">👧</span> <button id="btn-daughter" class="compact-btn" onclick="takeControlFromSidebar('daughter')">D</button> <span id="status-daughter" class="compact-status"></span> </div> <div class="compact-char"> <span class="compact-icon">👨</span> <button id="btn-father" class="compact-btn" onclick="takeControlFromSidebar('father')">F</button> <span id="status-father" class="compact-status"></span> </div> <div class="compact-char"> <span class="compact-icon">👩</span> <button id="btn-mother" class="compact-btn" onclick="takeControlFromSidebar('mother')">M</button> <span id="status-mother" class="compact-status"></span> </div> </div> <div class="energy-hint">Control energy: 1</div> </div> <div class="stat-block"> <div class="stat-title">📊 STATISTICS</div> Energy: <b><span id="ui-energy">0</span> / 10</b> </div> <div class="stat-block"> <div class="stat-title">👻 CURRENT CONTROL</div> <div id="ui-controlled">Control: none</div> </div> <div class="stat-block"> <div class="stat-title">⏰ TIME</div> Day: <span id="ui-day">1</span><br> Time: <span id="ui-time">Morning</span><br> Weekday: <span id="ui-weekday">Monday</span> </div> <div class="stat-block"> <div class="stat-title">💰 MONEY</div> $<span id="ui-money">0</span> </div> <button class="util-btn" onclick="openRelations()">❤️ Relations</button> <div class="stat-block"> <div class="stat-title">💾 SAVE / LOAD</div> <button class="util-btn" onclick="SugarCube.UI.saves()"> 💾 Saves </button> <!-- опционально: быстрые кнопки --> <button class="util-btn" onclick="saveGame()">Quick Save</button> <button class="util-btn" onclick="loadGame()">Quick Load</button> </div>
WIP [[Hall]]
<<widget "WhoIsHere">> <<set _room = _args[0]>> <<set _here = []>> <<if $characterLocations and $characterLocations.daughter is _room>><<set _here.push("👧")>><</if>> <<if $characterLocations and $characterLocations.father is _room>><<set _here.push("👨")>><</if>> <<if $characterLocations and $characterLocations.mother is _room>><<set _here.push("👩")>><</if>> <<if _here.length is 0>> <span class="empty">Empty</span> <<else>> <span class="occupied">Present: <<print _here.join(" ")>></span> <</if>> <</widget>> <<widget "Spend">> <<set _n = _args[0] || 0>> <<run window.spendEnergy(_n)>> <<run updateAllUI()>> <</widget>> /* ========================= CARD (container) ========================= */ <<widget "Card">> <div class="room-card"> <<run new Wikifier(this.output, _contents)>> </div> <</widget>> /* ========================= ROOM WRAP (container) Usage: <<RoomWrap "Kitchen" "img/...png">> ... <</RoomWrap>> ========================= */ <<widget "RoomWrap">> <<set _title = _args[0] || "Room">> <<set _bg = _args[1] || "">> <div class="room" <<if _bg>>style="background-image:url('<<=_bg>>')"<</if>>> <div class="room-content"> <h2 class="room-title"><<=_title>></h2> <<run new Wikifier(this.output, _contents)>> </div> </div> <</widget>> /* ========================= ACTION BUTTON (container) Usage: <<ActionBtn "Text" "🍽️" 1 window.canSpendEnergy(1) "primary">> ... <</ActionBtn>> ========================= */ <<widget "ActionBtn">> <<set _label = _args[0]>> <<set _icon = _args[1]>> <<set _costN = _args[2]>> <<set _can = _args[3]>> <<set _tone = _args[4] || "">> <<set _costText = (_costN != null ? _costN + "⚡" : "")>> <<if _can>> <<link '<span class="action-btn ' + _tone + '"><span class="left"><span>' + _icon + '</span><span class="label">' + _label + '</span></span><span class="cost">' + _costText + '</span></span>'>> <<run new Wikifier(this.output, _contents)>> <</link>> <<else>> <span class="action-btn disabled"> <span class="left"><span><<= _icon >></span><span class="label"><<= _label >></span></span> <span class="cost"><<= _costText >></span> </span> <</if>> <</widget>> <<widget "BackToHall">> <div class="room-card"> <<link "⬅ Back to Hall" "Hall">><</link>> </div> <</widget>>
[[Hall]]
WIP [[Hall]]
WIP [[Hall]]
WIP [[Hall]]
<div id="main-content"> <div id="main-text"> <p> You are a ghost.<br> Bound to this house for years. </p> <p> Watching.<br> Waiting.<br> Learning. </p> <p> Then a family moves in. </p> <p> Walls fill with voices.<br> Rooms fill with habits, weaknesses, routines. </p> <p> They don’t know you exist.<br> But you know everything about them. </p> <p> And you feel it — </p> <p> This house is finally alive again. </p> <p> Something is about to start.<br> Something meant only for adults. </p> <hr> <p> <<link "▶ Start playing">> <<goto "Hall">> <</link>> </p> </div> </div>