Comparing version 0.1.1 to 0.1.2
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";var e=["itching","paralysis","fear","brokenrightarm","brokenleftarm","brokenrightleg","brokenleftleg","lapsingconsciousness","aeon","lovers","confusion","epilepsy","pacified","blackout","dazed","justice","slashedthroat","hellsight","peace","dazzled","shyness","dizziness","slickness","asthma","nausea","selarnia","weariness","scytherus","haemophilia","clumsiness","hallucinations","healthleech","dementia","recklessness","anorexia","masochism","impatience","stupidity","generosity","addiction","deadening","manaleech","stuttering","paranoia","agoraphobia","loneliness","claustrophobia","vertigo","hypersomnia","shivering","frozen","burning","sensitivity","hypochondria","lethargy","disloyalty","darkshade","voyria","dissonance","phlogisticated","silver","spiritburn","tenderskin","guilt","skullfractures","wristfractures","crackedribs","torntendons","indifference","retribution","shadowmadness","parasite","depression","timeloop","crushedthroat","tension","unweavingspirit","grievouswounds","pyramides","flushings","rebbies","mycalium","sandfever"],r={ferrum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ferrum",order:["darkshade","haemophilia","lethargy","addiction","scytherus","nausea","flushings","unweavingbody"],prio:0},magnesium:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat magnesium",order:["paralysis","slickness","pyramides"],prio:0},aurum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat aurum",order:["clumsiness","healthleech","sensitivity","weariness","asthma","hypochondria","rebbies","parasite"],prio:0},calamine:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat calamine",order:["undeaf","deafness"],delay:2.5,prio:0},argentum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat argentum",order:["masochism","loneliness","vertigo","recklessness","agoraphobia","guilt","whisperingmadness","spiritburn","tenderskin"],prio:0},cuprum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat cuprum",order:["pacified","peace","lovers","justice","generosity","indifference","retribution","pyre","timeloop"],prio:0},antimony:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat antimony",order:["temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine"],prio:0},arsenic:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat arsenic",order:["unblind"],prio:0},stannum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat stannum",order:["claustrophobia","paranoia","confusion","hypersomnia","hallucinations","dementia"],prio:0},plumbum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["horror","stupidity","epilepsy","dizziness","shyness","impatience","dissonance","depression","sandfever","mycalium","shadowmadness","unweavingmind"],command:"eat plumbum",prio:0},calcite:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["pressure"],command:"eat calcite",prio:0},ginseng:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ginseng",order:["darkshade","haemophilia","lethargy","addiction","scytherus","nausea","flushings","unweavingbody"],prio:0},bloodroot:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bloodroot",order:["paralysis","slickness","pyramides"],prio:0},kelp:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat kelp",order:["clumsiness","healthleech","sensitivity","weariness","asthma","hypochondria","rebbies","parasite"],prio:0},hawthorn:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat hawthorn",order:["undeaf","deafness"],delay:2.5,prio:0},lobelia:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat lobelia",order:["masochism","loneliness","vertigo","recklessness","agoraphobia","guilt","whisperingmadness","spiritburn","tenderskin"],prio:0},bellwort:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bellwort",order:["pacified","peace","lovers","justice","generosity","indifference","retribution","pyre","timeloop"],prio:0},ginger:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ginger",order:["temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine"],prio:0},bayberry:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bayberry",order:["unblind"],prio:0},ash:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ash",order:["claustrophobia","paranoia","confusion","hypersomnia","hallucinations","dementia"],prio:0},goldenseal:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat goldenseal",order:["horror","stupidity","epilepsy","dizziness","shyness","impatience","dissonance","depression","sandfever","mycalium","shadowmadness","unweavingmind"],prio:0},pear:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["pressure"],command:"eat pear",prio:0},smoke:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke cinnabar",order:["aeon","disloyalty","hellsight","manaleech","slickness","deadening","tension","unweavingspirit"],prio:0},cinnabar:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke cinnabar",order:["aeon","deadening","tension","unweavingspirit"],prio:0},malachite:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke malachite",prio:0},realgar:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke realgar",order:["disloyalty","hellsight","manaleech","slickness"],prio:0},elm:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke elm",order:["aeon","deadening","tension","unweavingspirit"],prio:0},skullcap:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke skullcap",prio:0},valerian:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke valerian",order:["disloyalty","hellsight","manaleech","slickness"],prio:0},caloric:{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply caloric",order:["frozen","shivering"],prio:0},"epidermal to body":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to body",order:["anorexia"],prio:0},"epidermal to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to head",order:["blindness","scalded","deafness"],prio:0},"epidermal to ears":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to ears",order:["deafness"],prio:0},"mending to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to head",order:["crushedthroat","dazzled"],prio:0},"mending to arms":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to arms",order:["brokenleftarm","brokenrightarm"],prio:0},"mending to legs":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to legs",order:["brokenleftleg","brokenrightleg"],prio:0},"mending to torso":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to torso",order:["burning"],prio:0},"restoration to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to head",order:["mangledhead","damagedhead","calcifiedskull","concussion","tonguetied"],delay:4,prio:0},"restoration to torso":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to torso",order:["hypothermia","heartseed","serioustrauma","mildtrauma","calcifiedtorso"],delay:4,prio:0},"restoration to arms":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to arms",order:["mangledleftarm","mangledrightarm","damagedleftarm","damagedrightarm"],delay:4,prio:0},"restoration to legs":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to legs",order:["mangledleftleg","mangledrightleg","damagedleftleg","damagedrightleg"],delay:4,prio:0},insomnia:{bals_req:["free"],bals_used:["free"],blocks:["hypersomnia","sleeping"],command:"insomnia",order:["insomnia"],prio:0},focus:{bals_req:["focus"],bals_used:["focus"],blocks:["impatience","sleeping"],command:"focus",order:["stupidity","epilepsy","dizziness","shyness","claustrophobia","paranoia","confusion","hallucinations","dementia","pacified","peace","lovers","generosity","masochism","loneliness","vertigo","recklessness","agoraphobia","anorexia","stuttering"],prio:0},"health to head":{bals_req:["sip"],bals_used:["sip"],command:"apply health to head",order:["skullfractures"],prio:0},"health to torso":{bals_req:["sip"],bals_used:["sip"],command:"apply health to torso",order:["crackedribs","grievouswounds"],prio:0},"health to arms":{bals_req:["sip"],bals_used:["sip"],command:"apply health to arms",order:["wristfractures"],prio:0},"health to legs":{bals_req:["sip"],bals_used:["sip"],command:"apply health to legs",order:["torntendons","latched","kkractlebrand"],prio:0},concentrate:{blocks:["sleeping","confusion"],command:"concentrate",order:["disrupted"],prio:0},immunity:{bals_req:["immunity"],bals_used:["immunity"],blocks:["sleeping","anorexia"],command:"sip immunity",order:["voyria"],prio:0},stand:{bals_req:["balance","equilibrium"],blocks:["death","sleeping","paralysis","brokenrightleg","brokenleftleg","damagedleftleg","damagedrightleg","mangledrightleg","mangledleftleg","entangled","transfixation","impaled","webbed","bound"],command:"stand",order:["prone"],prio:0},tree:{bals_used:["tree"],bals_req:["tree"],blocks:["death","sleeping","paralysis",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],command:"touch tree",order:e,prio:0},health:{bals_req:["sip"],bals_used:["sip"],blocks:["sleeping","anorexia"],command:"sip health",prio:0},mana:{bals_req:["sip"],bals_used:["sip"],blocks:["sleeping","anorexia"],command:"sip mana",prio:0},potash:{bals_req:["moss"],bals_used:["moss"],blocks:["sleeping","anorexia"],command:"eat potash",prio:0},moss:{bals_req:["moss"],bals_used:["moss"],blocks:["sleeping","anorexia"],command:"eat moss",prio:0},fitness:{bals_req:["equilibrium","balance","fitness"],bals_used:["balance","fitness"],blocks:["weariness","sleeping"],skills:["Monk","Runewarden"],command:"fitness",order:["asthma"],prio:0},bloodboil:{bals_req:["equilibrium","balance","bloodboil"],bals_used:["equilibrium","bloodboil"],blocks:["death","haemophilia","sleeping",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],skills:["Magi"],command:"cast bloodboil",order:e,prio:0},restore:{bals_req:["balance","equilibrium"],bals_used:["equilibrium"],command:"restore",order:["brokenleftarm","brokenrightarm","brokenleftleg","brokenrightleg","skullfractures","torntendons","wristfractures","crackedribs"],prio:0},dragonflex:{bals_req:["balance"],bals_used:["balance"],command:"dragonflex",skills:["Dragon"],order:["webbed","entangled"],prio:0},dragonheal:{bals_req:["balance","equilibrium"],bals_used:["equilibrium"],command:"dragonheal",skills:["Dragon"],blocks:["sleeping",["recklessness","weariness"]],order:e,prio:0},dwinnu:{bals_req:["voice"],bals_used:["voice"],command:"chant dwinnu",skills:["Bard"],order:["webbed","entangled"],prio:0},rage:{bals_req:["rage"],bals_used:["rage"],command:"rage",skills:["Runewarden"],order:["pacified","peace","lovers","generosity"],prio:95},salt:{bals_req:["equilibrium","salt"],bals_used:["salt","equilibrium"],blocks:["stupidity","sleeping"],skills:["Alchemist"],command:"educe salt",order:e,prio:0},siphon:{bals_req:["angel"],bals_used:["angel"],blocks:["sleeping"],skills:["Apostate","Priest"],command:"educe salt",order:e,prio:0},shrugging:{bals_req:["equilibrium","balance","shrugging"],bals_used:["shrugging"],blocks:["weariness","sleeping"],skills:["Serpent"],command:"shrugging",order:e,prio:0},slough:{bals_req:["equilibrium","balance","slough"],bals_used:["slough","balance"],blocks:["weariness","sleeping"],skills:["Fire Elemental Lord"],command:"slough impurities",order:e,prio:0},fool:{bals_req:["equilibrium","balance","fool"],bals_used:["fool","balance"],blocks:["death","prone","paralysis","sleeping",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],skills:["Occultist"],command:"fling fool at me",order:e,prio:0},alleviate:{bals_req:["equilibrium","balance","alleviate"],bals_used:["alleviate","balance"],blocks:["paralysis","sleeping"],skills:["Blademaster"],command:"alleviate",order:e,prio:0},sun:{bals_req:["equilibrium","balance","alleviate"],bals_used:["alleviate","balance"],blocks:[],skills:["Runewarden","Occultist"],command:"sun",order:e,prio:0},generic:{bals_req:["equilibrium","balance","alleviate"],bals_used:["alleviate","balance"],blocks:[],skills:[],command:"sun",order:e,prio:0}};function a(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function n(e,r){for(var a=0;a<r.length;a++){var n=r[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i=function(){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;a(this,e),this._name=r,this._enabled=!1,this._t_started=0,this._t_ended=0,this._timerId=0,this._default_length=n,this.setLength(n),this._callbacks=[]}var r,i,s;return r=e,(i=[{key:"length",get:function(){return this._t_length}},{key:"setLength",value:function(e){this._t_length=e,this._t_length_ms=1e3*e}},{key:"reset",value:function(){this.setLength(this._default_length)}},{key:"start",value:function(){this._enabled&&clearTimeout(this._timerId),this._timerId=setTimeout(this.stop.bind(this),this._t_length_ms),this._t_started=performance.now()/1e3,this._enabled=!0}},{key:"stop",value:function(){if(this._enabled&&(clearTimeout(this._timerId),this._t_ended=performance.now()/1e3,this._enabled=!1,this._callbacks))for(var e=0;e<this._callbacks.length;e++)this._callbacks[e](this._t_ended-this._t_started)}},{key:"duration",value:function(){return this._enabled?this.elapsed():this._t_ended-this._t_started}},{key:"elapsed",value:function(){return this._enabled?performance.now()/1e3-this._t_started:0}},{key:"remaining",value:function(){return this._enabled?this._t_length-performance.now()/1e3-this._t_started:0}},{key:"addCallback",value:function(e){this._callbacks.push(e)}},{key:"clearCallbacks",value:function(){this._callbacks=[]}}])&&n(r.prototype,i),s&&n(r,s),Object.defineProperty(r,"prototype",{writable:!1}),e}(),s=i,t={},o=function(e){var a=[];Object.keys(r).forEach((function(n){var i;(null===(i=r[n].order)||void 0===i?void 0:i.indexOf(e))>-1&&a.push(n)}));var n={name:e,probability:0,cures:a,have:!1,got:function(){var r;t[e].have=!0,t[e].probability=1,eventStream.raiseEvent("insightGotAff",t[e]),eventStream.raiseEvent("insightGot".concat(e),t[e]),null===(r=t[e].timer)||void 0===r||r.start()},lost:function(){var r;t[e].have=!1,t[e].probability=0,eventStream.raiseEvent("insightLostAff",t[e]),eventStream.raiseEvent("insightLost".concat(e),t[e]),null===(r=t[e].timer)||void 0===r||r.stop()},reset:function(){var r;t[e].have=!1,t[e].probability=0,null===(r=t[e].timer)||void 0===r||r.stop()}};return Object.keys(d).indexOf(e)>-1&&(n.timer=new s("insightTimer".concat(e),d[e].duration),n.timer.addCallback(n.reset)),n},l=["undeaf","unblind","cleanseaura","addiction","aeon","agoraphobia","airfisted","amnesia","anorexia","asphyxiating","asthma","blackout","bleeding","blindness","blistered","bloodfire","bound","brokenleftarm","brokenrightarm","brokenleftleg","brokenrightleg","bruisedribs","burning","cadmuscurse","calcifiedskull","calcifiedtorso","claustrophobia","clumsiness","coldfate","concussion","condemned","conflagration","confusion","constricted","corruption","crackedribs","cremated","crushedthroat","daeggerimpale","damagedhead","damagedleftarm","damagedleftleg","damagedrightarm","damagedrightleg","darkshade","dazed","dazzled","deadening","deafness","death","deathsickness","deepsleep","degenerate","dehydrated","dementia","demonstain","depression","deteriorate","disloyalty","disrupted","dissonance","dizziness","empoweredmannaz","empoweredloshre","enlightenment","enmesh","ensorcelled","entangled","epilepsy","fear","flamefisted","flushings","frozen","generosity","grievouswounds","guilt","hamstrung","haemophilia","hallucinations","hatred","healthleech","heartseed","hecatecurse","hellsight","hindered","homunculusmercury","horror","hypersomnia","hypochondria","hypothermia","icefisted","impaled","impatience","indifference","inquisition","insomnia","internalbleeding","isolation","itching","justice","kaisurge","kkractlebrand","laceratedthroat","lapsingconsciousness","latched","lethargy","lightbind","loneliness","lovers","lullaby","manaleech","masochism","mildtrauma","mangledleftarm","mangledleftleg","mangledrightarm","mangledrightleg","mangledhead","mindclamp","mindravaged","muddled","mycalium","nausea","numbedleftarm","numbedrightarm","pacified","palpatarfeed","paralysis","paranoia","parasite","peace","penitence","petrified","phlogisticated","pinshot","pressure","prone","pyramides","pyre","rebbies","recklessness","retribution","revealed","sandfever","scalded","scrambledbrains","scytherus","selarnia","sensitivity","serioustrauma","shadowmadness","shivering","shyness","silenced","silver","skullfractures","slashedthroat","sleeping","slickness","slimeobscure","solarburn","spiritburn","stun","stupidity","stuttering","temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine","tenderskin","tension","timeflux","timeloop","tonguetied","torntendons","transfixation","trueblind","unweavingbody","unweavingmind","unweavingspirit","vertigo","vinewreathed","vitiated","vitrified","voidfisted","voyria","waterbonds","weakenedmind","weariness","webbed","whisperingmadness","wristfractures","unconsciousness","harmonic","bop","spiritwrack","bedevil","loki","moon","evileye","dragoncurse","swiftcurse"],d={test:{duration:10},weakenedmind:{duration:60},slimeobscure:{duration:30},palpatarfeed:{duration:20},cleanseaura:{duration:6}};l.forEach((function(e){t[e]=o(e)}));function c(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function u(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var m={},b={insomnia:!0,kola:!0,speed:!0,shield:!0,rebounding:!0,prismatic:!0,cloak:!0,fangbarrier:!0},p=function(){Object.assign(m,function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?c(Object(a),!0).forEach((function(r){u(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):c(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},b))};function h(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function f(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var g={},y={hp:2e4,mana:2e4,hpMax:2e4,manaMax:2e4,hpPercent:1,manaPercent:1,soulmaster:!1,enlightened:!1,mentalCount:0,physicalCount:0},v=function(){Object.assign(g,function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?h(Object(a),!0).forEach((function(r){f(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):h(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},y))},k={mentals:["claustrophobia","agoraphobia","lovers","dementia","epilepsy","hallucinations","confusion","stupidity","paranoia","vertigo","shyness","addiction","recklessness","masochism"],physicals:["asthma","paralysis","slickness","haemophilia","clumsiness","healthleech","sensitivity","darkshade"],bubonis:["vertigo","recklessness","confusion","masochism","paranoia","shyness","claustrophobia"],chimera:["confusion","hallucinations","agoraphobia","claustrophobia","dementia"],moon:["stupidity","masochism","hallucinations","hypersomnia","confusion","epilepsy","claustrophobia","agoraphobia"],whisperingmadness:["dementia","stupidity","confusion","hypersomnia","paranoia","hallucinations","impatience","addiction","agoraphobia","lovers","loneliness","recklessness","masochism"]};function _(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||O(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,r){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=O(e))||r&&e&&"number"==typeof e.length){a&&(e=a);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,t=!0,o=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return t=e.done,e},e:function(e){o=!0,s=e},f:function(){try{t||null==a.return||a.return()}finally{if(o)throw s}}}}function O(e,r){if(e){if("string"==typeof e)return q(e,r);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?q(e,r):void 0}}function q(e,r){(null==r||r>e.length)&&(r=e.length);for(var a=0,n=new Array(r);a<r;a++)n[a]=e[a];return n}var j=t,x=[[]],P=[],E=[],A={},S={id:""},z=function(e){j[e].got();var r,a=w(x);try{for(a.s();!(r=a.n()).done;){var n=r.value;n.includes(e)||n.push(e)}}catch(e){a.e(e)}finally{a.f()}E.push(e),I()},D=function(e){j[e].lost(),x.forEach((function(r){var a=r.indexOf(e);a>-1&&r.splice(a,1)})),T(),I()},C=function(e){var a,n=w(r[e].order);try{for(n.s();!(a=n.n()).done;){var i=a.value;if(1===t[i].probability)return D(i),!0}}catch(e){n.e(e)}finally{n.f()}return!1},T=function(){var e=!1,r=_(x);!1===e&&(r.sort(),e=!0);[9,7,5,3].forEach((function(e){!function(e){if(r.length>1&&r.length%e==0){for(var a=!0,n=0;n<r.length;n+=e)if(!M(r.slice(n,n+e))){a=!1;break}if(a){for(var i=r.length-(e-1);i>-1;i-=e)r.splice(i,e-1);return r.sort(),!0}return!1}}(e)}))},I=function(){var e=_(new Set(x.flat())),r=P.filter((function(r){return!e.includes(r)}));r.length>0&&r.forEach((function(e){return j[e].lost()})),(P=e).forEach((function(e){j[e].probability=parseFloat((Math.round(100*function(e){return x.filter((function(r){return r.includes(e)})).length/x.length}(e))/100).toFixed(2))})),eventStream.raiseEvent("insightUpdateAffs")},L=function(e,r){return e.length===r.length&&(e.sort(),r.sort(),!!e.every((function(e,a){return e===r[a]})))},M=function(e){for(var r=1;r<e.length;r++)if(!L(e[0],e[r]))return!1;return!0},B=z,G=D,F=function(e){if(r[e].bals_used.includes("salve")&&C(e))console.log("salveCure() true return");else{var a=r[e].order,n=[],i=!1;x.forEach((function(e){if(e.find((function(e){return a.includes(e)}))){i=!0;var r,s=w(e);try{var t=function(){var i=r.value;if(a.includes(i)){var s=e.filter((function(e){return e!==i}));s.length>0&&n.push(s)}};for(s.s();!(r=s.n()).done;)t()}catch(e){s.e(e)}finally{s.f()}}})),i&&(x=n.length>0?n:[[]]),T(),I(),E.push(e)}},R=function(e){var r=[];e.forEach((function(e){t[e].have=!0;var a,n=w(_(x.map((function(e){return e.slice(0)}))));try{for(n.s();!(a=n.n()).done;){var i=a.value;i.includes(e)||i.push(e),r.push(i)}}catch(e){n.e(e)}finally{n.f()}})),x=r.length>0?r:[[]],T(),I()},U=function(e){var r=[];e.forEach((function(e){t[e].have=!0;var a,n=w(_(x.map((function(e){return e.slice(0)}))));try{for(n.s();!(a=n.n()).done;){var i=a.value;i.includes(e)||(i.push(e),r.push(i.sort()))}}catch(e){n.e(e)}finally{n.f()}})),r.length>0&&(x=r),T(),I()},N=function(e,r){var a=j[e].probability;if(!(r&&1===a||!r&&0===a))if(r&&0===j[e].probability)z(e);else if(r||1!==j[e].probability){var n=[];x.forEach((function(a){a.includes(e)===r&&n.push(a)})),x=n,E.push("".concat(e,":").concat(r)),T(),I()}else D(e)},$=function(){for(var e in x=[[]],P=[],E=[],j){if(Object.hasOwnProperty.call(j,e))j[e].reset()}},H=function(e){var r=e.p,a=e.m,n=_(x);if((n=n.filter((function(e){var n=e.filter((function(e){return k.physicals.includes(e)})),i=e.filter((function(e){return k.mentals.includes(e)}));return n.length<=r&&i.length<=a}))).length<r+a)return console.error("Insight Error: No present branch for physical ".concat(r,", mental ").concat(a)),!1;x=_(n),T(),I()};function J(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function K(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var Q=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=t[e];return!!(a.have&&a.probability>=r)},V=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=!1;return Array.isArray(e)&&(a=e.every((function(e){return P.indexOf(e)>-1&&t[e].probability>=r}))),a},W=function(e){if(void 0===e||e==S.id)return!0},X={};function Y(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function Z(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}[{id:"balance",duration:2},{id:"equilibrium",duration:2},{id:"herb",duration:2},{id:"smoke",duration:2},{id:"salve",duration:2},{id:"focus",duration:2},{id:"tree",duration:2}].forEach((function(e){return X[e.id]=(a=(r=e).id,n=r.duration,(i={name:a,have:!0,got:function(){X[a].have=!0,eventStream.raiseEvent("insightGotBal",X[a]),eventStream.raiseEvent("insightGot".concat(a),X[a]),X[a].timer.stop()},lost:function(){var e;X[a].have=!1,eventStream.raiseEvent("insightLostBal",X[a]),eventStream.raiseEvent("insightLost".concat(a),X[a]),null===(e=X[a].timer)||void 0===e||e.start()},reset:function(){X[a].have=!0,X[a].timer.stop()},timer:new s("insightTimer".concat(a),n)}).timer.addCallback(i.reset),i);var r,a,n,i}));var ee={addAff:function(e){var r=e.aff,a=e.player;W(a)&&void 0!==r&&B(r)},getAff:function(e){var r=e.aff,a=e.player;if(W(a)&&void 0!==r)return insight.affs[r]},removeAff:function(e){var r=e.aff,a=e.player;W(a)&&void 0!==r&&G(r)},usedCure:function(e){var a=e.cure;e.player;!function(e){var a,n=null===(a=r[e])||void 0===a?void 0:a.blocks;void 0!==n&&n.forEach((function(e){Array.isArray(e)?V(e)&&e.forEach((function(e){return N(e,!1)})):Q(e)&&N(e,!1)}))}(a),F(a)},confirmAff:function(e){var r=e.aff,a=e.state,n=e.player;W(n)&&void 0!==r&&N(r,a)},reset:function(){$(),p(),v()},randomAffs:function(e){var r=e.affs,a=e.player;W(a)&&void 0!==r&&R(r)},readAuraConfirm:function(e){var r=e.p,a=e.m,n=e.player;W(n)&&H({p:r,m:a})},smartAffs:function(e){var r=e.affs,a=e.player;W(a)&&void 0!==r&&U(r)},addDef:function(e){var r=e.def,a=e.player;W(a)&&void 0!==r&&(m[r]=!0)},removeDef:function(e){var r=e.def,a=e.player;W(a)&&void 0!==r&&(m[r]=!1)},hasAff:Q,hasAffs:V,hasAnAff:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=!1;return Array.isArray(e)&&(a=P.some((function(a){return e.indexOf(a)>-1&&t[a].probability>=r}))),a},hasDef:function(e){return m[e]},setStatus:function(e){var r=e.id,a=e.value;e.player;g[r]=a},getStatus:function(e){return g[e]},currentAffs:function(){return P},currentAffDisplay:function(){var e=[];return P.forEach((function(r){return e.push("".concat(r,": ").concat(t[r].probability))})),e},nextLine:function(){var e=nexusclient.current_block.indexOf(nexusclient.current_line);return nexusclient.current_block[e+1].parsed_line.text()},target:S,occultist:k,affs:t,defs:m,bals:X,status:g,timeline:function(){return x},setTarget:function(e){var r;A.hasOwnProperty(e)?t=function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?J(Object(a),!0).forEach((function(r){K(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):J(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},A[e].affs):A[e]={affs:(r={},l.forEach((function(e){r[e]=o(e)})),r),defs:{},state:{}}},players:A};globalThis.insight=function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?Y(Object(a),!0).forEach((function(r){Z(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Y(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},ee),globalThis.insight.reset()}(); | ||
!function(){"use strict";var e=["itching","paralysis","fear","brokenrightarm","brokenleftarm","brokenrightleg","brokenleftleg","lapsingconsciousness","aeon","lovers","confusion","epilepsy","pacified","blackout","dazed","justice","slashedthroat","hellsight","peace","dazzled","shyness","dizziness","slickness","asthma","nausea","selarnia","weariness","scytherus","haemophilia","clumsiness","hallucinations","healthleech","dementia","recklessness","anorexia","masochism","impatience","stupidity","generosity","addiction","deadening","manaleech","stuttering","paranoia","agoraphobia","loneliness","claustrophobia","vertigo","hypersomnia","shivering","frozen","burning","sensitivity","hypochondria","lethargy","disloyalty","darkshade","voyria","dissonance","phlogisticated","silver","spiritburn","tenderskin","guilt","skullfractures","wristfractures","crackedribs","torntendons","indifference","retribution","shadowmadness","parasite","depression","timeloop","crushedthroat","tension","unweavingspirit","grievouswounds","pyramides","flushings","rebbies","mycalium","sandfever"],r={ferrum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ferrum",order:["darkshade","haemophilia","lethargy","addiction","scytherus","nausea","flushings","unweavingbody"],prio:0},magnesium:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat magnesium",order:["paralysis","slickness","pyramides"],prio:0},aurum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat aurum",order:["clumsiness","healthleech","sensitivity","weariness","asthma","hypochondria","rebbies","parasite"],prio:0},calamine:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat calamine",order:["undeaf","deafness"],delay:2.5,prio:0},argentum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat argentum",order:["masochism","loneliness","vertigo","recklessness","agoraphobia","guilt","whisperingmadness","spiritburn","tenderskin"],prio:0},cuprum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat cuprum",order:["pacified","peace","lovers","justice","generosity","indifference","retribution","pyre","timeloop"],prio:0},antimony:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat antimony",order:["temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine"],prio:0},arsenic:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat arsenic",order:["unblind"],prio:0},stannum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat stannum",order:["claustrophobia","paranoia","confusion","hypersomnia","hallucinations","dementia"],prio:0},plumbum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["horror","stupidity","epilepsy","dizziness","shyness","impatience","dissonance","depression","sandfever","mycalium","shadowmadness","unweavingmind"],command:"eat plumbum",prio:0},calcite:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["pressure"],command:"eat calcite",prio:0},ginseng:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ginseng",order:["darkshade","haemophilia","lethargy","addiction","scytherus","nausea","flushings","unweavingbody"],prio:0},bloodroot:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bloodroot",order:["paralysis","slickness","pyramides"],prio:0},kelp:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat kelp",order:["clumsiness","healthleech","sensitivity","weariness","asthma","hypochondria","rebbies","parasite"],prio:0},hawthorn:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat hawthorn",order:["undeaf","deafness"],delay:2.5,prio:0},lobelia:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat lobelia",order:["masochism","loneliness","vertigo","recklessness","agoraphobia","guilt","whisperingmadness","spiritburn","tenderskin"],prio:0},bellwort:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bellwort",order:["pacified","peace","lovers","justice","generosity","indifference","retribution","pyre","timeloop"],prio:0},ginger:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ginger",order:["temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine"],prio:0},bayberry:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bayberry",order:["unblind"],prio:0},ash:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ash",order:["claustrophobia","paranoia","confusion","hypersomnia","hallucinations","dementia"],prio:0},goldenseal:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat goldenseal",order:["horror","stupidity","epilepsy","dizziness","shyness","impatience","dissonance","depression","sandfever","mycalium","shadowmadness","unweavingmind"],prio:0},pear:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["pressure"],command:"eat pear",prio:0},smoke:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke cinnabar",order:["aeon","disloyalty","hellsight","manaleech","slickness","deadening","tension","unweavingspirit"],prio:0},cinnabar:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke cinnabar",order:["aeon","deadening","tension","unweavingspirit"],prio:0},malachite:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke malachite",prio:0},realgar:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke realgar",order:["disloyalty","hellsight","manaleech","slickness"],prio:0},elm:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke elm",order:["aeon","deadening","tension","unweavingspirit"],prio:0},skullcap:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke skullcap",prio:0},valerian:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke valerian",order:["disloyalty","hellsight","manaleech","slickness"],prio:0},caloric:{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply caloric",order:["frozen","shivering"],prio:0},"epidermal to body":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to body",order:["anorexia"],prio:0},"epidermal to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to head",order:["blindness","scalded","deafness"],prio:0},"epidermal to ears":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to ears",order:["deafness"],prio:0},"mending to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to head",order:["crushedthroat","dazzled"],prio:0},"mending to arms":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to arms",order:["brokenleftarm","brokenrightarm"],prio:0},"mending to legs":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to legs",order:["brokenleftleg","brokenrightleg"],prio:0},"mending to torso":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to torso",order:["burning"],prio:0},"restoration to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to head",order:["mangledhead","damagedhead","calcifiedskull","concussion","tonguetied"],delay:4,prio:0},"restoration to torso":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to torso",order:["hypothermia","heartseed","serioustrauma","mildtrauma","calcifiedtorso"],delay:4,prio:0},"restoration to arms":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to arms",order:["mangledleftarm","mangledrightarm","damagedleftarm","damagedrightarm"],delay:4,prio:0},"restoration to legs":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to legs",order:["mangledleftleg","mangledrightleg","damagedleftleg","damagedrightleg"],delay:4,prio:0},insomnia:{bals_req:["free"],bals_used:["free"],blocks:["hypersomnia","sleeping"],command:"insomnia",order:["insomnia"],prio:0},focus:{bals_req:["focus"],bals_used:["focus"],blocks:["impatience","sleeping"],command:"focus",order:["stupidity","epilepsy","dizziness","shyness","claustrophobia","paranoia","confusion","hallucinations","dementia","pacified","peace","lovers","generosity","masochism","loneliness","vertigo","recklessness","agoraphobia","anorexia","stuttering"],prio:0},"health to head":{bals_req:["sip"],bals_used:["sip"],command:"apply health to head",order:["skullfractures"],prio:0},"health to torso":{bals_req:["sip"],bals_used:["sip"],command:"apply health to torso",order:["crackedribs","grievouswounds"],prio:0},"health to arms":{bals_req:["sip"],bals_used:["sip"],command:"apply health to arms",order:["wristfractures"],prio:0},"health to legs":{bals_req:["sip"],bals_used:["sip"],command:"apply health to legs",order:["torntendons","latched","kkractlebrand"],prio:0},concentrate:{blocks:["sleeping","confusion"],command:"concentrate",order:["disrupted"],prio:0},immunity:{bals_req:["immunity"],bals_used:["immunity"],blocks:["sleeping","anorexia"],command:"sip immunity",order:["voyria"],prio:0},stand:{bals_req:["balance","equilibrium"],blocks:["death","sleeping","paralysis","brokenrightleg","brokenleftleg","damagedleftleg","damagedrightleg","mangledrightleg","mangledleftleg","entangled","transfixation","impaled","webbed","bound"],command:"stand",order:["prone"],prio:0},tree:{bals_used:["tree"],bals_req:["tree"],blocks:["death","sleeping","paralysis",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],command:"touch tree",order:e,prio:0},health:{bals_req:["sip"],bals_used:["sip"],blocks:["sleeping","anorexia"],command:"sip health",prio:0},mana:{bals_req:["sip"],bals_used:["sip"],blocks:["sleeping","anorexia"],command:"sip mana",prio:0},potash:{bals_req:["moss"],bals_used:["moss"],blocks:["sleeping","anorexia"],command:"eat potash",prio:0},moss:{bals_req:["moss"],bals_used:["moss"],blocks:["sleeping","anorexia"],command:"eat moss",prio:0},fitness:{bals_req:["equilibrium","balance","fitness"],bals_used:["balance","fitness"],blocks:["weariness","sleeping"],skills:["Monk","Runewarden"],command:"fitness",order:["asthma"],prio:0},bloodboil:{bals_req:["equilibrium","balance","bloodboil"],bals_used:["equilibrium","bloodboil"],blocks:["death","haemophilia","sleeping",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],skills:["Magi"],command:"cast bloodboil",order:e,prio:0},restore:{bals_req:["balance","equilibrium"],bals_used:["equilibrium"],command:"restore",order:["brokenleftarm","brokenrightarm","brokenleftleg","brokenrightleg","skullfractures","torntendons","wristfractures","crackedribs"],prio:0},dragonflex:{bals_req:["balance"],bals_used:["balance"],command:"dragonflex",skills:["Dragon"],order:["webbed","entangled"],prio:0},dragonheal:{bals_req:["balance","equilibrium"],bals_used:["equilibrium"],command:"dragonheal",skills:["Dragon"],blocks:["sleeping",["recklessness","weariness"]],order:e,prio:0},dwinnu:{bals_req:["voice"],bals_used:["voice"],command:"chant dwinnu",skills:["Bard"],order:["webbed","entangled"],prio:0},rage:{bals_req:["rage"],bals_used:["rage"],command:"rage",skills:["Runewarden"],order:["pacified","peace","lovers","generosity"],prio:95},salt:{bals_req:["equilibrium","salt"],bals_used:["salt","equilibrium"],blocks:["stupidity","sleeping"],skills:["Alchemist"],command:"educe salt",order:e,prio:0},siphon:{bals_req:["angel"],bals_used:["angel"],blocks:["sleeping"],skills:["Apostate","Priest"],command:"educe salt",order:e,prio:0},shrugging:{bals_req:["equilibrium","balance","shrugging"],bals_used:["shrugging"],blocks:["weariness","sleeping"],skills:["Serpent"],command:"shrugging",order:e,prio:0},slough:{bals_req:["equilibrium","balance","slough"],bals_used:["slough","balance"],blocks:["weariness","sleeping"],skills:["Fire Elemental Lord"],command:"slough impurities",order:e,prio:0},fool:{bals_req:["equilibrium","balance","fool"],bals_used:["fool","balance"],blocks:["death","prone","paralysis","sleeping",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],skills:["Occultist"],command:"fling fool at me",order:e,prio:0},alleviate:{bals_req:["equilibrium","balance","alleviate"],bals_used:["alleviate","balance"],blocks:["paralysis","sleeping"],skills:["Blademaster"],command:"alleviate",order:e,prio:0},sun:{bals_req:["equilibrium","balance","alleviate"],bals_used:["alleviate","balance"],blocks:[],skills:["Runewarden","Occultist"],command:"sun",order:e,prio:0},generic:{bals_req:["equilibrium","balance","alleviate"],bals_used:["alleviate","balance"],blocks:[],skills:[],command:"sun",order:e,prio:0}};function a(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function n(e,r){for(var a=0;a<r.length;a++){var n=r[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i=function(){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;a(this,e),this._name=r,this._enabled=!1,this._t_started=0,this._t_ended=0,this._timerId=0,this._default_length=n,this.setLength(n),this._callbacks=[]}var r,i,s;return r=e,(i=[{key:"length",get:function(){return this._t_length}},{key:"setLength",value:function(e){this._t_length=e,this._t_length_ms=1e3*e}},{key:"reset",value:function(){this.setLength(this._default_length)}},{key:"start",value:function(){this._enabled&&clearTimeout(this._timerId),this._timerId=setTimeout(this.stop.bind(this),this._t_length_ms),this._t_started=performance.now()/1e3,this._enabled=!0}},{key:"stop",value:function(){if(this._enabled&&(clearTimeout(this._timerId),this._t_ended=performance.now()/1e3,this._enabled=!1,this._callbacks))for(var e=0;e<this._callbacks.length;e++)this._callbacks[e](this._t_ended-this._t_started)}},{key:"duration",value:function(){return this._enabled?this.elapsed():this._t_ended-this._t_started}},{key:"elapsed",value:function(){return this._enabled?performance.now()/1e3-this._t_started:0}},{key:"remaining",value:function(){return this._enabled?this._t_length-performance.now()/1e3-this._t_started:0}},{key:"addCallback",value:function(e){this._callbacks.push(e)}},{key:"clearCallbacks",value:function(){this._callbacks=[]}}])&&n(r.prototype,i),s&&n(r,s),Object.defineProperty(r,"prototype",{writable:!1}),e}(),s=i,t={},o=function(e){var a=[];Object.keys(r).forEach((function(n){var i;(null===(i=r[n].order)||void 0===i?void 0:i.indexOf(e))>-1&&a.push(n)}));var n={name:e,probability:0,cures:a,have:!1,got:function(){var r;t[e].have=!0,t[e].probability=1,eventStream.raiseEvent("insightGotAff",t[e]),eventStream.raiseEvent("insightGot".concat(e),t[e]),null===(r=t[e].timer)||void 0===r||r.start()},lost:function(){var r;t[e].have=!1,t[e].probability=0,eventStream.raiseEvent("insightLostAff",t[e]),eventStream.raiseEvent("insightLost".concat(e),t[e]),null===(r=t[e].timer)||void 0===r||r.stop()},reset:function(){var r;t[e].have=!1,t[e].probability=0,null===(r=t[e].timer)||void 0===r||r.stop()}};return Object.keys(d).indexOf(e)>-1&&(n.timer=new s("insightTimer".concat(e),d[e].duration),n.timer.addCallback(n.reset)),n},l=["undeaf","unblind","cleanseaura","addiction","aeon","agoraphobia","airfisted","amnesia","anorexia","asphyxiating","asthma","blackout","bleeding","blindness","blistered","bloodfire","bound","brokenleftarm","brokenrightarm","brokenleftleg","brokenrightleg","bruisedribs","burning","cadmuscurse","calcifiedskull","calcifiedtorso","claustrophobia","clumsiness","coldfate","concussion","condemned","conflagration","confusion","constricted","corruption","crackedribs","cremated","crushedthroat","daeggerimpale","damagedhead","damagedleftarm","damagedleftleg","damagedrightarm","damagedrightleg","darkshade","dazed","dazzled","deadening","deafness","death","deathsickness","deepsleep","degenerate","dehydrated","dementia","demonstain","depression","deteriorate","disloyalty","disrupted","dissonance","dizziness","empoweredmannaz","empoweredloshre","enlightenment","enmesh","ensorcelled","entangled","epilepsy","fear","flamefisted","flushings","frozen","generosity","grievouswounds","guilt","hamstrung","haemophilia","hallucinations","hatred","healthleech","heartseed","hecatecurse","hellsight","hindered","homunculusmercury","horror","hypersomnia","hypochondria","hypothermia","icefisted","impaled","impatience","indifference","inquisition","insomnia","internalbleeding","isolation","itching","justice","kaisurge","kkractlebrand","laceratedthroat","lapsingconsciousness","latched","lethargy","lightbind","loneliness","lovers","lullaby","manaleech","masochism","mildtrauma","mangledleftarm","mangledleftleg","mangledrightarm","mangledrightleg","mangledhead","mindclamp","mindravaged","muddled","mycalium","nausea","numbedleftarm","numbedrightarm","pacified","palpatarfeed","paralysis","paranoia","parasite","peace","penitence","petrified","phlogisticated","pinshot","pressure","prone","pyramides","pyre","rebbies","recklessness","retribution","revealed","sandfever","scalded","scrambledbrains","scytherus","selarnia","sensitivity","serioustrauma","shadowmadness","shivering","shyness","silenced","silver","skullfractures","slashedthroat","sleeping","slickness","slimeobscure","solarburn","spiritburn","stun","stupidity","stuttering","temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine","tenderskin","tension","timeflux","timeloop","tonguetied","torntendons","transfixation","trueblind","unweavingbody","unweavingmind","unweavingspirit","vertigo","vinewreathed","vitiated","vitrified","voidfisted","voyria","waterbonds","weakenedmind","weariness","webbed","whisperingmadness","wristfractures","unconsciousness","harmonic","bop","spiritwrack","bedevil","loki","moon","evileye","dragoncurse","swiftcurse"],d={test:{duration:10},weakenedmind:{duration:60},slimeobscure:{duration:30},palpatarfeed:{duration:20},cleanseaura:{duration:6}};l.forEach((function(e){t[e]=o(e)}));function c(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function u(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var m={},b={insomnia:!0,kola:!0,speed:!0,shield:!0,rebounding:!0,prismatic:!0,cloak:!0,fangbarrier:!0},p=function(){Object.assign(m,function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?c(Object(a),!0).forEach((function(r){u(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):c(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},b))};function h(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function f(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var g={},y={hp:2e4,mana:2e4,hpMax:2e4,manaMax:2e4,hpPercent:1,manaPercent:1,soulmaster:!1,enlightened:!1,mentalCount:0,physicalCount:0},v=function(){Object.assign(g,function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?h(Object(a),!0).forEach((function(r){f(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):h(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},y))},k={mentals:["claustrophobia","agoraphobia","lovers","dementia","epilepsy","hallucinations","confusion","stupidity","paranoia","vertigo","shyness","addiction","recklessness","masochism"],physicals:["asthma","paralysis","slickness","haemophilia","clumsiness","healthleech","sensitivity","darkshade"],bubonis:["vertigo","recklessness","confusion","masochism","paranoia","shyness","claustrophobia"],chimera:["confusion","hallucinations","agoraphobia","claustrophobia","dementia"],moon:["stupidity","masochism","hallucinations","hypersomnia","confusion","epilepsy","claustrophobia","agoraphobia"],whisperingmadness:["dementia","stupidity","confusion","hypersomnia","paranoia","hallucinations","impatience","addiction","agoraphobia","lovers","loneliness","recklessness","masochism"]};function _(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||O(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,r){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=O(e))||r&&e&&"number"==typeof e.length){a&&(e=a);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,t=!0,o=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return t=e.done,e},e:function(e){o=!0,s=e},f:function(){try{t||null==a.return||a.return()}finally{if(o)throw s}}}}function O(e,r){if(e){if("string"==typeof e)return q(e,r);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?q(e,r):void 0}}function q(e,r){(null==r||r>e.length)&&(r=e.length);for(var a=0,n=new Array(r);a<r;a++)n[a]=e[a];return n}var j=t,x=[[]],P=[],E=[],A={},S={id:""},z=function(e){j[e].got();var r,a=w(x);try{for(a.s();!(r=a.n()).done;){var n=r.value;n.includes(e)||n.push(e)}}catch(e){a.e(e)}finally{a.f()}E.push(e),I()},D=function(e){j[e].lost(),x.forEach((function(r){var a=r.indexOf(e);a>-1&&r.splice(a,1)})),T(),I()},C=function(e){var a,n=w(r[e].order);try{for(n.s();!(a=n.n()).done;){var i=a.value;if(1===t[i].probability)return D(i),!0}}catch(e){n.e(e)}finally{n.f()}return!1},T=function(){var e=!1,r=_(x);!1===e&&(r.sort(),e=!0);[9,7,5,3].forEach((function(e){!function(e){if(r.length>1&&r.length%e==0){for(var a=!0,n=0;n<r.length;n+=e)if(!M(r.slice(n,n+e))){a=!1;break}if(a){for(var i=r.length-(e-1);i>-1;i-=e)r.splice(i,e-1);return r.sort(),!0}return!1}}(e)}))},I=function(){var e=_(new Set(x.flat())),r=P.filter((function(r){return!e.includes(r)}));r.length>0&&r.forEach((function(e){return j[e].lost()})),(P=e).forEach((function(e){j[e].probability=parseFloat((Math.round(100*function(e){return x.filter((function(r){return r.includes(e)})).length/x.length}(e))/100).toFixed(2))})),eventStream.raiseEvent("insightUpdateAffs")},L=function(e,r){return e.length===r.length&&(e.sort(),r.sort(),!!e.every((function(e,a){return e===r[a]})))},M=function(e){for(var r=1;r<e.length;r++)if(!L(e[0],e[r]))return!1;return!0},B=z,G=D,F=function(e){if(r[e].bals_used.includes("salve")&&C(e))console.log("salveCure() true return");else{var a=r[e].order,n=[],i=!1;x.forEach((function(e){if(e.find((function(e){return a.includes(e)}))){i=!0;var r,s=w(e);try{var t=function(){var i=r.value;if(a.includes(i)){var s=e.filter((function(e){return e!==i}));s.length>0&&n.push(s)}};for(s.s();!(r=s.n()).done;)t()}catch(e){s.e(e)}finally{s.f()}}})),i&&(x=n.length>0?n:[[]]),T(),I(),E.push(e)}},R=function(e){var r=[];e.forEach((function(e){t[e].have=!0;var a,n=w(_(x.map((function(e){return e.slice(0)}))));try{for(n.s();!(a=n.n()).done;){var i=a.value;i.includes(e)||i.push(e),r.push(i)}}catch(e){n.e(e)}finally{n.f()}})),x=r.length>0?r:[[]],T(),I()},U=function(e){var r=[];e.forEach((function(e){t[e].have=!0;var a,n=w(_(x.map((function(e){return e.slice(0)}))));try{for(n.s();!(a=n.n()).done;){var i=a.value;i.includes(e)||(i.push(e),r.push(i.sort()))}}catch(e){n.e(e)}finally{n.f()}})),r.length>0&&(x=r),T(),I()},N=function(e,r){var a=j[e].probability;if(!(r&&1===a||!r&&0===a))if(r&&0===j[e].probability)z(e);else if(r||1!==j[e].probability){var n=[];x.forEach((function(a){a.includes(e)===r&&n.push(a)})),x=n,E.push("".concat(e,":").concat(r)),T(),I()}else D(e)},$=function(){for(var e in x=[[]],P=[],E=[],j){if(Object.hasOwnProperty.call(j,e))j[e].reset()}},H=function(e){var r=e.p,a=e.m,n=_(x);if((n=n.filter((function(e){var n=e.filter((function(e){return k.physicals.includes(e)})),i=e.filter((function(e){return k.mentals.includes(e)}));return n.length<=r&&i.length<=a}))).length<r+a)return console.error("Insight Error: No present branch for physical ".concat(r,", mental ").concat(a)),!1;x=_(n),T(),I()};function J(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function K(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var Q=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=t[e];return!!(a.have&&a.probability>=r)},V=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=!1;return Array.isArray(e)&&(a=e.every((function(e){return P.indexOf(e)>-1&&t[e].probability>=r}))),a},W=function(e){if(void 0===e||e==S.id)return!0},X={};function Y(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function Z(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}[{id:"balance",duration:2},{id:"equilibrium",duration:2},{id:"herb",duration:2},{id:"smoke",duration:2},{id:"salve",duration:2},{id:"focus",duration:2},{id:"tree",duration:2}].forEach((function(e){return X[e.id]=(a=(r=e).id,n=r.duration,(i={name:a,have:!0,got:function(){X[a].have=!0,eventStream.raiseEvent("insightGotBal",X[a]),eventStream.raiseEvent("insightGot".concat(a),X[a]),X[a].timer.stop()},lost:function(){var e;X[a].have=!1,eventStream.raiseEvent("insightLostBal",X[a]),eventStream.raiseEvent("insightLost".concat(a),X[a]),null===(e=X[a].timer)||void 0===e||e.start()},reset:function(){X[a].have=!0,X[a].timer.stop()},timer:new s("insightTimer".concat(a),n)}).timer.addCallback(i.reset),i);var r,a,n,i}));var ee={addAff:function(e){var r=e.aff,a=e.player;W(a)&&void 0!==r&&B(r)},getAff:function(e){var r=e.aff,a=e.player;if(W(a)&&void 0!==r)return insight.affs[r]},removeAff:function(e){var r=e.aff,a=e.player;W(a)&&void 0!==r&&G(r)},usedCure:function(e){var a=e.cure;e.player;!function(e){var a,n=null===(a=r[e])||void 0===a?void 0:a.blocks;void 0!==n&&n.forEach((function(e){Array.isArray(e)?V(e)&&e.forEach((function(e){return N(e,!1)})):Q(e)&&N(e,!1)}))}(a),F(a)},confirmAff:function(e){var r=e.aff,a=e.state,n=e.player;W(n)&&void 0!==r&&N(r,a)},reset:function(){$(),p(),v()},randomAffs:function(e){var r=e.affs,a=e.player;W(a)&&void 0!==r&&R(r)},readAuraConfirm:function(e){var r=e.p,a=e.m,n=e.player;W(n)&&H({p:r,m:a})},smartAffs:function(e){var r=e.affs,a=e.player;W(a)&&void 0!==r&&U(r)},addDef:function(e){var r=e.def,a=e.player;W(a)&&void 0!==r&&(m[r]=!0)},removeDef:function(e){var r=e.def,a=e.player;W(a)&&void 0!==r&&(m[r]=!1)},hasAff:Q,hasAffs:V,hasAnAff:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=!1;return Array.isArray(e)&&(a=P.some((function(a){return e.indexOf(a)>-1&&t[a].probability>=r}))),a},hasDef:function(e){return m[e]},setStatus:function(e){var r=e.id,a=e.value;e.player;g[r]=a},getStatus:function(e){return g[e]},currentAffs:function(){return P},currentAffDisplay:function(){var e=[];return P.forEach((function(r){return e.push("".concat(r,": ").concat(t[r].probability))})),e},nextLine:function(){var e=nexusclient.current_block.indexOf(nexusclient.current_line);return nexusclient.current_block[e+1].parsed_line.text()},target:S,occultist:k,affs:t,defs:m,bals:X,status:g,timeline:function(){return x},setTarget:function(e){var r;A.hasOwnProperty(e)?t=function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?J(Object(a),!0).forEach((function(r){K(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):J(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},A[e].affs):A[e]={affs:(r={},l.forEach((function(e){r[e]=o(e)})),r),defs:{},state:{}}},players:A};globalThis.insight=function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?Y(Object(a),!0).forEach((function(r){Z(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Y(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},ee),globalThis.insight.reset(),fetch("https://unpkg.com/nexsight/insight3.nxs",{cache:"no-store"}).then((function(e){return e.json()})).then((function(e){nexusclient.packages().get("insight3").apply(e,nexusclient.reflexes())}))}(); |
{ | ||
"name": "nexsight", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "insight for nexus", | ||
@@ -5,0 +5,0 @@ "main": "insight.min.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79369
3