Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
<div class="Title">
Lone Wolf
</div>
<div class="subtext">[[Sortie|Disclaimer]]</div><<set $pressure = 1.36>>
<<set $Depth = 45.0>>
<<set $Oxygen = 80.0>>
<<set $HullDmg = 5.0>>
<<set $FloodLvl = 0.0>>
<<set $speed = 3.8>>
<<set $IsBreached = false>>
<<set $OxygTimer = 60>>
<<set $EvasionStat = 0.4>>
<<set $DetectabilityStat = 0.6>>
<<set $EnemyDetected = false>>
<<set $EnemyPresence = false>>
<<set $EnemyDetection = 0>>
<<set $AreDetected = false>>
<<set $BeingAttacked = false>>
<<set $EnemyThreatLvl = 0>>
<<set $TRepairComplete to 300>>
<<set $EnemyHitRoll = 0>>
<<goto "Start">><div class="SubStatus">
<span>U-Boat Status</span>
<div class="StatusContent">
<p> Pressure: $pressure atm</p>
<p> Depth: $Depth ft</p>
<p id ="OLvl"> O~~2~~ Level: $Oxygen %</p>
<p> Speed: $speed Kn</p>
<p id ="Health"> Hull DMG: $HullDmg %</p>
<p id ="FloodLvl"> Flood Lvl: $FloodLvl %</p>
</div>
</div>
<div class="DT">
<<typewriter"You are the Captain of U-Boat U-677...\n \nAfter your last engagement with the enemy, your U-Boat suffered damage to its communications system and the sonar seems to be mulfunctioning. You cannot use communications or sonar to accurately pinpoint the location of the enemy or the other U-boats of your Wolfpack. You are in enemy waters, you must traverse carfully until communications and the sonar are repaired.\n \nSurrender is not an option...">>
</div>
<div class="subtext">
[[Resume Command]]
</div>
<div class="subtext">
[[Reset|Setup]]
</div>
<<cacheaudio "Ping" "https://freesound.org/data/previews/70/70299_1028972-lq.mp3">>
<<audio "Ping" volume 0.5>>
<<audio "Ping" loop play>>
<<cacheaudio "Explosion" "https://freesound.org/data/previews/147/147873_2101444-lq.mp3">><div class="SubStatus">
<span>U-Boat Status</span>
<div class="StatusContent">
<p> Pressure: $pressure atm</p>
<p> Depth: $Depth ft</p>
<p id ="OLvl"> O~~2~~ Level: $Oxygen %</p>
<p> Speed: $speed Kn</p>
<p id ="Health"> Hull DMG: $HullDmg %</p>
<p id ="FloodLvl"> Flood Lvl: $FloodLvl %</p>
</div>
</div>
<span id="countdown">$TRepairComplete seconds remaining until comms and sonar repairs are completed</span>
<<silently>>
<<repeat 1s>>
<<set $TRepairComplete to $TRepairComplete - 1>>
<<if $TRepairComplete gt 0>>
<<replace "#countdown">>$TRepairComplete seconds remaining until comms and sonar repairs are completed<</replace>>
<<else>>
<<goto "Escape">>
<<stop>>
<</if>>
<</repeat>>
<</silently>>
<div class="DT"><<typewriter"All is quiet...\n">></div>
<<nobr>>
<div class= "SubActions">
<div class = "Row">
<div class= "c1">[[Dive]]</div>
<div class= "c1"><<if $Depth >45>>[[Raise]]<</if>></div>
<div class= "c1"><<if $Depth ==45>>[[Breach]]<</if>>
</div><div class= "c1"><<if $Depth >0>>[[Emergency Breach]]<</if>></div>
</div>
<div class = "Row">
<div class= "c2">[[Stop]]</div>
<div class= "c2">[[1/4 speed]]</div>
<div class= "c2">[[1/2 speed]]</div>
<div class= "c2">[[3/4 speed]]</div>
<div class= "c2">[[Full speed]]</div>
</div>
<div class = "Row">
<div class= "c3"><<if $Depth <= 45>>[[Periscope]]<</if>></div>
</div>
</div>
<</nobr>>
<div class="subtext">
[[Reset|Setup]]
</div>
<<repeat 1s>>
<<if $Oxygen < 0>>
<<goto "Ran Out of 02">>
<</if>>
<</repeat>>
<<if $EnemyPresence == false>>
<<if random(0,1) == 1>>
<<set $EnemyPresence = true>>
<</if>>
<</if>>
<<if $EnemyPresence == true>>
<<if $EnemyThreatLvl == 0>>
<<set $EnemyThreatLvl = random(1,3)>>
<</if>>
<</if>>
<<if $Depth == 0>>
<<set $IsBreached = true>>
<<else>>
<<set $IsBreached = false>>
<</if>>
<<if $Depth >= 820>>
<<goto "Too Deep">>
<</if>>
<<if $IsBreached == false>>
<<repeat 1s>>
<<set $Oxygen -= 0.5>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</repeat>>
<<else>>
<<repeat 1s>>
<<if $Oxygen < 100.0>>
<<set $Oxygen += 3>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</if>>
<</repeat>>
<</if>>
<<silently>>
<<if $Depth is 0>>
<<set $DetectabilityStat = 0.8>>
<</if>>
<<if $Depth >0 and $Depth <= 45>>
<<set $DetectabilityStat = 0.6>>
<</if>>
<<if $Depth > 45 and $Depth <= 225>>
<<set $DetectabilityStat = 0.4>>
<</if>>
<<if $Depth > 225 and $Depth <= 405>>
<<set $DetectabilityStat = 0.2>>
<</if>>
<<if $Depth > 405 and $Depth <= 600>>
<<set $DetectabilityStat = 0.2>>
<</if>>
<<if $Depth > 600>>
<<set $DetectabilityStat = 0.1>>
<</if>>
<</silently>>
<<silently>>
<<if $Depth == 0 and $speed == 0>>
<<set $EvasionStat = 0.1>>
<</if>>
<<if $Depth >0 and $Depth <= 45 and $speed is 0>>
<<set $EvasionStat = 0.2>>
<</if>>
<<if $Depth > 45 and $Depth <= 225 and $speed is 0>>
<<set $EvasionStat = 0.3>>
<</if>>
<<if $Depth > 225 and $Depth <= 405 and $speed is 0>>
<<set $EvasionStat = 0.4>>
<</if>>
<<if $Depth > 405 and $Depth <= 600 and $speed is 0>>
<<set $EvasionStat = 0.5>>
<</if>>
<<if $Depth > 600 and $Speed is 0>>
<<set $EvasionStat = 1>>
<</if>>
<<if $Depth == 0 and $speed == 1.9>>
<<set $EvasionStat = 0.2>>
<</if>>
<<if $Depth >0 and $Depth <= 45 and $speed is 1.9>>
<<set $EvasionStat = 0.3>>
<</if>>
<<if $Depth > 45 and $Depth <= 225 and $speed is 1.9>>
<<set $EvasionStat = 0.4>>
<</if>>
<<if $Depth > 225 and $Depth <= 405 and $speed is 1.9>>
<<set $EvasionStat = 0.5>>
<</if>>
<<if $Depth > 405 and $Depth <= 600 and $speed is 1.9>>
<<set $EvasionStat = 0.6>>
<</if>>
<<if $Depth > 600 and $Speed is 1.9>>
<<set $EvasionStat = 1>>
<</if>>
<<if $Depth == 0 and $speed == 3.8>>
<<set $EvasionStat = 0.3>>
<</if>>
<<if $Depth >0 and $Depth <= 45 and $speed is 3.8>>
<<set $EvasionStat = 0.4>>
<</if>>
<<if $Depth > 45 and $Depth <= 225 and $speed is 3.8>>
<<set $EvasionStat = 0.5>>
<</if>>
<<if $Depth > 225 and $Depth <= 405 and $speed is 3.8>>
<<set $EvasionStat = 0.6>>
<</if>>
<<if $Depth > 405 and $Depth <= 600 and $speed is 3.8>>
<<set $EvasionStat = 0.7>>
<</if>>
<<if $Depth > 600 and $Speed is 3.8>>
<<set $EvasionStat = 1>>
<</if>>
<<if $Depth == 0 and $speed == 5.7>>
<<set $EvasionStat = 0.4>>
<</if>>
<<if $Depth >0 and $Depth <= 45 and $speed is 5.7>>
<<set $EvasionStat = 0.5>>
<</if>>
<<if $Depth > 45 and $Depth <= 225 and $speed is 5.7>>
<<set $EvasionStat = 0.6>>
<</if>>
<<if $Depth > 225 and $Depth <= 405 and $speed is 5.7>>
<<set $EvasionStat = 0.7>>
<</if>>
<<if $Depth > 405 and $Depth <= 600 and $speed is 5.7>>
<<set $EvasionStat = 0.8>>
<</if>>
<<if $Depth > 600 and $Speed is 5.7>>
<<set $EvasionStat = 1>>
<</if>>
<<if $Depth == 0 and $speed == 7.6>>
<<set $EvasionStat = 0.5>>
<</if>>
<<if $Depth >0 and $Depth <= 45 and $speed is 7.6>>
<<set $EvasionStat = 0.6>>
<</if>>
<<if $Depth > 45 and $Depth <= 225 and $speed is 7.6>>
<<set $EvasionStat = 0.7>>
<</if>>
<<if $Depth > 225 and $Depth <= 405 and $speed is 7.6>>
<<set $EvasionStat = 0.8>>
<</if>>
<<if $Depth > 405 and $Depth <= 600 and $speed is 7.6>>
<<set $EvasionStat = 0.9>>
<</if>>
<<if $Depth > 600 and $Speed is 7.6>>
<<set $EvasionStat = 1>>
<</if>>
<</silently>>
<<silently>>
<<if $EnemyPresence == true and $AreDetected == false>>
<<set $EnemyDetection = randomFloat(1.0)>>
<<if $EnemyDetection < $DetectabilityStat>>
<<set $AreDetected = true>>
<<set $BeingAttacked = true>>
<</if>>
<<if $EnemyDetection > $DetectabilityStat>>
<<set $AreDetected = false>>
<<set $BeingAttacked = false>>
<</if>>
<</if>>
<</silently>>
<<if $BeingAttacked == true>>
<<goto "Being Attacked">>
<</if>>
<div class="subtext">
<<typewriter "You give the order to dive\n">>
<<timed 1s>>
.
<<next>>
.
<<next>>
.
<</timed>>
</div>
<<if $Depth >=45>>
<<set $Depth += 90.0>>
<<set $pressure += 2.73>>
<</if>>
<<if $Depth < 45>>
<<set $Depth = 45.0>>
<<set $pressure = 1.36>>
<</if>>
<<if $EnemyPresence == false>>
<<if random(0,1) == 1>>
<<set $EnemyPresence = true>>
<</if>>
<</if>>
<<if $EnemyPresence == true>>
<<if $EnemyThreatLvl == 0>>
<<set $EnemyThreatLvl = random(1,3)>>
<</if>>
<</if>>
<<timed 4s>><<goto "Resume Command">><</timed>>
<<silently>>
<<if $IsBreached == false>>
<<repeat 1s>>
<<set $Oxygen -= 0.5>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</repeat>>
<<else>>
<<repeat 1s>>
<<if $Oxygen < 100.0>>
<<set $Oxygen += 3>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</if>>
<</repeat>>
<</if>>
<</silently>><div class="subtext">
<<typewriter "You give the order to raise depth...\n">>
</div>
<<set $Depth -= 90.0>>
<<set $pressure -= 2.73>>
<<if $EnemyPresence == false>>
<<if random(0,1) == 1>>
<<set $EnemyPresence = true>>
<</if>>
<</if>>
<<if $EnemyPresence == true>>
<<if $EnemyThreatLvl == 0>>
<<set $EnemyThreatLvl = random(1,3)>>
<</if>>
<</if>>
<<timed 4s>><<goto "Resume Command">><</timed>>
<<silently>>
<<if $IsBreached == false>>
<<repeat 1s>>
<<set $Oxygen -= 0.5>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</repeat>>
<<else>>
<<repeat 1s>>
<<if $Oxygen < 100.0>>
<<set $Oxygen += 3>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</if>>
<</repeat>>
<</if>>
<</silently>><div class="subtext">
<<typewriter "You look through the periscope...">>
<<nobr>>
<<if $EnemyPresence == false>>
<<if random(0,1) == 1>>
<<set $EnemyPresence = true>>
<</if>>
<</if>>
<<if $EnemyPresence == true>>
<<if $EnemyThreatLvl == 0>>
<<set $EnemyThreatLvl = random(1,3)>>
<</if>>
<<timed 4s>>
<<if $EnemyThreatLvl == 1>>
You Spot an enemy destroyer!
<<set $EnemyDetected = true>>
<</if>>
<<if $EnemyThreatLvl == 2>>
You Spot an enemy scouting fleet consisting of 2 enemy destroyers!
<<set $EnemyDetected = true>>
<</if>>
<<if $EnemyThreatLvl == 3>>
You Spot the enemy fleet consisting of 5 enemy destroyers, 2 Cruisers and 1 Battleship!
<<set $EnemyDetected = true>>
<</if>>
<</timed>>
<</if>>
<</nobr>>
</div>
<<timed 6s>><<goto "Resume Command">><</timed>><div class="subtext">
<<typewriter "You give the order to emergency breach...">>
</div>
<<set $Depth = 0.0>>
<<set $pressure = 0.01>>
<<if $EnemyPresence == false>>
<<if random(0,1) == 1>>
<<set $EnemyPresence = true>>
<</if>>
<</if>>
<<if $EnemyPresence == true>>
<<if $EnemyThreatLvl == 0>>
<<set $EnemyThreatLvl = random(1,3)>>
<</if>>
<</if>>
<<timed 4s>><<goto "Resume Command">><</timed>>
<<silently>>
<<if $IsBreached == false>>
<<repeat 1s>>
<<set $Oxygen -= 0.5>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</repeat>>
<<else>>
<<repeat 1s>>
<<if $Oxygen < 100.0>>
<<set $Oxygen += 3>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</if>>
<</repeat>>
<</if>>
<</silently>><div class="subtext">
<<typewriter "You give the order to stop...">>
</div>
<<set $speed = 0.0>>
<<if $EnemyPresence == false>>
<<if random(0,1) == 1>>
<<set $EnemyPresence = true>>
<</if>>
<</if>>
<<if $EnemyPresence == true>>
<<if $EnemyThreatLvl == 0>>
<<set $EnemyThreatLvl = random(1,3)>>
<</if>>
<</if>>
<<timed 4s>><<goto "Resume Command">><</timed>>
<<silently>>
<<if $IsBreached == false>>
<<repeat 1s>>
<<set $Oxygen -= 0.5>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</repeat>>
<<else>>
<<repeat 1s>>
<<if $Oxygen < 100.0>>
<<set $Oxygen += 3>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</if>>
<</repeat>>
<</if>>
<</silently>><div class="subtext">
<<typewriter "You give the order to move at 1/4 speed...">>
</div>
<<set $speed = 1.9>>
<<if $EnemyPresence == false>>
<<if random(0,1) == 1>>
<<set $EnemyPresence = true>>
<</if>>
<</if>>
<<if $EnemyPresence == true>>
<<if $EnemyThreatLvl == 0>>
<<set $EnemyThreatLvl = random(1,3)>>
<</if>>
<</if>>
<<timed 4s>><<goto "Resume Command">><</timed>>
<<silently>>
<<if $IsBreached == false>>
<<repeat 1s>>
<<set $Oxygen -= 0.5>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</repeat>>
<<else>>
<<repeat 1s>>
<<if $Oxygen < 100.0>>
<<set $Oxygen += 3>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</if>>
<</repeat>>
<</if>>
<</silently>><div class="subtext">
<<typewriter "You give the order to move at 1/2 speed...">>
</div>
<<set $speed = 3.8>>
<<if $EnemyPresence == false>>
<<if random(0,1) == 1>>
<<set $EnemyPresence = true>>
<</if>>
<</if>>
<<if $EnemyPresence == true>>
<<if $EnemyThreatLvl == 0>>
<<set $EnemyThreatLvl = random(1,3)>>
<</if>>
<</if>>
<<timed 4s>><<goto "Resume Command">><</timed>>
<<silently>>
<<if $IsBreached == false>>
<<repeat 1s>>
<<set $Oxygen -= 0.5>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</repeat>>
<<else>>
<<repeat 1s>>
<<if $Oxygen < 100.0>>
<<set $Oxygen += 3>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</if>>
<</repeat>>
<</if>>
<</silently>><div class="subtext">
<<typewriter "You give the order to move at 3/4 speed...">>
</div>
<<set $speed = 5.7>>
<<if $EnemyPresence == false>>
<<if random(0,1) == 1>>
<<set $EnemyPresence = true>>
<</if>>
<</if>>
<<if $EnemyPresence == true>>
<<if $EnemyThreatLvl == 0>>
<<set $EnemyThreatLvl = random(1,3)>>
<</if>>
<</if>>
<<timed 4s>><<goto "Resume Command">><</timed>>
<<silently>>
<<if $IsBreached == false>>
<<repeat 1s>>
<<set $Oxygen -= 0.5>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</repeat>>
<<else>>
<<repeat 1s>>
<<if $Oxygen < 100.0>>
<<set $Oxygen += 3>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</if>>
<</repeat>>
<</if>>
<</silently>><div class="subtext">
<<typewriter "You give the order to move at Full speed...">>
</div>
<<set $speed = 7.6>>
<<if $EnemyPresence == false>>
<<if random(0,1) == 1>>
<<set $EnemyPresence = true>>
<</if>>
<</if>>
<<if $EnemyPresence == true>>
<<if $EnemyThreatLvl == 0>>
<<set $EnemyThreatLvl = random(1,3)>>
<</if>>
<</if>>
<<timed 4s>><<goto "Resume Command">><</timed>>
<<silently>>
<<if $IsBreached == false>>
<<repeat 1s>>
<<set $Oxygen -= 0.5>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</repeat>>
<<else>>
<<repeat 1s>>
<<if $Oxygen < 100.0>>
<<set $Oxygen += 3>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</if>>
<</repeat>>
<</if>>
<</silently>><<nobr>>
<div class="subtext">
<div id="text">
<<typewriter"
This is a work of fiction, set in a fictional World War 2 scenario.\n
\n
It does not depict any of the real events that have occured during that period.\n
">>
</div>
</div>
<</nobr>>
<<timed 10s>>
<<goto "Setup">>
<</timed>><div class="subtext">
<<typewriter "You give the order to breach...\n">>
</div>
<<set $Depth = 0.0>>
<<set $pressure = 0.01>>
<<if $EnemyPresence == false>>
<<if random(0,1) == 1>>
<<set $EnemyPresence = true>>
<</if>>
<</if>>
<<if $EnemyPresence == true>>
<<if $EnemyThreatLvl == 0>>
<<set $EnemyThreatLvl = random(1,3)>>
<</if>>
<</if>>
<<timed 4s>><<goto "Resume Command">><</timed>>
<<silently>>
<<if $IsBreached == false>>
<<repeat 1s>>
<<set $Oxygen -= 0.5>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</repeat>>
<<else>>
<<repeat 1s>>
<<if $Oxygen < 100.0>>
<<set $Oxygen += 3>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</if>>
<</repeat>>
<</if>>
<</silently>><div class="subtext">
<<typewriter "You failed to replenish Oxygen Supplies, by surfacing. You and your crew suffocate to death...">>
[[Retry|Setup]] [[End]]
</div>
<<audio "Ping" stop>><div class="Title">
Lone Wolf
</div>
<div class="subtext">By Marco Prinsloo</div>
<div class="subtext">
[[Reset|Setup]]
</div><div class="subtext">
<<typewriter "You went to Deep...">>
<<timed 3s>>
<<goto "DeathCrush">>
<</timed>>
</div>
<div class="subtext">
<<typewriter "You begin to hear creaking as the metal of the U-boat begins to cave in under the immense pressure...">>
<<timed 7s>>
<<goto "DeathCrush2">>
<</timed>>
</div><div class="subtext">
<<typewriter "The U-boat starts to flood as the pressure rips and crushes it...">>
<<timed 6s>>
<<goto "DeathCrush3">>
<</timed>>
</div><div class="subtext">
<<typewriter "You and your crew are crushed under the pressures of the deep...">>
[[Retry|Setup]] [[End]]
</div>
<<audio "Ping" stop>><div class="subtext">
<<typewriter "The repairs on the comms and sonar were completed. You and your crew manage to contact the rest of the wolf pack and avoid any further engagments with the enemy. You meet up with the wolf pack and succesfully complete you operations before heading back to harbor.">>
[[Play Again|Setup]] [[End]]
</div>
<<audio "Ping" stop>><<shakescreen 3s>>
<div class="SubStatus">
<span>U-Boat Status</span>
<div class="StatusContent">
<p> Pressure: $pressure atm</p>
<p> Depth: $Depth ft</p>
<p id ="OLvl"> O~~2~~ Level: $Oxygen %</p>
<p> Speed: $speed Kn</p>
<p id ="Health"> Hull DMG: $HullDmg %</p>
<p id ="FloodLvl"> Flood Lvl: $FloodLvl %</p>
</div>
</div>
<span id="countdown">$TRepairComplete seconds remaining until comms and sonar repairs are completed</span>
<<silently>>
<<repeat 1s>>
<<set $TRepairComplete to $TRepairComplete - 1>>
<<if $TRepairComplete gt 0>>
<<replace "#countdown">>$TRepairComplete seconds remaining until comms and sonar repairs are completed<</replace>>
<<else>>
<<goto "Escape">>
<<stop>>
<</if>>
<</repeat>>
<</silently>>
<div class="DT"><<typewriter "The enemy has DETECTED you!They are ATTACKING!\n">></div>
<<nobr>>
<div class= "SubActions">
<div class = "Row">
<div class= "c1">[[Dive]]</div>
<div class= "c1"><<if $Depth >45>>[[Raise]]<</if>></div>
<div class= "c1"><<if $Depth ==45>>[[Breach]]<</if>>
</div><div class= "c1"><<if $Depth >0>>[[Emergency Breach]]<</if>></div>
</div>
<div class = "Row">
<div class= "c2">[[Stop]]</div>
<div class= "c2">[[1/4 speed]]</div>
<div class= "c2">[[1/2 speed]]</div>
<div class= "c2">[[3/4 speed]]</div>
<div class= "c2">[[Full speed]]</div>
</div>
<div class = "Row">
<div class= "c3"><<if $Depth <= 45>>[[Periscope]]<</if>></div>
</div>
</div>
<</nobr>>
<div class="subtext">
[[Reset|Setup]]
</div>
<<repeat 1s>>
<<if $Oxygen < 0>>
<<goto "Ran Out of 02">>
<</if>>
<</repeat>>
<<if $EnemyPresence == false>>
<<if random(0,1) == 1>>
<<set $EnemyPresence = true>>
<</if>>
<</if>>
<<if $EnemyPresence == true>>
<<if $EnemyThreatLvl == 0>>
<<set $EnemyThreatLvl = random(1,3)>>
<</if>>
<</if>>
<<if $Depth == 0>>
<<set $IsBreached = true>>
<<else>>
<<set $IsBreached = false>>
<</if>>
<<if $Depth >= 820>>
<<goto "Too Deep">>
<</if>>
<<if $IsBreached == false>>
<<repeat 1s>>
<<set $Oxygen -= 0.5>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</repeat>>
<<else>>
<<repeat 1s>>
<<if $Oxygen < 100.0>>
<<set $Oxygen += 3>>
<<replace "#OLvl">>O~~2~~ Level: $Oxygen %<</replace>>
<</if>>
<</repeat>>
<</if>>
<<silently>>
<<if $Depth is 0>>
<<set $DetectabilityStat = 0.8>>
<</if>>
<<if $Depth >0 and $Depth <= 45>>
<<set $DetectabilityStat = 0.6>>
<</if>>
<<if $Depth > 45 and $Depth <= 225>>
<<set $DetectabilityStat = 0.4>>
<</if>>
<<if $Depth > 225 and $Depth <= 405>>
<<set $DetectabilityStat = 0.2>>
<</if>>
<<if $Depth > 405 and $Depth <= 600>>
<<set $DetectabilityStat = 0.2>>
<</if>>
<<if $Depth > 600>>
<<set $DetectabilityStat = 0.1>>
<</if>>
<</silently>>
<<silently>>
<<if $Depth == 0 and $speed == 0>>
<<set $EvasionStat = 0.1>>
<</if>>
<<if $Depth >0 and $Depth <= 45 and $speed is 0>>
<<set $EvasionStat = 0.2>>
<</if>>
<<if $Depth > 45 and $Depth <= 225 and $speed is 0>>
<<set $EvasionStat = 0.3>>
<</if>>
<<if $Depth > 225 and $Depth <= 405 and $speed is 0>>
<<set $EvasionStat = 0.4>>
<</if>>
<<if $Depth > 405 and $Depth <= 600 and $speed is 0>>
<<set $EvasionStat = 0.5>>
<</if>>
<<if $Depth > 600 and $Speed is 0>>
<<set $EvasionStat = 1>>
<</if>>
<<if $Depth == 0 and $speed == 1.9>>
<<set $EvasionStat = 0.2>>
<</if>>
<<if $Depth >0 and $Depth <= 45 and $speed is 1.9>>
<<set $EvasionStat = 0.3>>
<</if>>
<<if $Depth > 45 and $Depth <= 225 and $speed is 1.9>>
<<set $EvasionStat = 0.4>>
<</if>>
<<if $Depth > 225 and $Depth <= 405 and $speed is 1.9>>
<<set $EvasionStat = 0.5>>
<</if>>
<<if $Depth > 405 and $Depth <= 600 and $speed is 1.9>>
<<set $EvasionStat = 0.6>>
<</if>>
<<if $Depth > 600 and $Speed is 1.9>>
<<set $EvasionStat = 1>>
<</if>>
<<if $Depth == 0 and $speed == 3.8>>
<<set $EvasionStat = 0.3>>
<</if>>
<<if $Depth >0 and $Depth <= 45 and $speed is 3.8>>
<<set $EvasionStat = 0.4>>
<</if>>
<<if $Depth > 45 and $Depth <= 225 and $speed is 3.8>>
<<set $EvasionStat = 0.5>>
<</if>>
<<if $Depth > 225 and $Depth <= 405 and $speed is 3.8>>
<<set $EvasionStat = 0.6>>
<</if>>
<<if $Depth > 405 and $Depth <= 600 and $speed is 3.8>>
<<set $EvasionStat = 0.7>>
<</if>>
<<if $Depth > 600 and $Speed is 3.8>>
<<set $EvasionStat = 1>>
<</if>>
<<if $Depth == 0 and $speed == 5.7>>
<<set $EvasionStat = 0.4>>
<</if>>
<<if $Depth >0 and $Depth <= 45 and $speed is 5.7>>
<<set $EvasionStat = 0.5>>
<</if>>
<<if $Depth > 45 and $Depth <= 225 and $speed is 5.7>>
<<set $EvasionStat = 0.6>>
<</if>>
<<if $Depth > 225 and $Depth <= 405 and $speed is 5.7>>
<<set $EvasionStat = 0.7>>
<</if>>
<<if $Depth > 405 and $Depth <= 600 and $speed is 5.7>>
<<set $EvasionStat = 0.8>>
<</if>>
<<if $Depth > 600 and $Speed is 5.7>>
<<set $EvasionStat = 1>>
<</if>>
<<if $Depth == 0 and $speed == 7.6>>
<<set $EvasionStat = 0.5>>
<</if>>
<<if $Depth >0 and $Depth <= 45 and $speed is 7.6>>
<<set $EvasionStat = 0.6>>
<</if>>
<<if $Depth > 45 and $Depth <= 225 and $speed is 7.6>>
<<set $EvasionStat = 0.7>>
<</if>>
<<if $Depth > 225 and $Depth <= 405 and $speed is 7.6>>
<<set $EvasionStat = 0.8>>
<</if>>
<<if $Depth > 405 and $Depth <= 600 and $speed is 7.6>>
<<set $EvasionStat = 0.9>>
<</if>>
<<if $Depth > 600 and $Speed is 7.6>>
<<set $EvasionStat = 1>>
<</if>>
<</silently>>
<<silently>>
<<if $BeingAttacked == true>>
<<repeat 3s>>
<<if $EnemyThreatLvl == 1 >>
<<set $EnemyHitRoll = randomFloat(1.0)>>
<</if>>
<<if $EnemyThreatLvl == 2 >>
<<set $EnemyHitRoll = randomFloat(1.0)+0.1>>
<</if>>
<<if $EnemyThreatLvl == 3 >>
<<set $EnemyHitRoll = randomFloat(1.0)+0.3>>
<</if>>
<<if $IsBreached == true >>
<<set $EnemyHitRoll = $EnemyHitRoll+0.5>>
<</if>>
<<if $EnemyHitRoll > $EvasionStat>>
<<set $HullDmg = $HullDmg + 5>>
<<shakescreen 1s>>
<<replace "#Health">> Hull DMG: $HullDmg %<</replace>>
<<audio "Explosion" play>>
<<>>
<</if>>
<<if $HullDmg >= 100>>
<<goto "Death">>
<</if>>
<<if $HullDmg >= 40 and $HullDmg < 80>>
<<repeat 1s>>
<<set $FloodLvl = $FloodLvl + 1>>
<<replace "#FloodLvl">> Flood Lvl: $FloodLvl % <</replace>>
<</repeat>>
<</if>>
<<if $HullDmg >= 80>>
<<repeat 1s>>
<<set $FloodLvl = $FloodLvl + 2>>
<<replace "#FloodLvl">> Flood Lvl: $FloodLvl %<</replace>>
<</repeat>>
<</if>>
<<if $FloodLvl >= 80>>
<<goto "Sinking">>
<</if>>
<</repeat>>
<</if>>
<</silently>>
<<if $Depth > 600 and $AreDetected == true>>
<<set $AreDetected = false>>
<<set $BeingAttacked = false>>
<</if>>
<<if $BeingAttacked == false>>
<<goto "Resume Command">>
<</if>>
<div class="subtext">
<<typewriter "Your U-Boat has suffered critical damage and begins to sink rapidly! There is now way to escape the flooding steel coffin...\n \nYou and your crew suffer death at sea...\n">>
[[Retry|Setup]] [[End]]
</div>
<<audio "Ping" stop>><div class="subtext">
<<typewriter "The U-boat has suffered too may ruptures! The rate of flooding can not be stopped and the U-boat can no longer raise. The U-boat slowly begins to sink as the flooding increases...\n \nThere is no escape for you and your crew...\n \nYou and your crew drown in your flooded Sarcophagus as it sinks to the ocean floor...">>
[[Retry|Setup]] [[End]]
</div>
<<audio "Ping" stop>><<nobr>>
<<widget typewriter>>
<!-- Create a SPAN with an ID -->
<span id="typewriter"></span>
<!-- In SugarCube, arrays start at 0 -->
<<set _textArrayLength to 0>>
<!-- Repeat every second -->
<<repeat 0.05s>>
<!-- Test if textArrayLength is greater than length of $args[0] -->
<<if _textArrayLength gte $args[0].length>>
<<stop>>
<<else>>
<!-- Append the current position to the existing characters -->
<<append "#typewriter">>$args[0][_textArrayLength]<</append>>
<!-- Update the length -->
<<set _textArrayLength++>>
<</if>>
<</repeat>>
<</widget>>
<</nobr>>