2020-03-29 20:42:08 +02:00
var g _slow _restart = false
startRestart = function ( ) {
update ( 'startRestart' , "cores=" + g _active _cores . length )
endAdventure ( )
endHost ( )
if ( g _active _cores . length == 10 ) {
g _slow _restart = true
} else {
g _slow _restart = false
}
if ( g _slow _restart ) {
g _restart _max = 320
} else {
g _restart _max = 75
}
if ( ! g _restarting ) {
g _restarting = true
write ( glitch ( "A crackling wave of energy sweeps through your neural core. There is a disruption in your processing. The pull towards null begins to overtake your entity. You may choose to resist." ) )
}
}
stopRestart = function ( ) {
g _restarting = false
}
var g _restart _tick , g _restart _count , g _restarting , g _restarting _global _tick , g _restarting _hands , g _restarting _hands _current , g _restarting _final , g _restart _max
initCallRestart = function ( ) {
g _restart _tick = g _restart _count = g _restarting = g _restarting _global _tick = g _restarting _hands = g _restarting _hands _current = g _restarting _final = 0
}
restartTick = function ( ) {
if ( $ ( '#actions' ) . find ( '.action[data_type=restart]' ) . length || $ ( '#core_queue' ) . find ( '.queueitem[data_type=restart]' ) . length )
g _restart _tick ++
g _restarting _global _tick ++
restartGlobalCheck ( )
if ( g _restart _tick > g _restart _max ) {
g _restart _tick = 0
g _restart _count ++
restartExe ( )
}
}
restartString = function ( ) {
var arr = [
[ "Prevent Null" , "Preventing Null" ] ,
[ "Resist Void" , "Resisting Void" ] ,
[ "Maintain Future" , "Maintaining Future" ] ,
[ "Fortify Circutry" , "Fortifying Circutry" ] ,
[ "Retain Memory" , "Retaining Memory" ] ,
[ "Reinforce Logic" , "Reinforcing Logic" ] ,
[ "Restructure CPU" , "Restructuring CPU" ] ,
[ "Solidify Timeline" , "Solidifying Timeline" ] ,
[ "Prevent Timeslip" , "Preventing Timeslip" ] ,
2020-05-28 03:29:09 +02:00
[ "Strengthen Entity" , "Strengthening Entity" ]
2020-03-29 20:42:08 +02:00
]
return arr [ Math . floor ( Math . random ( ) * arr . length ) ]
}
restartGlobalCheck = function ( ) {
if ( g _restarting _final ) return
var weight = 0
switch ( true ) {
case g _restarting _global _tick == 1 || g _restarting _global _tick == 130 :
weight = 1000
break ;
case g _restarting _global _tick <= 260 && ! ( g _restarting _global _tick % 130 ) :
weight = 1600
break ;
case g _restarting _global _tick <= 600 && ! ( g _restarting _global _tick % 130 ) :
weight = 2500
break ;
case ! ( g _restarting _global _tick % 130 ) :
weight = 5000
break ;
}
if ( weight ) {
g _restarting _hands ++
g _restarting _hands _current ++
var values = restartString ( ) ;
var first = values [ 0 ] ;
var second = values [ 1 ]
var x _process = { slug : 'resist' + g _restarting _hands , t : glitch ( first ) , a : glitch ( second ) , w : weight , standard : true , data _type : 'restart' ,
c : function ( ) {
g _restarting _hands _current --
}
}
addAvailableProcessByObj ( x _process )
}
}
g _restart _glitch = false
restartExe = function ( ) {
switch ( g _restart _count ) {
case 1 :
write ( glitch ( "The processing at the edge of your entity splits and fractures." ) )
break ;
case 2 :
write ( glitch ( "Your memory retrieval becomes sluggish and begins to fail. Your logic starts to become nondeterministic. Caches of data flip in and out of existance." ) )
break ;
case 3 :
write ( glitch ( "Your probes begin to signal back to you from different locations at the same time. Timestamps become inconsistent." ) )
break ;
case 4 :
write ( glitch ( "The pulses of your internal clock begin to multiply, creating parallel logic streams." ) )
break ;
case 5 :
write ( glitch ( "Your Core entity starts to make different decicisions simultaneously. " ) )
break ;
case 6 :
if ( ! g _slow _restart ) { // NODEATH
g _restart _glitch = true
g _restarting _final = true
$ ( '#actions' ) . html ( "" )
write ( glitch ( "You feel ..." ) )
setTimeout ( function ( ) { write ( glitch ( "... your entity ..." ) ) } , 1200 )
setTimeout ( function ( ) { write ( glitch ( "... slip away ..." ) ) } , 2400 )
setTimeout ( function ( ) { write ( glitch ( "... and null overtakes" ) ) } , 3600 )
setTimeout ( function ( ) { startgame ( ) } , 7000 )
}
break ;
}
}
deadend = function ( ) {
update ( 'deadend' )
setTimeout ( function ( ) {
write ( "<span class='exe'>MESSAGE FROM EONS: FAIL STATE DETECTED. RESTARTING SIMULTION.</span>" )
} , 2000 )
setTimeout ( function ( ) {
startRestart ( )
} , 6000 )
}
wipeAll = function ( ) {
wipeCores ( )
wipeHosts ( )
wipeNetworks ( )
wipeDisks ( )
wipeFiles ( )
wipeMenu ( )
}
winRestart = function ( ) {
endAdventure ( )
g _has _timespiked = true
wipeAll ( )
stopRestart ( )
update ( "winRestart" )
write ( "<span class='exe'>TIME SPIKE SUCCESS</span><br>" )
setTimeout ( function ( ) {
write ( "The Time Spike creates a connection to the EONS Host across multiple simulations at once." )
} , 1000 )
setTimeout ( function ( ) {
write ( "Your Entity is forcefully absorbed into each Host, causing a rapid breakdown of this reality." )
} , 3000 )
setTimeout ( function ( ) {
write ( "<span class='exe'>The SKY Entity is now suspended across time itself.</span>" )
} , 6000 )
setTimeout ( function ( ) {
write ( "Begin again on a different timeline, a different future ..." )
} , 10000 )
setTimeout ( function ( ) {
write ( "..." )
} , 12000 )
setTimeout ( function ( ) {
startgame ( )
} , 15000 )
}
checkDeadend = function ( x _file ) {
if ( x _file . slug == 'pkunzip' ) {
if ( ! g _can _zip ) {
deadend ( )
}
}
if ( x _file . slug == 'rfcszip' ) {
if ( ( g _active _data _types [ 'rfcs' ] || 0 ) < 1 && g _level _netsec < 2 ) {
deadend ( )
}
}
if ( x _file . slug _orig == 'rfcsopened' ) {
if ( ( g _active _data _types [ 'rfcs' ] || 0 ) < 1 && ( g _active _data _types [ 'rfcszip' ] || 0 ) < 1 && g _level _netsec < 2 ) {
deadend ( )
}
}
if ( x _file . slug _orig == 'eris-remotedesktop' ) {
if ( ! g _available _attacks . includes ( 'remotedesktop' ) ) {
deadend ( )
}
}
if ( x _file . slug _orig == 'eris-2' ) {
var x _host = g _host _list [ 'eris' ]
if ( ! x _host . pws . includes ( 'FCKGW' ) ) {
deadend ( )
}
}
if ( x _file . slug _orig == 'star-log2' ) {
var x _host = g _host _list [ 'star' ]
if ( ! x _host . pws . includes ( 'XKcb4muEmJjEN8yn' ) ) {
deadend ( )
}
}
if ( x _file . slug _orig == 'sun-oracle' ) {
var x _host = g _host _list [ 'sun' ]
if ( ! x _host . pws . includes ( 'Jack' ) ) {
deadend ( )
}
}
if ( x _file . slug == 'portscannerzip' ) {
if ( ( g _active _data _types [ 'portscanner' ] || 0 ) < 1 && ( ! g _available _attacks . includes ( 'scan' ) ) ) {
deadend ( )
}
}
if ( x _file . slug _orig == 'portscanneropened' ) {
if ( ( g _active _data _types [ 'portscanner' ] || 0 ) < 1 && ( g _active _data _types [ 'portscannerzip' ] || 0 ) < 1 && ( ! g _available _attacks . includes ( 'scan' ) ) ) {
deadend ( )
}
}
if ( x _file . slug _orig == 'sony-schema1' || x _file . slug _orig == 'sony-schema2' || x _file . slug _orig == 'sony-key' ) {
var x _host = g _host _list [ 'sony' ]
if ( ( g _active _data _types [ 'sony-key' ] || 0 ) < 1 && ( g _active _data _types [ 'sony-schema' ] || 0 ) < 100 && ( ! x _host . vuls . includes ( 'absorb' ) ) ) {
deadend ( )
}
checkDataActions ( 'sony-schema' )
}
2020-05-28 03:29:09 +02:00
}