/* 1. 오디오 설정: "bgm_horror"라는 이름으로 음원 등록 */
<<cacheaudio "bgm_horror" "https://files.catbox.moe/0q8878.mp3">>
/* 늑대 하울링 사운드 추가 */
<<cacheaudio "wolf_howl" "https://files.catbox.moe/ds6yy7.mp3">>
/* 2. 시스템 변수 설정 */
<<set $house = "None">> /* 현재 지은 집의 종류 (Straw, Wood, Brick) */
<<set $trainCount = 0>> /* 전투 훈련 횟수 (최대 4회) */
<<set $intelCount = 0>> /* 정보 수집 횟수 (최대 2회) */
<<set $hasTrap = false>> /* 함정 설치 여부 (true/false) */
<<set $restCount = 0>> /* 남은 시간을 휴식으로 전환한 총 시간 */
<<set $time = 10>> /* 남은 골든 타임 (10시간에서 차감) *//* 개발 중에만 사용하고 제출 전엔 지우세요 \
<div style="font-size: 0.8em; color: yellow;">
DEBUG: House=$house, Time=$time, Train=$trainCount, Intel=$intelCount, Trap=$hasTrap
</div>\
\*/
/* [2] 상태 바 */\
<h2 class="fade-in">Time Remaining: <span class="time-warning">$time hours</span></h2>\
<hr>\
\
/* [1] 활동 로그 표시 */\
<div id="action-log" style="min-height: 2em; color: #00ffcc; font-style: italic; border-left: 3px solid #00ffcc; padding-left: 10px; margin-bottom: 10px;">\
<<if $lastAction>>$lastAction<<else>>Make your move, the sun is setting...\<</if>>\
</div>\
\
/* [3] 행동 선택 */\
<<if $time > 0>>\
<<if $house == "None">>\
<p>Choose your shelter wisely:</p>
[[Build Straw House (1h)|PreparationHub][$house = "Straw", $time -= 1, $lastAction = "You quickly tied some straw together. It feels... drafty."]]
[[Build Wood House (3h)|PreparationHub][$house = "Wood", $time -= 3, $lastAction = "You chopped logs and built a sturdy wooden frame. It smells like sap."]]
[[Build Brick House (7h)|PreparationHub][$house = "Brick", $time -= 7, $lastAction = "You laid heavy bricks one by one. Your muscles ache, but the walls are solid."]]
<<else>>\
<p>What will you do before the moon rises?</p>\
\
/* 훈련 */
<<if $time >= 2>>\
* [[Train Combat (2h)|PreparationHub][$trainCount += 1, $time -= 2, $lastAction = "You practiced your strikes until your hands bled. You feel sharper."]]\
<</if>>\
\
/* 정보 수집: 로직을 링크 밖으로 빼서 오류 방지 */
<<if $intelCount < 2 and $time >= 2>>\
* <<link "Gather Intel (2h)">>\
<<set $intelCount += 1>>\
<<set $time -= 2>>\
<<if $intelCount == 1>>\
<<set $lastAction = "You discovered a fatal weakness: the beast's breathing becomes erratic when he lunges. A sharp blow to the solar plexus could paralyze him.">>\
<<else>>\
<<set $lastAction = "You found a way to provoke him. You can practically hear his rage... Should I try to bait him?">>\
<</if>>\
<<goto "PreparationHub">>\
<</link>>\
<<elseif $intelCount >= 2>>\
<span class="disabled-text">(No more intel needed. You know his secrets.)</span>\
<</if>>\
\
/* 함정 설치 */
<<if $hasTrap == false and $time >= 3>>\
* [[Set a Trap (3h)|PreparationHub][$hasTrap = true, $time -= 3, $lastAction = "You carefully set a concealed trap at the entrance. Without this, even a provoked beast can't be caught."]]\
<<elseif $hasTrap == true>>\
<span class="disabled-text">(The trap is already set.)</span>\
<</if>>\
\
<hr>\
/* 휴식 */\
* [[Rest until Sunset (Finish the Day)|PreparationHub][$restCount = $time, $time = 0, $lastAction = "You closed your eyes for a moment. You hope this rest was enough to outrun the shadow."]]\
<</if>>\
<<else>>\
<div class="fade-in">\
<p style="color:red; font-weight:bold;">The sun has completely set. The forest is eerily quiet...</p>
[[He is here...|WolfEncounter]]\
</div>\
<</if>>\<h1 style="color:red;">THE THREE LITTLE PIGS</h1>
\
<div class="fade-in">
You have finally left the safety of your mother’s pen.
The winter wind carries a whisper you cannot ignore...
\
<br><br>\
<<timed 3s>>
[[ENTER THE WOODS|The_Warning]]
<</timed>>
</div>
/* 게임을 다시 시작할 때마다 변수를 초기화하는 로직 추가 */
<<set $house = "None">>
<<set $trainCount = 0>>
<<set $intelCount = 0>>
<<set $hasTrap = false>>
<<set $restCount = 0>>
<<set $time = 10>><div style="text-align: center; margin-bottom: 15px;">\
<img src="https://i.imgur.com/BBffJUP.png" style="max-width: 70%; height: auto;">
</div>\
\
<<audio "bgm_horror" play loop>>\
@@.fade-in;
The locals speak of a phantom, a beast of endless hunger.
They call it... ''The Werewolf.''
You have only ''10 hours'' until sunset.
Every choice counts. Every second is a step toward life or a cold grave.
@@\
[[Start Preparing|PreparationHub]]<h1 class="fade-in">THE FINAL MOMENT</h1>
\
/* [우선순위 1] 무조건 실패: 정보 2회인데 함정이 없을 때 (분노사) */\
<<if $intelCount >= 2 and $hasTrap == false>>
<p>You mocked the beast, whispering his darkest secrets through the walls. You thought you were in control, but you had no cage for the monster you unleashed.</p>
\
<<if $house == "Straw">>
<p>He doesn't even bother huffing and puffing. In a blind rage, he tears your straw hut apart with his bare claws and finds you shivering inside.</p>
<<elseif $house == "Wood">>
<p>The wolf splinters your wooden door in a single, violent leap. Your insults die in your throat as his shadow looms over you.</p>
<<else>>
<p>Even the brick walls couldn't save you from his fury. He finds a way in through pure, unadulterated hatred, driven by your cold provocations.</p>
<</if>>
<h2 style="color:red;">DEATH: RECKLESS PROVOCATION</h2>
\
/* [우선순위 2] 무조건 성공: 정보 2회 + 함정 설치 (Strategic Victory) */\
<<elseif $intelCount >= 2 and $hasTrap == true>>
<p>Strategic Mastery. You lured the wolf into a psychological trap, using his own traumas against him. As he lunges forward in a mindless rage...</p>
\
<<if $house == "Straw">>
<p>He ignores the flimsy straw walls and leaps straight into the pit you concealed right behind the threshold. The beast is yours.</p>
<<elseif $house == "Wood">>
<p>The wolf crashes through the wooden door, but his eyes are clouded with anger. He doesn't see the heavy deadfall trap until it's too late.</p>
<<else>>
<p>The wolf climbs to the chimney, fueled by the secrets you shouted. He drops down, expecting a victim, but lands directly into the reinforced cage you prepared.</p>
<</if>>
<h2 style="color:green;">VICTORY: STRATEGIC PROVOCATION</h2>
\
/* 여기서부터 이제 개별 집 로직(Wood, Brick 등)이 이어짐 */\
\
/* -------------------------------------------\
[1] 벽돌 집 (Brick) 전용 로직 (굴뚝 침투 중심)\
------------------------------------------- */\
<<elseif $house == "Brick">>
<p>The wolf huffs and puffs, but your brick walls are immovable. Snarling in frustration, he spots the chimney and begins to climb...</p>
\
<<if $hasTrap>>
/* 함정 설치 시: 원작 엔딩 */\
<p>The beast slides down the flue, expecting a meal—but finds only your deadly trap. He howls in agony as he meets his end.</p>
<h2 style="color:green;">VICTORY: THE TRAP WORKED</h2>
\
<<elseif $restCount >= 3>>
/* 충분한 휴식 시: 지친 늑대를 따돌리고 도주 성공 */\
<p>The wolf finally drops down the chimney, but you were ready. Thanks to your long rest, your body is light and fast. You bolt out the door the moment he lands.</p>
<p>The wolf, exhausted from hours of clawing at bricks and climbing, tries to pursue you—but he collapses in the snow, unable to keep up. You have escaped.</p>
<h2 style="color:green;">VICTORY: OUTLASTED THE BEAST</h2>
\
<<else>>
/* 휴식 부족 시: 도망쳤으나 곧 붙잡힘 */\
<p>The wolf drops down the chimney, and you scramble out the front door to escape. However, because you didn't rest enough, your legs feel like lead.</p>
<p>The exhausted wolf limps after you, and despite his fatigue, he slowly gains ground. You collapse from exhaustion just as his jaws close around you.</p>
<h2 style="color:red;">DEATH: FATIGUE WAS YOUR UNDOING</h2>
<</if>>
\
/* -------------------------------------------\
[2] 나무 집 (Wood) 로직: 늑대 체력 60% 상태\
------------------------------------------- */\
<<elseif $house == "Wood">>
<p>The wolf flings his massive body against your wooden walls. Splinters fly as the timber begins to crack. Finally, the door gives way...</p>\
\
<<if $trainCount >= 2 and $restCount >= 3>>\
/* [성공 1] 정면 대결 승리 */\
<p>The wolf is gasping for air. You, fully rested, use your combat training to deliver a decisive strike with a sharpened wooden shard. He flees into the night.</p>
<h2 style="color:green;">VICTORY: THE DEFENDER</h2>
\
<<elseif $intelCount >= 1 and $trainCount >= 1 and $restCount >= 3>>
/* [성공 2] 전술적 도주 승리 */\
<p>You remember the weakness you discovered—the wolf's erratic breathing. As he bursts through the splintered door, you step into his guard and deliver a crushing blow to his solar plexus.</p>
<p>The beast gasps for air, his body seizing up for a crucial moment. You don't waste a second; you leap through the window and vanish into the night before he can recover. He is too winded to give chase.</p>
<h2 style="color:green;">VICTORY: TACTICAL SURVIVOR</h2>
\
<<elseif $restCount <= 1>>\
/* [실패 1] 과로사: 휴식이 1시간 이하인 경우 (통합) */\
<p>You pushed yourself too far. You spent almost every waking moment preparing, but you forgot that even the strongest heart needs rest. As the wolf breaks in, your muscles seize up and your heart gives out under the strain.</p>
<p>The beast doesn't even have to fight. He just claims the prize of a warrior who worked himself to death. How ironic.</p>
<h2 style="color:red;">DEATH: OVERWROUGHT BODY</h2>
\
<<elseif $restCount >= 7>>\
/* [실패 2] 방만사 (도주 실패) */\
<p>You spent all your time sleeping, believing that 7 hours of rest would let you outrun anything. You bolt out the door with full strength, feeling faster than ever.</p>
<p>But reality is cruel. You’re a well-rested pig, but he is a hungry wolf. He overtakes you in seconds. No matter how much you sleep, you can't outrun the food chain.</p>
<h2 style="color:red;">DEATH: THE ILLUSION OF SPEED</h2>
\
<<else>>\
/* [실패 3] 일반 실패 */\
<p>The wood splinters fly into your eyes, blinding you for a crucial second.</p>
\
<<if $hasTrap>>
<p>You hoped the trap you set at the front door would stop him, but this is no mindless animal. The wolf calmly steps over your clumsy snare, mocking your effort with a low, guttural growl.</p>
<<else>>
<p>You tried to prepare, but without proper defenses or training, your movements are sluggish.</p>
<</if>>
\
<p>The beast finds your throat before you find your footing.</p>
<h2 style="color:red;">DEATH: UNDERPREPARED</h2>
<</if>>
\
/* -------------------------------------------\
[3] 볏짚 집 (Straw) 로직: 방어력 0, 긴장감 최상\
------------------------------------------- */\
<<else>>
<p>The wolf takes a deep breath, his chest swelling to an impossible size. With a single, mighty huff, your straw house disintegrates into a cloud of dust and yellow stalks. You are standing completely exposed in the cold night air.</p>\
\
<<if $trainCount >= 3 and $restCount >= 3>>\
/* [성공 1] 기적적인 정면 승리: 훈련 3회 + 휴식 3회 */\
<p>The wolf leaps, thinking you are an easy prey. But you have spent every waking hour honing your body. You slide under his claws and deliver a devastating blow to his ribcage.</p>
<p>Shocked by the strength of a ''mere pig,'' the wounded beast retreats into the woods, howling in pain and disbelief. You survived the impossible.</p>
<h2 style="color:green;">VICTORY: THE ULTIMATE WARRIOR</h2>
\
<<elseif $trainCount >= 2 and $intelCount >= 1 and $restCount >= 3>>
/* [성공 2] 처절한 도주 승리 */\
<p>Your house is gone, but your mind is sharp. You remember that a quick, heavy blow to the beast's solar plexus can paralyze his breathing for several seconds.</p>
<p>As the wolf lunges through the dust, you deliver a precise, trained strike to his chest. The monster gasps, his golden eyes widening in shock. Before he can regain his breath, your legs carry you deep into the woods. You survived by a hair's breadth.</p>
<h2 style="color:green;">VICTORY: MIRACULOUS ESCAPE</h2>
\
<<elseif $restCount <= 1>>\
/* [실패 1] 과로사: 휴식이 1시간 이하인 경우 (통합) */\
<p>The wolf huffs and puffs, but you don't even move. He walks up to find that your heart has already stopped from the sheer intensity of your preparation without a single moment of real rest.</p>
<p>You killed yourself before the wolf could even touch you. A bit ironic, isn't it?</p>
<h2 style="color:red;">DEATH: OVERWROUGHT BODY</h2>
\
<<elseif $restCount >= 9>>\
/* 방만사: 볏짚에서 잠만 자다 도망치려 함 (더 비꼬는 말투) */\
<p>You heard the warnings, yet your "grand plan" was a 9-hour nap in a pile of straw. As your house flies away, you spring into a sprint with your perfectly rested legs, thinking you've actually got a chance.</p>
<p>What a pathetic joke. Did you really think sleeping in a pile of snacks would make you faster than a werewolf? He catches you in three massive bounds, laughing at your desperate struggle to run. You weren't a survivor; you were just a meal that kept itself fresh.</p>
<h2 style="color:red;">DEATH: BORN TO BE A SNACK</h2>
\
<<else>>\
/* [실패 3] 일반 실패 */\
<p>The straw offered no protection. You are standing completely exposed.</p>
\
<<if $hasTrap>>
<p>You desperately point toward the trap you laid on the ground, but the wolf just stares at it and sneers. He isn't blinded by rage yet, and a simple trap in plain sight won't catch a predator like him.</p>
<<else>>
<p>Your lack of preparation offered no hope. The wolf's shadow falls over you immediately.</p>
<</if>>
\
<p>It wasn't even a hunt. It was just a snack for him.</p>
<h2 style="color:red;">DEATH: UNDERPREPARED</h2>
<</if>>
<</if>>
<br>
<div style="text-align: center;">
<<link "Try Again?">>
<<run Engine.restart()>>
<</link>>
</div><div style="text-align: center;">\
/* 1. 패시지 진입하자마자 하울링 재생 */\
<<audio "bgm_horror" stop>>\
<<audio "wolf_howl" play>>\
\
/* 2. 하울링 소리에 집중할 수 있게 3.5초 뒤에 텍스트 등장 */\
<<timed 3.5s>>\
<div class="fade-in">\
<div style="text-align: center; margin-bottom: 20px;">\
<img src="https://i.imgur.com/CacMvGY.png" style="max-width: 80%; height: auto;">
</div>
<h1 style="color:red;">AROOOO...!!!</h1>
<p>The chilling howl echoes through the forest, vibrating in your very bones.</p>
\
<p>From the deep shadows, a pair of glowing yellow eyes stares at you.
The Werewolf has arrived at your ''$house house''.</p>
\
/* 늑대 상태 묘사 */\
<<if $house == "Straw">>
<p>He looks monstrous and full of energy. A single breath could blow your home away.</p>
<<elseif $house == "Wood">>
<p>He looks slightly winded, his claws scratched from breaking through the thicket.</p>
<<else>>
<p>He is panting heavily, frustrated by the impenetrable brick walls.</p>
<</if>>
\
<br>
[[Face the Beast|WolfArrival]]
</div>
<</timed>>
</div>