<!-- Predisplay -->
<!-- Sort the archive into alphabetical order -->
<<set $archive.filed to $archive.filed.sort()>>
<!-- Display -->
<div class='container'>
<div class= 'sidebox' style='font-family:monospace'>
<<for _index to 0; _index lt $archive.filed.length; _index++>>
<<set _artKey to $archive.filed[_index].key>>
<<set _artName to setup.artefacts[_artKey].name>>
<<capture _artKey, _index>>
<<link _artName>>
<<append '#textshift'>>
<br><br><span class='capitalize'><b><<print setup.artefacts[_artKey].name>></b></span><br>
<b>Found:</b> Spring <<print $archive.filed[_index].day>><br>
<b>Location:</b> <<print setup.maps[setup.artefacts[_artKey].map].name>><br>
<<print setup.artefacts[_artKey].scan_description>>
<</append>>
<<scrolldown>>
<</link>><br>
<</capture>>
<</for>>
</div>
<div class='mainbox'>
<div class='imagebox'>
<<print_status>>
</div>
<div class='textbox' id='textshift' style='font-family:monospace'>
Archive viewer<br><br>
$archive.filed.length filed specimens
</div>
<div class='devicebox' style='font-family:monospace'>
[[Exit|Eidolon]]
</div>
</div>
</div><!-- Predisplay -->
<!-- Display -->
<div class='container'>
<div class='mainbox'>
<div class='emptybox'></div>
<div class='textbox'>
You plan on heading into the disturbance zone today, so on arrival drop everything in a locker and head straight for the staging rooms. Everything you take into the field is supplied by the specimens retrieval unit: sturdy boots, thick work gloves and a hiking pack already stocked with a medkit, a couple rations, water and field equipment and far more sunscreen than necessary. You had been worried they would make you wear something like military fatigues. The effect thankfully skews more "granola girl" than "infantry."<br><br>
And the portable monitoring device, not to forget that.<br><br>
So equipped, head for the [[Access Gate|FieldGuidance]].
</div>
<div class='emptybox'></div>
</div>
</div><!-- Predisplay -->
<<set _artefact_key to $artefacts[$artefactIndex].key>>
<!-- Display -->
<div class='container'>
<div class='mainbox'>
<div class='imagebox'>
<<print_status>>
</div>
<div class='textbox'>
<span class='capitalize'><b><<print setup.artefacts[_artefact_key].name>></b></span><br>
<<print setup.artefacts[_artefact_key].field_description>>
</div>
<div class='devicebox'>
<<link [[Take it|Map]]>>
<<set _artNew to {}>>
<<set _artNew.key to _artefact_key>>
<<set _artNew.day to $world.day>>
<<set $player.inventory.push(_artNew)>>
<<set $artefacts.splice($artefactIndex,1)>>
<</link>> 
[[Leave it|Map]]
</div>
</div>
</div><!-- Predisplay -->
<!-- Display -->
<div class='container'>
<div class='mainbox'>
<div class='imagebox'>
<<print_status>>
</div>
<div class='textbox'>
You pass beyond simple exhaustion, stumbling, heatsick, losing your way but unwilling to turn back. The ramifying landscape only seems to grow broader the further in you are pulled. Somepoint between stumbling and passing out, stumbling and passing out, you realise you could keep wandering into it forever, and you do.<br><br>
You disappear into the further reaches of the disturbance zone and are never heard from again.
</div>
<div class='devicebox'>
[[End|Start]]
</div>
</div>
</div><!-- Predisplay -->
<!-- Display -->
<div class='container'>
<div class='mainbox'>
<div class='imagebox'>
<<print_status>>
</div>
<div class='textbox' style='font-family:monospace'>
Welcome to EIDOLON imaging database<br><br>
<<if $archive.unfiled.length gt 0>>
$archive.unfiled.length specimens awaiting filing
<<else>>
No specimens awaiting filing
<</if>><br><br>
EDZ-RA-1982
</div>
<div class='devicebox' style='font-family:monospace'>
[[Archive]]  [[Filing]]  [[Log off|Station]]
</div>
</div>
</div><!-- Predisplay -->
<!-- Display -->
<div class='container'>
<div class='mainbox'>
<div class='imagebox'>
<<print_status>>
</div>
<div class='textbox'>
Finally back on stable ground and into a dimly lit space by the edge of another reservoir. Fed in part by the polluted stream through which you had passed, but also by several leaking tributaries, not all water, seeping through the cracked concrete walls, dribbling out of overflow pipes, feeling their way across the floor. As you realise where this might be the monitoring device shifts to sharp chirping. By which point you are being rushed, overwhelmed, engulfed faster than you can register. You last remember falling into the reservoir.<br><br>
You arrive back at the Access Gate some time later, missing most your equipment and on the verge of collapse. Another long session in the sickroom, which by this point is as familiar as the staging rooms or your desk, then finally home late in the evening, where all you can do is lay on the bathroom tiles sweating and shivering.<br><br>
You'll tender a resignation with the EDZ-CA. Another prospective field worker who could not handle it. But you do not need it anymore, see no further reason to travel out past the Access Gate, no further point in adding to the EIDOLON. The disturbance has got ahold of you and it will not let go again.
</div>
<div class='devicebox'>
[[End|Start]]
</div>
</div>
</div><!-- Predisplay -->
<!-- Display -->
<div class='container'>
<div class='mainbox'>
<div class='imagebox'>
<<print_status>>
</div>
<div class='textbox'>
You pass out from exhaustion. When you wake, you are in a sickroom somewhere back behind the Access Gate.<br><br>
<!-- Move any artefacts in staging into the unfiled section -->
<<if $archive.staging.length gt 0>>
<<for _index to 0; _index lt $archive.staging.length; _index++>>
<<set $archive.unfiled.push($archive.staging[_index])>>
<</for>>
<<set $archive.staging to []>>
<</if>>
<!-- Move any artefacts in the inventory into staging -->
<<if $player.inventory.length gt 0>>
Whatever specimens you collected, they are not with you.
<<for _index to 0; _index lt $player.inventory.length; _index++>>
<<set $archive.staging.push($player.inventory[_index])>>
<</for>>
<<set $player.inventory to []>>
A memo from Processing Services informs you it will take it least a day to scan new specimens. They will appear in your task list in EIDOLON when ready for filing.<br><br>
<</if>>
You are too tired too keep working. You rest in the sickroom a while longer, and catch a
<<link [[lift home|Home]]>>
<<set $hoursRested to (48-$world.hour)+12>>
<<set $energyReplenished to $hoursRested>>
<<set $player.energy to $player.energy+$energyReplenished>>
<<if $player.energy gt 100>>
<<set $player.energy to 100>>
<</if>>
<<set $world.day++>>
<<set $world.hour to 14>>
<<set $player.dream++>>
<</link>> with a colleague.
</div>
<div class='emptybox'></div>
</div>
</div><!-- Predisplay -->
<!-- Display -->
<div class='container'>
<div class='mainbox'>
<div class='emptybox'></div>
<div class='textbox'>
It takes the better part of a halfhour to find your way along the corridors and quarter-turn stairwells leading from the staging rooms to the first security gate, from there down another tangle of corridors and stairwells, then through the second and far more imposing Access Gate.<br><br>
And then, abruptly, you are on the other side of all those lines of fencing, at the outer edge of a wide band of fields, at the outer edge of the disturbance zone.<br><br>
Time to set out and [[look for specimens|Map]].
</div>
<div class='emptybox'></div>
</div>
</div><!-- Predisplay -->
<!-- Sort the archive into alphabetical order -->
<<set $archive.unfiled to $archive.unfiled.sort()>>
<!-- Display -->
<div class='container'>
<div class= 'sidebox' style='font-family:monospace'>
<<for _index to 0; _index lt $archive.unfiled.length; _index++>>
<<set _artKey to $archive.unfiled[_index].key>>
<<set _artName to setup.artefacts[_artKey].name>>
<<capture _artKey, _index>>
<<link _artName>>
<<replace '#textshift'>>
<span class='capitalize'><b><<print setup.artefacts[_artKey].name>></b></span><br>
<<print setup.artefacts[_artKey].scan_description>><br><br>
<i><<print setup.artefacts[_artKey].scan_commentary>></i><br><br>
<<if $player.energy gt 0>>
<<link [[File?|Filing]]>>
<<set $archive.filed.push($archive.unfiled[_index])>>
<<set $archive.unfiled.splice(_index,1)>>
<<set $player.energy-=2>>
<<set $world.hour++>>
<</link>>
<</if>>
<</replace>>
<</link>><br>
<</capture>>
<</for>>
</div>
<div class='mainbox'>
<div class='imagebox'>
<<print_status>>
</div>
<div class='textbox' id='textshift' style='font-family:monospace'>
Filing system<br><br>
Select a record
</div>
<div class='devicebox' style='font-family:monospace'>
[[Exit|Eidolon]]
</div>
</div>
</div><!-- Predisplay -->
<!-- Display -->
<div class='container'>
<div class='mainbox'>
<div class='imagebox'>
<<print_status>>
</div>
<div class='textbox'>
You are woken by the cockatoos and corellas.
<<if $player.dream lt setup.dreams.length-1>>
<<print setup.dreams[$player.dream]>>
<<else>>
<<print setup.dreams[setup.dreams.length-1]>>
<</if>><br><br>
On arrival, you can either head out [[into the field|Map]] or just as far as
<<link [[your desk|Station]]>>
<<if $archive.staging.length gt 0>>
<<for _index to 0; _index lt $archive.staging.length; _index++>>
<<set $archive.unfiled.push($archive.staging[_index])>>
<</for>>
<<set $archive.staging to []>>
<</if>>
<</link>>.
</div>
<div class='emptybox'>
</div>
</div>
</div><!-- Predisplay -->
<!-- Display -->
<div class='container'>
<div class= 'sidebox'>
<<set _intranetKeys to Object.keys(setup.intranet)>>
<b>SOPS</b><br>
<<for _index to 0; _index lt _intranetKeys.length; _index++>>
<<set _inKey to _intranetKeys[_index]>>
<<set _inName to setup.intranet[_inKey].name>>
<<if setup.intranet[_inKey].type is 'sop'>>
<<capture _inKey>>
<<link _inName>>
<<append '#textshift'>>
<br><br><b><<print setup.intranet[_inKey].name>></b><br>
<<print setup.intranet[_inKey].description>>
<</append>>
<<scrolldown>>
<</link>><br>
<</capture>>
<</if>>
<</for>>
[...]<br><br>
<b>Staff Submissions</b><br>
<<for _index to 0; _index lt _intranetKeys.length; _index++>>
<<set _inKey to _intranetKeys[_index]>>
<<set _inName to setup.intranet[_inKey].name>>
<<if setup.intranet[_inKey].type is 'staff'>>
<<capture _inKey>>
<<link _inName>>
<<append '#textshift'>>
<br><br><b><<print setup.intranet[_inKey].name>></b><br>
<<print setup.intranet[_inKey].description>>
<</append>>
<<scrolldown>>
<</link>><br>
<</capture>>
<</if>>
<</for>>
[...]
</div>
<div class='mainbox'>
<div class='imagebox'>
<<print_status>>
</div>
<div class='textbox' id='textshift'>
Welcome to the EDZ-CA Staff Intranet. Staff are welcome to edit pages and post materials; however, please remain mindful of the Content Policy and EDZ-CA Values and Code of Conduct.
</div>
<div class='devicebox'>
[[Exit intranet|Station]]
</div>
</div>
</div><!-- Predisplay -->
<!-- Display -->
<div class='container'>
<div class= 'sidebox'>
<<for _index to 0; _index lt $player.inventory.length; _index++>>
<<set _artKey to $player.inventory[_index].key>>
<<set _artName to setup.artefacts[_artKey].name>>
<<capture _artKey>>
<<link _artName>>
<<replace '#textshift'>>
<span class='capitalize'><b><<print setup.artefacts[_artKey].name>></b></span><br>
<<print setup.artefacts[_artKey].field_description>>
<</replace>>
<</link>><br>
<</capture>>
<</for>>
<<link 'monitoring device'>>
<<set _artKey to 'monitoring_device'>>
<<replace '#textshift'>>
<span class='capitalize'><b><<print setup.artefacts[_artKey].name>></b></span><br>
<<print setup.artefacts[_artKey].field_description>>
<</replace>>
<</link>><br>
<<link 'torch'>>
<<set _artKey to 'torch'>>
<<replace '#textshift'>>
<span class='capitalize'><b><<print setup.artefacts[_artKey].name>></b></span><br>
<<print setup.artefacts[_artKey].field_description>>
<</replace>>
<</link>><br>
<<for _index to 0; _index lt $player.rations; _index++>>
<<link [[rations|Inventory]]>>
<<set $player.rations-->>
<<set $player.energy+=10>>
<</link>><br>
<</for>>
</div>
<div class='mainbox'>
<div class='imagebox'>
<<print_status>>
</div>
<div class='textbox' id='textshift'>
You search your pack.
</div>
<div class='devicebox'>
[[Close pack|Map]]
</div>
</div>
</div><!-- Predisplay -->
<!-- Display -->
<div class='container'>
<div class='mainbox'>
<div class='imagebox'>
<<print_status>>
</div>
<div class='textbox'>
<b><<print setup.maps[$player.map].name>></b><br>
<<print setup.maps[$player.map].description>>
<!-- Check for artefacts -->
<<for _index to 0; _index lt $artefacts.length; _index++>>
<<if $artefacts[_index].map is $player.map>>
<<capture _index>>
<<set _artefact_key to $artefacts[_index].key>>
<<set _artefact_name to setup.artefacts[_artefact_key].name>>
You notice the [[_artefact_name|Artefact][$artefactIndex to _index]].
<</capture>>
<</if>>
<</for>>
<!-- Check player energy -->
<<if $player.energy lt 10>>
<br><br>You are close to passing out.
<<elseif $player.energy lt 15>>
<br><br>You are exhausted.
<<elseif $player.energy lt 25>>
<br><br>You are tired.
<</if>>
</div>
<div class='devicebox'>
Exits are: 
<<if $player.map is 'access_trail'>>
[[Access gate|Return][$world.hour++]] 
<</if>>
<<for _index to 0; _index lt setup.maps[$player.map].exits.length; _index++>>
<<set _exitKey to setup.maps[$player.map].exits[_index]>>
<<set _exitName to setup.maps[_exitKey].name>>
<<capture _exitKey>>
<<if $player.energy gt 4>>
[[_exitName|Map][$player.map to _exitKey, $player.energy-=5, $world.hour++]] 
<<else>>
<<if setup.maps[$player.map].safe is true>>
[[_exitName|Exhaustion][$player.map to 'access_trail', $player.energy-=5, $world.hour++]] 
<<else>>
[[_exitName|Disappear]] 
<</if>>
<</if>>
<</capture>>
<</for>>
<<if $player.map is 'final_tunnel'>>
[[Reservoir|Ending]] 
<</if>>[[Check inventory|Inventory]]
</div>
</div>
</div><!-- Predisplay -->
<!-- Display -->
<div class='container'>
<div class='mainbox'>
<div class='imagebox'>
<<print_status>>
</div>
<div class='textbox'>
You pass back through the Access Gate, but are directed on the return trip into an airgap, through a decontamination room, then another airgap.<br><br>
<!-- Move any artefacts in staging into the unfiled section -->
<<if $archive.staging.length gt 0>>
<<for _index to 0; _index lt $archive.staging.length; _index++>>
<<set $archive.unfiled.push($archive.staging[_index])>>
<</for>>
<<set $archive.staging to []>>
<</if>>
<!-- Move any artefacts in the inventory into staging -->
<<if $player.inventory.length gt 0>>
You surrender the specimens found in this session.
<<for _index to 0; _index lt $player.inventory.length; _index++>>
<<set _artefact_key to $player.inventory[_index].key>>
<<set $archive.staging.push($player.inventory[_index])>>
The <<print setup.artefacts[_artefact_key].name>>.
<</for>>
<<set $player.inventory to []>>
Processing Services inform you it will take a day to scan new specimens. They will appear in your task list in EIDOLON when ready for filing.
<<else>>
You have no specimens to surrender.
<</if>><br><br>
Return to your [[desk|Station]].
</div>
<div class='emptybox'>
</div>
</div>
</div><!-- Predisplay -->
<!-- Display -->
<div class='container'>
<div class='mainbox'>
<div class='imagebox'>
<<print_status>>
</div>
<div class='textbox'>
You can tell who came in today just to do their deskwork, from who has just returned from the field, based on how much of a fugue state they seem to be in. Possibly harder to tell with the ones who have been here longer, the ones who have learned to live with it. How does it affect their filing, doing it after spending however many hours hiking into the disturbance zone?<br><br>
<<if $archive.unfiled.length gt 0>>
You have unfiled specimens lighting up the task list.
<<else>>
You have no unfiled specimens in the task list.
<</if>>
</div>
<div class='devicebox'>
[[EIDOLON|Eidolon]] [[Intranet]] <<link [[Finish your day|Home]]>>
<<set $hoursRested to (48-$world.hour)+12>>
<<set $energyReplenished to $hoursRested>>
<<set $player.energy to $player.energy+$energyReplenished>>
<<if $player.energy gt 100>>
<<set $player.energy to 100>>
<</if>>
<<set $player.rations to 3>>
<<set $world.day++>>
<<set $world.hour to 14>>
<<set $player.dream++>>
<<set _artList to []>>
<<for _index to 0; _index lt $artefacts.length; _index++>>
<<set _artList.push($artefacts[_index].key)>>
<</for>>
<<if not _artList.includes('index_card_two')>>
<<set _new_artefact to {}>>
<<set _new_artefact.key to 'index_card_two'>>
<<set _new_artefact.map to setup.artefacts[_new_artefact.key].map>>
<<set $artefacts.push(_new_artefact)>>
<</if>>
<</link>>
</div>
</div>
</div><!-- Display -->
<div class='container'>
<div class='mainbox'>
<div class='imagebox'>
Eidolon
</div>
<div class='textbox_empty'>
[img[splash_invert.gif]]
</div>
<div class='devicebox'>
[[Start|GameInit]]
</div>
</div>
</div><!-- Predisplay -->
<!-- Create some temporary key arrays -->
<<set _artefact_keys to Object.keys(setup.artefacts)>>
<<set _map_keys to Object.keys(setup.maps)>>
<!-- Setup and place artefacts -->
<!-- Todo: right now this is random, but as the map comes together artefact placement should be ~~very~~ deliberate, in service of the story -->
<<set $artefacts to []>>
<<for _index to 0; _index lt _artefact_keys.length; _index++>>
<<set _new_artefact to {}>>
<<set _new_artefact.key to _artefact_keys[_index]>>
<<set _new_artefact.map to setup.artefacts[_new_artefact.key].map>>
<<set $artefacts.push(_new_artefact)>>
<</for>>
<!-- Setup an empty archive which will hold artefacts, and a holding array for artefacts which have been found, but not "processed" -->
<<set $archive to {}>>
<<set $archive.filed to []>>
<<set $archive.unfiled to []>>
<<set $archive.staging to []>>
<!-- Setup player -->
<<set $player to {}>>
<<set $player.inventory to []>>
<<set $player.map to 'access_trail'>>
<<set $player.energy to 50>>
<<set $player.dream to 0>>
<<set $player.rations to 3>>
<!-- Setup world -->
<<set $world to {}>>
<<set $world.day to 1>>
<<set $world.hour to 16>>
<<set $world.weather to 'clear'>>
<!-- Display -->
<div class='container'>
<div class='mainbox'>
<div class='emptybox'></div>
<div class='textbox'>
You wake, or are woken rather, by the screeching cockatoos and corellas, their shadows visible through the curtains wheeling in the open space between the buildings. An endless, exhausting dream or several dreams bleeding one into the other of trudging through paddock after dry dusty paddock. Your calves are still sore but you are getting [[used to it|Arrival]].
</div>
<div class='emptybox'></div>
</div>
</div><!-- Print status bar -->
<<widget 'print_status'>>
Spring Day <<print $world.day>> Energy: <<print $player.energy>>
<</widget>>