Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
Loading…
,,,,,,,,<<if visited() == 1>>You awaken in a vast clearing of green and white. You should probably consider making some shelter for the night. If i could <em>gather</em> some wood and <em>craft</em> myself a small house, I could <em>use</em> that.<<else>>
You are in the clearing.<</if>>
<<if Flag("hasHouse")>>You see your [[homestead|Homestead]] standing firm in the snow.<</if>>
You can gather <<gather 'wood' 'wood' 10 10>><<if $inventory.has('axe')>> (with <<set _wl to ['wood', 'wood', 'wood']>><<gather 'axe' _wl 10 10>>)<</if>> here.
<<if $days > 0>>A path to the [[south|Forest Path]] leads deeper in to the forest.<</if>><<for _i, _n range $available_traits>><<capture _n>>
<<if $character.trait_levels[_n]>>\
<<set _lvl to $character.trait_levels[_n] + 1>>\
Upgrade <<link '_n'>><<dialog>><<addtrait _n>>\
<<if $character.trait_levels[_n] == 3>>\
Trait is max level. <<set $available_traits.delete(_n)>><</if>>
<</dialog>><<set $character.sp to $character.sp - 1>><<goto 'Home'>><</link>> to level _lvl.
<<else>>\
Learn <<link '_n'>><<dialog>><<addtrait _n>><<set $character.sp to $character.sp - 1>><<goto 'Home'>><</dialog>><</link>>
<</if>>\
<</capture>><</for>>
<<set $kaiserdebug to true>>
<<set $varcaption to "">>
<<include 'inventorystuff'>>
<<include 'musicstuff'>>
<<include 'npcs'>>
<<set $days to 0>>
<<set $acmd to "">>
<<set $commandset to "">>
<<set $pnotes to ['The notes system lets you take notes to remember specific things. Sometimes the game may also send messages here. Press the - button to delete notes, and the = to edit.']>>
<<set $party to []>>
<<set $allies_at_home to []>>
<<set $allies_at_home.push({"name":"Bailey", "traits":['animal', 'small']})>>
<<set $allies_at_home.push({"name":"Claire", "traits":['cute', 'agile']})>>
<<set $inventory to []>>
<<set $homechest to []>>
<<set $enemychest to []>>
<<newinventory '$inventory'>>
<<newinventory '$homechest'>>
<<newinventory '$enemychest'>>
<<set $available_traits to ['poison resist', 'tough', 'muscled', 'keen eye', 'parkour']>>
<<set $blueprints to []>>
<<set $blueprints.push({'name':'small home', 'resources':{'wood': 8}})>>
<<set $research to {}>>
<<set $character to {
"str": 1,
"dex": 1,
"int": 1,
"agi": 1,
"hp": 100,
"hpmax": 100,
"en": 100,
"enmax": 100,
"level": 1,
"exp": 0,
"sp": 0,
"weapon": "",
"armour": "",
"name": "",
"credits": 200,
"traits": [],
"trait_levels": {},
"ammo": {'battery': 100, '9mm': 0}
}>>
<<set $mprevious to "">>
<<set $music to true>>
<<set $mature to false>>
<<set $escaped to false>>
<<set $enemy to {}>>
<<link 'View Inventory'>>
<<dialog 'Inventory'>>\
!Inventory
<<if $inventory.toArray().length == 0>>Inventory is empty.<</if>>\
<<for _i, _name range $inventory.toArray()>><<capture _i, _name>>\
_name (<<link 'Use'>><<useitem _name _i>><</link>>)
<<set _inf to $invdef[_name]>><em><<if _inf>>_inf
<</if>></em><</capture>><</for>>\
<</dialog>>\
<</link>>
<<link 'View Character'>>
<<dialog 'Character'>>\
$character.name
Level: $character.level (<<print $character.exp>>% EXP)
$character.hp / $character.hpmax HP
$character.en / $character.enmax EN
Traits:
<<for _name, _count range $character.trait_levels>>
_name (_count)
<</for>>
<<if $party.length > 0>>
<<for _i, _name range $party>>
<<capture _name>>_name.name
_name.traits<</capture>>
<</for>>
<</if>>
<</dialog>>
<</link>>
<<if tags(passage()).contains("puzzle")>>
<<link "''Commands''">>
<<dialog 'aOS CMD'>><<include 'commandinput'>><</dialog>>
<</link>>
<<else>>
<<link "Commands">>
<<dialog 'aOS CMD'>><<include 'commandinput'>><</dialog>>
<</link>>
<</if>>
<<link 'Crafting'>>
<<dialog 'Crafting'>><<include 'crafting'>><</dialog>>
<</link>>
<<link 'Notes'>>
<<popup 'panelnotes'>>
<</link>><<audio ":playing" pause>>
<<audio $enemy.bgm volume 0 fadein>>
<<set $action to "">>
<<set $endcondition to 0>>/*1 - win, 2 - escaped, 3 - died*/
<<set $mprevious to previous()>>
<<clear '$enemychest'>>
<<pickup '$enemychest' $enemy.loot>>
<<set $battleturns to 0>>
<<goto 'Battle'>>
<<set $battleturns to $battleturns + 1>> TURN $battleturns
<<if $outdmg >= 0>>You did $outdmg damage to $enemy.name<</if>>\
<<set $outdmg to -1>>\
<<if $battleturns > 1 and random(10) > $enemy.speed and $enemy.str > 0>>\
<<set _min to $enemy.str - 5>><<set _max to $enemy.str + 5>>\
<<set _dmg to random(_min, _max)>>The enemy hits you for _dmg.
<<set $character.hp to $character.hp - _dmg>>\
<</if>>
$enemy.name has $enemy.hp health.
You have $character.hp health.
<<if $enemy.hp <= 0>>\
<<notify>>You strike $enemy.name and defeated it.<</notify>>\
<<set $endcondition to 1>>\
<<goto 'BattleEnd'>>\
<</if>>\
<<if $character.hp <= 0>>\
<<notify>>You died.<</notify>>\
<<set $endcondition to 3>>\
<<goto 'BattleEnd'>>\
<</if>>\
<<nobr>><<link 'Strike'>>
<<set _min to 0>><<set _max to 25>>\
<<set $outdmg to random(_min, _max)>>\
<<set $enemy.hp to $enemy.hp - $outdmg>>\
<<goto 'Battle'>>
<</link>>.
<<for _i, _name range clone($inventory.toArray())>><<capture _name>>
<<if $weaponchart[_name]>><<link 'Attack'>>\
<<set _min to $weaponchart[_name] - 5>><<set _max to $weaponchart[_name]>>\
<<set $outdmg to random(_min, _max)>>\
<<set $enemy.hp to $enemy.hp - $outdmg>>\
<<goto 'Battle'>><</link>> with <b>_name</b>.
<<elseif _name == "medkit">><<link 'Heal'>><<set $character.hp to $character.hp + 50>><<goto 'Battle'>><</link>> with <b>_name</b>.
<</if>>
<</capture>><</for>>
<</nobr>>
<<link 'Escape'>>
<<goto 'BattleEnd'>>
<<set $endcondition to 2>>
<<notify>>You try to escape.<</notify>>
<</link>>\<<if $endcondition == 1>>
You gain $enemy.credits credits.
<<if clone($enemychest.toArray()).length > 0>>They dropped some <<link 'loot'>><<dialog>><<linkedinventory 'Take' '$enemychest' '$inventory'>><</dialog>><</link>><</if>>
<<gainxp $enemy.exp>>
<<set $character.credits to $character.credits + $enemy.credits>>
Return to <<link 'last area'>><<goto $mprevious>><</link>>.
<<elseif $endcondition == 2>>
You ran away.
Return to <<link 'last area'>><<goto $mprevious>><</link>>.
<<elseif $endcondition == 3>>
You died. But this is a prototype so just go home.
[[Home]]
<</if>><<if $homechest.toArray().length == 0>>Chest is empty.<</if>>\
<<for _i, _name range $homechest.toArray()>><<capture _i, _name>>\
<<link 'Take'>>\
<<set _tmp to $homechest.toArray().deleteAt(_i)>>
<<pickup '$inventory' _tmp>><<dialog 'Chest Management'>><<include 'ChestTake'>><</dialog>><</link>> _name
<</capture>><</for>>
----
<<link 'Switch to Deposit'>><<dialog 'Chest Management'>><<include 'ChestDeposit'>><</dialog>><</link>><<if $inventory.toArray().length == 0>>Inventory is empty.<</if>>\
<<for _i, _name range $inventory.toArray()>><<capture _i, _name>>\
<<link 'Store'>>\
<<set _tmp to $inventory.toArray().deleteAt(_i)>>
<<pickup '$homechest' _tmp>><<dialog 'Chest Management'>><<include 'ChestDeposit'>><</dialog>><</link>> _name
<</capture>><</for>>
----
<<link 'Switch to Taking'>><<dialog 'Chest Management'>><<include 'ChestTake'>><</dialog>><</link>><<if tags().includes('named')>>
<<set $varcaption to "''Area'': "+passage()>>
<</if>>
<<if tags().includes('subarea')>>
<<set $varcaption2 to "("+passage()+")">>
<<elseif not tags().includes("keepsub")>>
<<set $varcaption2 to "">>
<</if>><<widget 'addtrait'>>\
<<if $character.trait_levels[$args[0]]>>\
<<set _lvl to $character.trait_levels[$args[0]] + 1>>\
<<set $character.trait_levels[$args[0]] to _lvl>>\
Trait $args[0] is now level _lvl.\
<<else>>\
<<set $character.trait_levels[$args[0]] to 1>>\
<<set $character.traits.push($args[0])>>\
You learned $args[0] trait.\
<</if>>\
<</widget>>\
<<widget 'shop'>>
//Your credits//: $character.credits
<<for _i, _array range $shopArray>>\
<<capture _i, _array>>\
<b>_array[0]</b> (_array[1])
<em><<if $invdef[_array[0]]>><<print $invdef[_array[0]]>> <<else>>Nothing special.<</if>></em>
<<if $character.credits >= _array[1]>><<link 'Buy'>>\
<<dialog>>\
You buy _array[0] for _array[1].
<<set $shopArray[0].delete(_array)>>
<<goto [[passage()]]>>\
<</dialog>>
<</link>><<else>>==Buy== (Can't afford)<</if>>
<</capture>>\
<</for>>\
<</widget>>
<<widget 'add_codex'>>
<<for _i, _name range $computer.codex>>
<<capture _name>>\
<<print '$args[0]'>>
<</capture>>
<</for>>
<</widget>>
<<widget 'gainxp'>>\
<<set $character.exp to $character.exp + $args[0]>>\
<<print 'You gained $args[0] EXP.<br><progress class="exp" @value="$character.exp" max="100"></progress> ($character.exp / 100)'>>
<<if $character.exp >= 100>>\
You gained a level!
<<set $character.level to $character.level + 1>>\
<<set $character.sp to $character.sp + 1>>\
<<set $character.exp to $character.exp - 100>><</if>>
<</widget>>
<<widget 'addcodex'>>\
<<set $computer.codex.push({"msg":$args[1], "name":$args[0]})>>\
<<if $args[2] == "print">>$args[1]\<</if>>
@@.fade-in-out;New codex data gained.@@\
<</widget>>
<<widget 'quickdialog'>>
<<dialog $args[1]>>$args[0]<</dialog>>
<</widget>>
<<widget 'randomencounter'>>\
<<if random(100) <= $args[0] and $mprevious != passage()>>\
<<set $enemy to $args[1]>>\
<<if $args[2]>>\
<<quickdialog '$enemy.name jumps at you.'>>
<<goto 'BattleStart'>>\
<<else>>\
A $enemy.name is here.
<<link 'Fight'>><<goto 'BattleStart'>><</link>>\
<</if>>\
<</if>>\
<</widget>>
<<widget 'kplay'>>\
<<if not $kaiserdebug>><<audio ":playing" stop>><<if $music>><<audio $args[0] loop play>><</if>><</if>>\
<</widget>>
<<widget 'takeenergy'>>\
<<set $character.en to $character.en - $args[0]>>\
Used $args[0] energy.
<<print '<progress @value="$character.en" max="100"></progress> ($character.en / $character.enmax)'>>\
<</widget>>
<<widget 'takedamage'>>\
<<set $character.hp to $character.hp - $args[0]>>\
<<print '<progress @value="$character.hp" max="100"></progress> ($character.hp / $character.hpmax)'>>\
<</widget>>
<<widget 'healdamage'>>\
<<set $character.hp to $character.hp + $args[0]>>\
<<if $character.hp > $character.hpmax>><<set $character.hp to $character.hpmax>><</if>>\
<<print '<progress @value="$character.hp" max="100"></progress> ($character.hp / $character.hpmax)'>>\
<</widget>><<widget 'craft'>>\
<<for _name, _i range $args[0].resources>><<capture _i, _name>>\
<<for _i to 0; _i lt $args[0].resources[_name]; _i++>>\
<<drop '$inventory' _name>>\
Removed _name.
<</for>>\
<</capture>><</for>>\
<<pickup '$inventory' $args[0].name>>\
Gained $args[0].name.
<<goto [[passage()]]>>
<<link 'Back'>><<dialog 'Crafting'>><<include 'crafting'>><</dialog>><</link>>\
<</widget>>\
<<for _i, _name range $blueprints>><<capture _name>>\
<<set _ok to true>>
_name.name
<<for _res, _count range _name.resources>><<capture _res _count>>\
_res (x_count) <<if $inventory.count(_res) < _count>><<set _ok to false>>(Incomplete)<</if>>\
<</capture>><</for>>\
<<if _ok>><<link 'Create'>><<dialog>><<craft _name>><</dialog>><</link>><</if>>
<</capture>><</for>><<set $weaponchart to {
'wooden spear': 20,
'stone sword': 50
}>>
<<set $invdef to {
'stone sword':'Blade made of stone. (50str)',
'wooden spear':'Attacking weapon. Used in battle (20str).',
'rope': 'Useful tool, various uses.',
}>>
<<masteraudio volume 1>><<set $wilddog to {
'name':'wild dog',
'str': 5,
'hp':15,
'hpmax':15,
'exp': 10,
'credits': 0,
'speed': 9,
'loot': ['fur', 'meat']
}>>
<<set $rabbit to {
'name':'rabbit',
'str': 3,
'hp':20,
'hpmax':20,
'exp': 15,
'credits': 0,
'speed': 10,
'loot': ['fur', 'meat']
}>><<textbox '_tstr' ''>><<button '+'>><<set $pnotes.push(_tstr)>><<popup 'panelnotes'>><</button>>
<<for _i, _n range $pnotes>><<capture _i, _n>>\
<<button '-'>><<set $pnotes.deleteAt(_i)>><<popup 'panelnotes'>><</button>><<button '='>>\
<<dialog>><<textbox '_editstr' _n>><<button 'Edit'>><<set $pnotes[_i] to _editstr>><<popup 'panelnotes'>><</button>><</dialog>><</button>> _n
<</capture>><</for>>\<<set _data to $acmd>>
<<set _arr to _data.split(" ")>>
<<set _arr.deleteAt(0)>>
<<set $commandargs to _arr.join(" ")>>
<<if $acmd == "help">>\
<<dialog 'Help'>>\
''General'' <br>
help: this.<br>
<br>
''Puzzle-specific'' <br>
look - gets a feel for the room<br>
take - holds an item, either from the room or inventory<br>
use - use an item or object in room<br>
<</dialog>>
<<elseif $acmd.startsWith("goto")>>
<<goto $commandargs>>
<<else>>
<<if tags(passage()).contains("puzzle")>>
<<set $commandset to $acmd>>
<<goto [[passage()]]>>
<<else>>
<<quickdialog 'Invalid command'>>
<</if>>
<</if>>
<<set $acmd to "">><<textbox "$acmd" "" autofocus>><<button 'Submit'>><<include 'commandparser'>><</button>><<widget 'useitem'>>\
<<switch $args[0]>>
<<case "small home">>\
<<drop '$inventory' "small home">>
<<dialog>><<if not Flag("hasHouse")>>
<<set $blueprints.push({'name':'wooden spear', 'resources':{'wood': 4}})>>@@.fade-in-out;You learn how to craft a wooden spear.@@
<<set $blueprints.push({'name':'wooden bed', 'resources':{'wood': 2}})>>@@.fade-in-out;You learn how to craft a wooden bed.@@
<</if>>
You set up a wooden house.<<setFlag "hasHouse">><</dialog>>
<<run reloadPassage()>>
<<default>>\
<<dialog>>The $args[0] doesn't do anything here.<</dialog>>
<</switch>>\
<</widget>>\<<print $varcaption>> <<print $varcaption2>><<if tags().contains("puzzle") and not tags().contains("hideinput")>>\
<<include 'commandinput'>>
<</if>>named: sets the sidebar name for the area
subarea: sets the sub-name in the sidebar
keepsub: doesn't reset the sub-name to blank like usual
puzzle: enables command line
hideinput: doesnt add the command line to the page
nav: adds the area to navigation<<button 'Back'>><<goto 'Home'>><</button>>
<<for _i, _n range $research>><<capture _i, _n>>
''_n.description'' <<percent _n.count _n.max>>
<progress class="bar" @value="_n.count" @max="_n.max"></progress>
<</capture>><</for>>
/* SetFlag : Set Flag X to value Y (Y defaults to True). Flag names are NOT case sensitive. */
/* EXAMPLE: <<SetFlag "Mentor" "Bob">> */
/* EXAMPLE: <<SetFlag "TrialMed">> = sets TrialMed flag to True */
<<widget "setFlag">>
<<set _Fnam = $args[0].toLowerCase()>>
<<if ndef $Flags>>
<<set $Flags = {}>>
<</if>>
<<if def $args[1]>>
<<if $args[1] == false>>
<<if def $Flags[_Fnam]>>
<<run delete $Flags[_Fnam]>>
<</if>>
<<else>>
<<set $Flags[_Fnam] = $args[1]>>
<</if>>
<<else>>
<<set $Flags[_Fnam] = true>>
<</if>>
/* Event flags: */
/* Keep track of your flags here, for example: */
/* Mentor = Bob or Joe */
/* TrialMed = denotes whether you've agreed to take Dr. Acula's medication */
<</widget>><<widget "error">>
<<if ($args.length == 2) && (typeof $args[0] === "string") && (typeof $args[1] === "string")>>
<<if ndef _errNo>>
<<set _errNo = 1>>
<<run $(document).one(":passagerender",
function (ev) {
$(ev.content).find(".errmsg").each(function (idx) {
throwError($(this), $(this).data("msg"), $(this).data("src"));
});
}
)>>
<<else>>
<<set _errNo += 1>>
<</if>>
<span class="errmsg" @data-msg="$args[0]" @data-src="$args[1]"></span>
<<else>>
<<ErrMsg '<<ErrMsg>> must have two string parameters.' 'Example: <<ErrMsg "Main text." "Details.">>'>>
<</if>>
<</widget>><<widget "glitch">>
<<set _main to $args[0]>>
<<if not $args[1]>><<set _second to clone(_main)>><<else>><<set _second to clone($args[1])>><</if>>
<span class="glitchy" @data-text=_second>_main</span>
<</widget>>You are home.
You have a <<link 'storage chest'>><<dialog 'Chest Management'>><span id="chesttype"><<if $taking>><<include "ChestTake">><<else>><<include "ChestDeposit">><</if>></span><</dialog>><</link>>
<<if $inventory.has('wooden bed') and not Flag('homestead_bed')>>\
You can <<link 'build'>>\
<<drop '$inventory' "wooden bed">>
<<setFlag 'homestead_bed'>>
<<goto 'Homestead'>>
<</link>> a bed here.
<</if>>\
<<if Flag('homestead_bed')>>
You can <<link 'sleep'>>
<<goto 'sleeping'>>
<</link>> here.
<</if>>
<<button 'Exit'>><<goto 'The Clearing'>><</button>><<switch $days>>
<<case 0>><<glitch 'Your first day in the clearing, you did well.' 'I\'ll be waiting for you in the sky.'>>
<<case 1>>Second day.
<</switch>>
<<set $days to $days + 1>>\
<<set $character.hp to $character.hpmax>>\
<<set $character.en to $character.enmax>>\
You sleep until tomorrow, and so begins day $days.
<<link 'Wake up'>><<goto [[previous()]]>><</link>><<if visited() == 1>>\
You take in the surroundings and decide your next move. You see some water and some mountains around, and get the idea to use some of the natural resources to enhance your equipment.
<<set $blueprints.push({'name':'stone sword', 'resources':{'wood': 1, 'stone': 2}})>>@@.fade-in-out;You learn how to craft a stone sword.@@
<<set $blueprints.push({'name':'axe', 'resources':{'wood': 2, 'stone': 2}})>>@@.fade-in-out;You learn how to craft a basic axe.@@
<<set $blueprints.push({'name':'pickaxe', 'resources':{'wood': 2, 'stone': 2}})>>@@.fade-in-out;You learn how to craft a basic pickaxe.@@
<<set $blueprints.push({'name':'stone spear', 'resources':{'wood': 1, 'stone': 1}})>>@@.fade-in-out;You learn how to craft a stone spear.@@
<</if>>\
<<randomencounter 80 $rabbit>>\
<<set _gath to ['leaves', 'twigs', 'berries']>>\
<<set _subs to _gath.random()>>\
You can gather <<gather 'things' _subs 10 10>> around the forest here.
North leads to [[The Clearing]].
South leads to [[The Lake]].
East leads to [[The Mountain Path]].<<randomencounter 80 $rabbit>>\
<<if $inventory.has('stone spear')>>You can go <<gather 'spear fishing' 'fish' 25 30>> here.<</if>>
<<if $inventory.has('fishing rod')>>You can go <<gather 'fishing' 'fish' 10 10>> here with a rod.<</if>>
North leads to the [[Forest Path]].
You can follow the path to [[The Shore]].
<<if visited() == 1>>\
You're at the shore of a lake. The area is vast and wide open.
<<set $blueprints.push({'name':'fishing rod', 'resources':{'wood': 2, 'string': 1}})>>@@.fade-in-out;You learn how to craft a fishing rod.@@
<</if>>You can gather <<gather 'stones' 'stone' 20 10>><<if $inventory.has('pickaxe')>> (with <<set _wl to ['stone', 'stone', 'stone']>><<gather 'pickaxe' _wl 10 10>>)<</if>> here.
West leads to the [[Forest Path]].
You can go in to the [[Mountain Passage]].$arg[0] = text\
$arg[1] = material\
$arg[2] = energy use\
$arg[3] = EXP gain\
<<widget 'gather'>>\
<<link $args[0]>>\
<<if hasEnergy($args[2])>>
<<dialog>>\
Gained $args[1].<<pickup '$inventory' $args[1]>><<gainxp $args[3]>><<takeenergy $args[2]>><</dialog>>
<<else>>
<<dialog>>Too tired to gather.<</dialog>>
<</if>>\
<</link>>\
<</widget>>\<<if previous() == "The Mountain Path">>\
You enter in to the darkly lit caverns.
<</if>>
<<if $inventory.has("lantern")>>\
You can go deeper in to [[The Mountain Caves]].
<<else>>\
It's too dark, you need some light to go in deeper.
<<if not Flag("to_make_lantern")>>\
<<setFlag "to_make_lantern">><<set $blueprints.push({'name':'lantern', 'resources':{'wood': 1, 'stone': 1}})>>@@.fade-in-out;You learn how to craft a lantern.@@
<</if>>
<</if>>
Outside to [[The Mountain Path]].
You can see [[The Lake]] from here.
The shore line is quiet. No sounds can be heard except for the flow of the ocean crashing against the beach.
<<if $inventory.has("lantern")>>\
There is a small opening leading in to [[The Ocean Caves]].
<<else>>\
There is a small opening leading in to The Ocean Caves but it's too dark to go inside.
<<if not Flag("to_make_lantern")>>\
<<setFlag "to_make_lantern">><<set $blueprints.push({'name':'lantern', 'resources':{'wood': 1, 'stone': 1}})>>@@.fade-in-out;You learn how to craft a lantern.@@
<</if>>
<</if>>
<<if visited() == 1>>\
You look out towards the vast ocean. You can see some mysterious structure out in the distance. If only you had a way to traverse the seas. Until then, maybe some fishing would be nice.
<<set $blueprints.push({'name':'raft', 'resources':{'wood': 20, 'string': 10}})>>@@.fade-in-out;You learn how to craft a raft.@@
<</if>>A path out leads to [[The Shore]].
You can also go deeper in to [[The Mountain Caves]].A path leading to [[Mountain Passage]] goes north.
To the south leads to [[The Ocean Caves]].