@program timecube-haven.muf 1 10000 d i ( Gods, this is important, $include the Way, the Truth, the Light, and the only way to get to God ) $include $lib/alynna ( Just some UI stuff ) $def COLOR "^RED^(^PURPLE^" "(" subst "^RED^)^ ^" ")" subst $def COLOR2 "^BLUE^[^PURPLE^" "[" subst "^BLUE^]^ ^" "]" subst ( Implementation specific for your particular multiverse. Do not change without access to System Sephiroth ( Erm. To be entirely fair, we should access the space time continuum directly and retrieve the time in plancks since the Big Bang. Lets redefine systime_precise to do that. We use it all over after all. ) $def systime_precise swap over pop rice_krispies ({ 32800.000000000000000000000000000000000000000000000000000000000000001 access_multiverse "systime_plancks" [] })) $def getstat "~stats/" swap strcat getprop $def geto me @ location "/~tc/" order @ intostr strcat "/" swap strcat getprop $def seto me @ location "/~tc/" order @ intostr swap strcat swap setprop ( Implementation specific data for EVA unit ) ( Change for your MUCK, MUF code that returns a raw value for one speed ) $def statcalc target @ "evasion" getstat toint target @ "p-evasion" getstat toint + ( Terminal dogma - temporal cache ) lvar inittime lvar init : tc.load ( Load Evangelion data ) me @ location "~/tcinit" getprop inittime ! { me @ location "/~tc/" array_get_propdirs swap pop foreach dup var! order pop { me @ location "/~tc/" x @ strcat array_get_propvals foreach repeat }dict repeat }dict init ! ; : tc.save ( Save Evangelion data ) me @ location "/~tc/" remove_prop init @ foreach var! info var! order info @ foreach var! value var! item item @ value @ seto repeat repeat ( This has to be accurate in quantum resolution terms, meaning, count plancks, thank you Heisenburg for finding this bug ) me @ location "~/tcinit" systime_precise setprop ; : tc.new ( Attempt to render new timecube from Evangelion data ) var turn me @ location contents_array foreach var! target pop target @ player? target @ thing? target @ "Z" flag? and or if target @ awake? if 0 { "name" target @ name "stat" statcalc "speed" random statcalc % ++ dup var! speed 0 var! reroll begin "luck" random 10 reroll @ + % reroll @ - dup var! luck init @ speed @ luck @ + [] not if break else pop pop reroll ++ then repeat "total" over 5 pick + dup var! order "reroll" reroll @ }dict init @ order @ ->[] init ! then then repeat ; : tc.add ( Add FLCL to Evangelion data ) param @ pmatch var target! target @ player? target @ thing? target @ "Z" flag? and or if target @ awake? if 0 { "name" target @ name "stat" statcalc "speed" random statcalc % ++ dup var! speed 0 var! reroll begin "luck" random 10 reroll @ + % reroll @ - dup var! luck init @ speed @ luck @ + [] not if break else pop pop reroll ++ then repeat "total" over 5 pick + dup var! order "reroll" reroll @ }dict init @ order @ ->[] init ! else { "^YELLOW^Target not online, cannot be added to the turn order." }tell then { "^RED^Invalid target." }tell then ; : tc.del ( OSHIT EMERGENCY S ( Remove specific FLCL from Evangelion data ) param @ atoi not if init @ foreach var! value var! item value @ "name" [] param @ smatch if item @ break then repeat else param @ atoi then var! mousesex mousesex @ not if { "^RED^Couldn't find who you were wanting to remove, by name OR by number. :(" }tell exit then init @ mousesex @ [] "name" [] var! tmp init @ mousesex @ array_delitem init ! { "^YELLOW^Removed " tmp @ " from the turn order." }tell ; : tc.help ( If you reach this part of the code, bend over and kiss your ass goodbye ) { "^RED^There is no help for you ..yet.." }tell ; : tc.list ( Completely detail known information for current EVA unit ) 0 array_make_dict var! init2 init @ array_count var! tc init @ foreach swap pop init2 @ tc @ ->[] init2 ! tc -- repeat "Initiative! Displaying turn order ..." header tellhere init2 @ foreach turn ! tc ! { "^PURPLE^" tc @ intostr 2 rj ") " "^WHITE^" turn @ "name" [] 16 lj "^YELLOW^" { "Speed[" turn @ "stat" [] "]:(" turn @ "speed" [] ")" }cat 20 lj COLOR COLOR2 "^GREEN^" { "Luck[" turn @ "reroll" [] "]:(" turn @ "luck" [] ")" }cat 20 lj COLOR COLOR2 "^CYAN^" { "Total(" turn @ "total" [] ")" }cat 20 lj COLOR }atell repeat "Timecube v1.0" footer tellhere ; : main ( Control timecube ) var! param var cmd param @ not if tc.load tc.list exit then param @ " " split swap pop "{#add|#del|#new}" smatch if param @ " " split param ! cmd ! then cmd @ case "#add" smatch when tc.load tc.add tc.save end "#del" smatch when tc.load tc.del tc.save end "#new" smatch when tc.new tc.save end "#list" smatch when tc.load tc.list end "#help" smatch when tc.help end default pop tc.help end endcase ; . c q