Deploying to gh-pages from @ 33c147421e 🚀

This commit is contained in:
unanmed committed 2023-01-04 17:13:13 +00:00
1 parent d6be843a80
commit ac208c8a5f
15 files changed
+174 -102

No files matched your search

@@ -17,4 +17,4 @@ function noop(){}const uid=(()=>{let t=0;return()=>t++})();function isNullOrUnde
* https://www.chartjs.org
* (c) 2022 Chart.js Contributors
* Released under the MIT License
*/class Animator{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,a){const o=e.listeners[a],i=e.duration;o.forEach((a=>a({chart:t,initial:e.initial,numSteps:i,currentStep:Math.min(n-e.start,i)})))}_refresh(){this._request||(this._running=!0,this._request=requestAnimFrame.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((n,a)=>{if(!n.running||!n.items.length)return;const o=n.items;let i,r=o.length-1,l=!1;for(;r>=0;--r)i=o[r],i._active?(i._total>n.duration&&(n.duration=i._total),i.tick(t),l=!0):(o[r]=o[o.length-1],o.pop());l&&(a.draw(),this._notify(a,n,t,"progress")),o.length||(n.running=!1,this._notify(a,n,t,"complete"),n.initial=!1),e+=o.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let a=n.length-1;for(;a>=0;--a)n[a].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var animator=new Animator;const transparent="transparent",interpolators={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const a=color(t||transparent),o=a.valid&&color(e||transparent);return o&&o.valid?o.mix(a,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class Animation{constructor(t,e,n,a){const o=e[n];a=resolve([t.to,a,o,t.from]);const i=resolve([t.from,o,a]);this._active=!0,this._fn=t.fn||interpolators[t.type||typeof i],this._easing=effects$1[t.easing]||effects$1.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=i,this._to=a,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const a=this._target[this._prop],o=n-this._start,i=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(i,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=resolve([t.to,e,a,t.from]),this._from=resolve([t.from,a,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,a=this._prop,o=this._from,i=this._loop,r=this._to;let l;if(this._active=o!==r&&(i||e<n),!this._active)return this._target[a]=r,void this._notify(!0);e<0?this._target[a]=o:(l=e/n%2,l=i&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[a]=this._fn(o,r,l))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,n)=>{t.push({res:e,rej:n})}))}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let a=0;a<n.length;a++)n[a][e]()}}class Animations{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!isObject(t))return;const e=Object.keys(defaults.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach((a=>{const o=t[a];if(!isObject(o))return;const i={};for(const t of e)i[t]=o[t];(isArray(o.properties)&&o.properties||[a]).forEach((t=>{t!==a&&n.has(t)||n.set(t,i)}))}))}_animateOptions(t,e){const n=e.options,a=resolveTargetOptions(t,n);if(!a)return[];const o=this._createAnimations(a,n);return n.$shared&&awaitAll(t.options.$animations,n).then((()=>{t.options=n}),(()=>{})),o}_createAnimations(t,e){const n=this._properties,a=[],o=t.$animations||(t.$animations={}),i=Object.keys(e),r=Date.now();let l;for(l=i.length-1;l>=0;--l){const s=i[l];if("$"===s.charAt(0))continue;if("options"===s){a.push(...this._animateOptions(t,e));continue}const c=e[s];let d=o[s];const p=n.get(s);if(d){if(p&&d.active()){d.update(p,c,r);continue}d.cancel()}p&&p.duration?(o[s]=d=new Animation(p,t,s,c),a.push(d)):t[s]=c}return a}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(animator.add(this._chart,n),!0):void 0}}function awaitAll(t,e){const n=[],a=Object.keys(e);for(let o=0;o<a.length;o++){const e=t[a[o]];e&&e.active()&&n.push(e.wait())}return Promise.all(n)}function resolveTargetOptions(t,e){if(!e)return;let n=t.options;if(n)return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n;t.options=e}function scaleClip(t,e){const n=t&&t.options||{},a=n.reverse,o=void 0===n.min?e:0,i=void 0===n.max?e:0;return{start:a?i:o,end:a?o:i}}function defaultClip(t,e,n){if(!1===n)return!1;const a=scaleClip(t,n),o=scaleClip(e,n);return{top:o.end,right:a.end,bottom:o.start,left:a.start}}functiLine truncated
*/class Animator{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,a){const o=e.listeners[a],i=e.duration;o.forEach((a=>a({chart:t,initial:e.initial,numSteps:i,currentStep:Math.min(n-e.start,i)})))}_refresh(){this._request||(this._running=!0,this._request=requestAnimFrame.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((n,a)=>{if(!n.running||!n.items.length)return;const o=n.items;let i,r=o.length-1,l=!1;for(;r>=0;--r)i=o[r],i._active?(i._total>n.duration&&(n.duration=i._total),i.tick(t),l=!0):(o[r]=o[o.length-1],o.pop());l&&(a.draw(),this._notify(a,n,t,"progress")),o.length||(n.running=!1,this._notify(a,n,t,"complete"),n.initial=!1),e+=o.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let a=n.length-1;for(;a>=0;--a)n[a].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var animator=new Animator;const transparent="transparent",interpolators={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const a=color(t||transparent),o=a.valid&&color(e||transparent);return o&&o.valid?o.mix(a,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class Animation{constructor(t,e,n,a){const o=e[n];a=resolve([t.to,a,o,t.from]);const i=resolve([t.from,o,a]);this._active=!0,this._fn=t.fn||interpolators[t.type||typeof i],this._easing=effects$1[t.easing]||effects$1.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=i,this._to=a,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const a=this._target[this._prop],o=n-this._start,i=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(i,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=resolve([t.to,e,a,t.from]),this._from=resolve([t.from,a,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,a=this._prop,o=this._from,i=this._loop,r=this._to;let l;if(this._active=o!==r&&(i||e<n),!this._active)return this._target[a]=r,void this._notify(!0);e<0?this._target[a]=o:(l=e/n%2,l=i&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[a]=this._fn(o,r,l))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,n)=>{t.push({res:e,rej:n})}))}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let a=0;a<n.length;a++)n[a][e]()}}class Animations{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!isObject(t))return;const e=Object.keys(defaults.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach((a=>{const o=t[a];if(!isObject(o))return;const i={};for(const t of e)i[t]=o[t];(isArray(o.properties)&&o.properties||[a]).forEach((t=>{t!==a&&n.has(t)||n.set(t,i)}))}))}_animateOptions(t,e){const n=e.options,a=resolveTargetOptions(t,n);if(!a)return[];const o=this._createAnimations(a,n);return n.$shared&&awaitAll(t.options.$animations,n).then((()=>{t.options=n}),(()=>{})),o}_createAnimations(t,e){const n=this._properties,a=[],o=t.$animations||(t.$animations={}),i=Object.keys(e),r=Date.now();let l;for(l=i.length-1;l>=0;--l){const s=i[l];if("$"===s.charAt(0))continue;if("options"===s){a.push(...this._animateOptions(t,e));continue}const c=e[s];let d=o[s];const p=n.get(s);if(d){if(p&&d.active()){d.update(p,c,r);continue}d.cancel()}p&&p.duration?(o[s]=d=new Animation(p,t,s,c),a.push(d)):t[s]=c}return a}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(animator.add(this._chart,n),!0):void 0}}function awaitAll(t,e){const n=[],a=Object.keys(e);for(let o=0;o<a.length;o++){const e=t[a[o]];e&&e.active()&&n.push(e.wait())}return Promise.all(n)}function resolveTargetOptions(t,e){if(!e)return;let n=t.options;if(n)return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n;t.options=e}function scaleClip(t,e){const n=t&&t.options||{},a=n.reverse,o=void 0===n.min?e:0,i=void 0===n.max?e:0;return{start:a?i:o,end:a?o:i}}function defaultClip(t,e,n){if(!1===n)return!1;const a=scaleClip(t,n),o=scaleClip(e,n);return{top:o.end,right:a.end,bottom:o.start,left:a.start}}functiLine truncated
@@ -15,4 +15,4 @@ var Pt=Object.defineProperty;var Ct=(e,t,i)=>t in e?Pt(e,t,{enumerable:!0,config
* Released under the MIT License
*/class Animator{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,i,n,s){const a=i.listeners[s],r=i.duration;a.forEach(l=>l({chart:t,initial:i.initial,numSteps:r,currentStep:Math.min(n-i.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=requestAnimFrame.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let i=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;const a=n.items;let r=a.length-1,l=!1,c;for(;r>=0;--r)c=a[r],c._active?(c._total>n.duration&&(n.duration=c._total),c.tick(t),l=!0):(a[r]=a[a.length-1],a.pop());l&&(s.draw(),this._notify(s,n,t,"progress")),a.length||(n.running=!1,this._notify(s,n,t,"complete"),n.initial=!1),i+=a.length}),this._lastDate=t,i===0&&(this._running=!1)}_getAnims(t){const i=this._charts;let n=i.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},i.set(t,n)),n}listen(t,i,n){this._getAnims(t).listeners[i].push(n)}add(t,i){!i||!i.length||this._getAnims(t).items.push(...i)}has(t){return this._getAnims(t).items.length>0}start(t){const i=this._charts.get(t);!i||(i.running=!0,i.start=Date.now(),i.duration=i.items.reduce((n,s)=>Math.max(n,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const i=this._charts.get(t);return!(!i||!i.running||!i.items.length)}stop(t){const i=this._charts.get(t);if(!i||!i.items.length)return;const n=i.items;let s=n.length-1;for(;s>=0;--s)n[s].cancel();i.items=[],this._notify(t,i,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var animator=new Animator;const transparent="transparent",interpolators={boolean(e,t,i){return i>.5?t:e},color(e,t,i){const n=color(e||transparent),s=n.valid&&color(t||transparent);return s&&s.valid?s.mix(n,i).hexString():t},number(e,t,i){return e+(t-e)*i}};class Animation{constructor(t,i,n,s){const a=i[n];s=resolve([t.to,s,a,t.from]);const r=resolve([t.from,a,s]);this._active=!0,this._fn=t.fn||interpolators[t.type||typeof r],this._easing=effects$1[t.easing]||effects$1.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=i,this._prop=n,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,i,n){if(this._active){this._notify(!1);const s=this._target[this._prop],a=n-this._start,r=this._duration-a;this._start=n,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=resolve([t.to,i,s,t.from]),this._from=resolve([t.from,s,i])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const i=t-this._start,n=this._duration,s=this._prop,a=this._from,r=this._loop,l=this._to;let c;if(this._active=a!==l&&(r||i<n),!this._active){this._target[s]=l,this._notify(!0);return}if(i<0){this._target[s]=a;return}c=i/n%2,c=r&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[s]=this._fn(a,l,c)}wait(){const t=this._promises||(this._promises=[]);return new Promise((i,n)=>{t.push({res:i,rej:n})})}_notify(t){const i=t?"res":"rej",n=this._promises||[];for(let s=0;s<n.length;s++)n[s][i]()}}class Animations{constructor(t,i){this._chart=t,this._properties=new Map,this.configure(i)}configure(t){if(!isObject(t))return;const i=Object.keys(defaults.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const a=t[s];if(!isObject(a))return;const r={};for(const l of i)r[l]=a[l];(isArray(a.properties)&&a.properties||[s]).forEach(l=>{(l===s||!n.has(l))&&n.set(l,r)})})}_animateOptions(t,i){const n=i.options,s=resolveTargetOptions(t,n);if(!s)return[];const a=this._createAnimations(s,n);return n.$shared&&awaitAll(t.options.$animations,n).then(()=>{t.options=n},()=>{}),a}_createAnimations(t,i){const n=this._properties,s=[],a=t.$animations||(t.$animations={}),r=Object.keys(i),l=Date.now();let c;for(c=r.length-1;c>=0;--c){const d=r[c];if(d.charAt(0)==="$")continue;if(d==="options"){s.push(...this._animateOptions(t,i));continue}const u=i[d];let h=a[d];const f=n.get(d);if(h)if(f&&h.active()){h.update(f,u,l);continue}else h.cancel();if(!f||!f.duration){t[d]=u;continue}a[d]=h=new Animation(f,t,d,u),s.push(h)}return s}update(t,i){if(this._properties.size===0){Object.assign(t,i);return}const n=this._createAnimations(t,i);if(n.length)return animator.add(this._chart,n),!0}}function awaitAll(e,t){const i=[],n=Object.keys(t);for(let s=0;s<n.length;s++){const a=e[n[s]];a&&a.active()&&i.push(a.wait())}return Promise.all(i)}function resolveTargetOptions(e,t){if(!t)return;let i=e.options;if(!i){e.options=t;return}return i.$shared&&(e.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i}function scaleClip(e,t){const i=e&&e.options||{},n=i.reverse,s=i.min===void 0?t:0,a=i.max===void 0?t:0;return{start:n?a:s,end:n?s:a}}function defaultClip(e,t,i){if(i===!1)return!1;const n=scaleClip(e,i),s=scaleClip(t,i);return{top:s.end,right:n.end,bottom:s.start,left:n.stLine truncated
`)>-1?e.split(`
`):e}function createTooltipItem(e,t){const{element:i,datasetIndex:n,index:s}=t,a=e.getDatasetMeta(n).controller,{label:r,value:l}=a.getLabelAndValue(s);return{chart:e,label:r,parsed:a.getParsed(s),raw:e.data.datasets[n].data[s],formattedValue:l,dataset:a.getDataset(),dataIndex:s,datasetIndex:n,element:i}}function getTooltipSize(e,t){const i=e.chart.ctx,{body:n,footer:s,title:a}=e,{boxWidth:r,boxHeight:l}=t,c=toFont(t.bodyFont),d=toFont(t.titleFont),u=toFont(t.footerFont),h=a.length,f=s.length,g=n.length,m=toPadding(t.padding);let w=m.height,_=0,D=n.reduce((N,L)=>N+L.before.length+L.lines.length+L.after.length,0);if(D+=e.beforeBody.length+e.afterBody.length,h&&(w+=h*d.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),D){const N=t.displayColors?Math.max(l,c.lineHeight):c.lineHeight;w+=g*N+(D-g)*c.lineHeight+(D-1)*t.bodySpacing}f&&(w+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let B=0;const P=function(N){_=Math.max(_,i.measureText(N).width+B)};return i.save(),i.font=d.string,each(e.title,P),i.font=c.string,each(e.beforeBody.concat(e.afterBody),P),B=t.displayColors?r+2+t.boxPadding:0,each(n,N=>{each(N.before,P),each(N.lines,P),each(N.after,P)}),B=0,i.font=u.string,each(e.footer,P),i.restore(),_+=m.width,{width:_,height:w}}function determineYAlign(e,t){const{y:i,height:n}=t;return i<n/2?"top":i>e.height-n/2?"bottom":"center"}function doesNotFitWithAlign(e,t,i,n){const{x:s,width:a}=n,r=i.caretSize+i.caretPadding;if(e==="left"&&s+a+r>t.width||e==="right"&&s-a-r<0)return!0}function determineXAlign(e,t,i,n){const{x:s,width:a}=i,{width:r,chartArea:{left:l,right:c}}=e;let d="center";return n==="center"?d=s<=(l+c)/2?"left":"right":s<=a/2?d="left":s>=r-a/2&&(d="right"),doesNotFitWithAlign(d,e,t,i)&&(d="center"),d}function determineAlignment(e,t,i){const n=i.yAlign||t.yAlign||determineYAlign(e,i);return{xAlign:i.xAlign||t.xAlign||determineXAlign(e,t,i,n),yAlign:n}}function alignX(e,t){let{x:i,width:n}=e;return t==="right"?i-=n:t==="center"&&(i-=n/2),i}function alignY(e,t,i){let{y:n,height:s}=e;return t==="top"?n+=i:t==="bottom"?n-=s+i:n-=s/2,n}function getBackgroundPoint(e,t,i,n){const{caretSize:s,caretPadding:a,cornerRadius:r}=e,{xAlign:l,yAlign:c}=i,d=s+a,{topLeft:u,topRight:h,bottomLeft:f,bottomRight:g}=toTRBLCorners(r);let m=alignX(t,l);const w=alignY(t,c,d);return c==="center"?l==="left"?m+=d:l==="right"&&(m-=d):l==="left"?m-=Math.max(u,f)+s:l==="right"&&(m+=Math.max(h,g)+s),{x:_limitValue(m,0,n.width-t.width),y:_limitValue(w,0,n.height-t.height)}}function getAlignedX(e,t,i){const n=toPadding(i.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-n.right:e.x+n.left}function getBeforeAfterBodyLines(e){return pushOrConcat([],splitNewlines(e))}function createTooltipContext(e,t,i){return createContext(e,{tooltip:t,tooltipItems:i,type:"tooltip"})}function overrideCallbacks(e,t){const i=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return i?e.override(i):e}const defaultCallbacks={beforeTitle:noop,title(e){if(e.length>0){const t=e[0],i=t.chart.data.labels,n=i?i.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return i[t.dataIndex]}return""},afterTitle:noop,beforeBody:noop,beforeLabel:noop,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const i=e.formattedValue;return isNullOrUndef(i)||(t+=i),t},labelColor(e){const i=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:i.borderColor,backgroundColor:i.backgroundColor,borderWidth:i.borderWidth,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const i=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:i.pointStyle,rotation:i.rotation}},afterLabel:noop,afterBody:noop,beforeFooter:noop,footer:noop,afterFooter:noop};function invokeCallbackWithFallback(e,t,i,n){const s=e[t].call(i,n);return typeof s>"u"?defaultCallbacks[t].call(i,n):s}class Tooltip extends Element{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const i=this.chart,n=this.options.setContext(this.getContext()),s=n.enabled&&i.options.animation&&n Line truncated
`):e}function createTooltipItem(e,t){const{element:i,datasetIndex:n,index:s}=t,a=e.getDatasetMeta(n).controller,{label:r,value:l}=a.getLabelAndValue(s);return{chart:e,label:r,parsed:a.getParsed(s),raw:e.data.datasets[n].data[s],formattedValue:l,dataset:a.getDataset(),dataIndex:s,datasetIndex:n,element:i}}function getTooltipSize(e,t){const i=e.chart.ctx,{body:n,footer:s,title:a}=e,{boxWidth:r,boxHeight:l}=t,c=toFont(t.bodyFont),d=toFont(t.titleFont),u=toFont(t.footerFont),h=a.length,f=s.length,g=n.length,m=toPadding(t.padding);let w=m.height,_=0,D=n.reduce((N,L)=>N+L.before.length+L.lines.length+L.after.length,0);if(D+=e.beforeBody.length+e.afterBody.length,h&&(w+=h*d.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),D){const N=t.displayColors?Math.max(l,c.lineHeight):c.lineHeight;w+=g*N+(D-g)*c.lineHeight+(D-1)*t.bodySpacing}f&&(w+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let B=0;const P=function(N){_=Math.max(_,i.measureText(N).width+B)};return i.save(),i.font=d.string,each(e.title,P),i.font=c.string,each(e.beforeBody.concat(e.afterBody),P),B=t.displayColors?r+2+t.boxPadding:0,each(n,N=>{each(N.before,P),each(N.lines,P),each(N.after,P)}),B=0,i.font=u.string,each(e.footer,P),i.restore(),_+=m.width,{width:_,height:w}}function determineYAlign(e,t){const{y:i,height:n}=t;return i<n/2?"top":i>e.height-n/2?"bottom":"center"}function doesNotFitWithAlign(e,t,i,n){const{x:s,width:a}=n,r=i.caretSize+i.caretPadding;if(e==="left"&&s+a+r>t.width||e==="right"&&s-a-r<0)return!0}function determineXAlign(e,t,i,n){const{x:s,width:a}=i,{width:r,chartArea:{left:l,right:c}}=e;let d="center";return n==="center"?d=s<=(l+c)/2?"left":"right":s<=a/2?d="left":s>=r-a/2&&(d="right"),doesNotFitWithAlign(d,e,t,i)&&(d="center"),d}function determineAlignment(e,t,i){const n=i.yAlign||t.yAlign||determineYAlign(e,i);return{xAlign:i.xAlign||t.xAlign||determineXAlign(e,t,i,n),yAlign:n}}function alignX(e,t){let{x:i,width:n}=e;return t==="right"?i-=n:t==="center"&&(i-=n/2),i}function alignY(e,t,i){let{y:n,height:s}=e;return t==="top"?n+=i:t==="bottom"?n-=s+i:n-=s/2,n}function getBackgroundPoint(e,t,i,n){const{caretSize:s,caretPadding:a,cornerRadius:r}=e,{xAlign:l,yAlign:c}=i,d=s+a,{topLeft:u,topRight:h,bottomLeft:f,bottomRight:g}=toTRBLCorners(r);let m=alignX(t,l);const w=alignY(t,c,d);return c==="center"?l==="left"?m+=d:l==="right"&&(m-=d):l==="left"?m-=Math.max(u,f)+s:l==="right"&&(m+=Math.max(h,g)+s),{x:_limitValue(m,0,n.width-t.width),y:_limitValue(w,0,n.height-t.height)}}function getAlignedX(e,t,i){const n=toPadding(i.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-n.right:e.x+n.left}function getBeforeAfterBodyLines(e){return pushOrConcat([],splitNewlines(e))}function createTooltipContext(e,t,i){return createContext(e,{tooltip:t,tooltipItems:i,type:"tooltip"})}function overrideCallbacks(e,t){const i=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return i?e.override(i):e}const defaultCallbacks={beforeTitle:noop,title(e){if(e.length>0){const t=e[0],i=t.chart.data.labels,n=i?i.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return i[t.dataIndex]}return""},afterTitle:noop,beforeBody:noop,beforeLabel:noop,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const i=e.formattedValue;return isNullOrUndef(i)||(t+=i),t},labelColor(e){const i=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:i.borderColor,backgroundColor:i.backgroundColor,borderWidth:i.borderWidth,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const i=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:i.pointStyle,rotation:i.rotation}},afterLabel:noop,afterBody:noop,beforeFooter:noop,footer:noop,afterFooter:noop};function invokeCallbackWithFallback(e,t,i,n){const s=e[t].call(i,n);return typeof s>"u"?defaultCallbacks[t].call(i,n):s}class Tooltip extends Element{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const i=this.chart,n=this.options.setContext(this.getContext()),s=n.enabled&&i.options.animation&&n Line truncated
+2 -2
View File
@@ -18,7 +18,7 @@
<meta name="x5-fullscreen" content="true">
<meta name="x5-page-mode" content="app">
<link id="mota-css" type='text/css' href='/HumanBreak/styles.css' rel='stylesheet'>
<script type="module" crossorigin src="/HumanBreak/assets/index.72c5a971.js"></script>
<script type="module" crossorigin src="/HumanBreak/assets/index.83ced8af.js"></script>
<link rel="modulepreload" crossorigin href="/HumanBreak/assets/antdv.a0bb80c4.js">
<link rel="modulepreload" crossorigin href="/HumanBreak/assets/common.59ee6536.js">
<link rel="stylesheet" href="/HumanBreak/assets/index.9a87d8ee.css">
@@ -215,7 +215,7 @@
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
<script nomodule crossorigin id="vite-legacy-polyfill" src="/HumanBreak/assets/polyfills-legacy.852057b5.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="/HumanBreak/assets/index-legacy.6dcd3163.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="/HumanBreak/assets/index-legacy.b0ca823e.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>
</html>
+2 -39
View File
@@ -1502,7 +1502,6 @@ control.prototype.checkBlock = function () {
core.updateStatusBar(false, true);
}
}
this._checkBlock_ambush(core.status.checkBlock.ambush[loc]);
this._checkBlock_repulse(core.status.checkBlock.repulse[loc]);
};
@@ -1533,42 +1532,6 @@ control.prototype._checkBlock_repulse = function (repulse) {
core.insertAction(actions);
};
////// 捕捉 //////
control.prototype._checkBlock_ambush = function (ambush) {
if (!ambush || ambush.length == 0) return;
// 捕捉效果
var actions = [];
ambush.forEach(function (t) {
actions.push({
type: 'move',
loc: [t[0], t[1]],
steps: [t[3]],
time: 250,
keep: false,
async: true
});
});
actions.push({ type: 'waitAsync' });
// 强制战斗
ambush.forEach(function (t) {
actions.push({
type: 'function',
function:
'function() { ' +
"core.battle('" +
t[2] +
"', " +
t[0] +
',' +
t[1] +
', true, core.doAction); ' +
'}',
async: true
});
});
core.insertAction(actions);
};
////// 更新全地图显伤 //////
control.prototype.updateDamage = function (floorId, ctx) {
floorId = floorId || core.status.floorId;
@@ -1701,9 +1664,9 @@ control.prototype._updateDamage_extraDamage = function (floorId, onMap) {
});
} else {
// 检查捕捉
if (core.status.checkBlock.ambush[x + ',' + y]) {
if (core.status.checkBlock.mockery[x + ',' + y]) {
core.status.damage.extraData.push({
text: '!',
text: '嘲',
px: 32 * x + 16,
py: 32 * (y + 1) - 14,
color: '#ffaa33',
+2 -4
View File
@@ -1077,8 +1077,7 @@ maps.prototype._canMoveDirectly_checkNextPoint = function (blocksObj, x, y) {
// 是否存在阻激夹域伤害
if (core.status.checkBlock.damage[index]) return false;
if (core.status.checkBlock.repulse[index]) return false;
// 是否存在捕捉
if (core.status.checkBlock.ambush[index]) return false;
if (core.status.checkBlock.mockery[index]) return false;
return true;
};
@@ -1175,8 +1174,7 @@ maps.prototype._automaticRoute_deepAdd = function (x, y, blocks) {
}
// 绕过存在伤害的地方
deepAdd += (core.status.checkBlock.damage[x + ',' + y] || 0) * 100;
// 绕过捕捉
if (core.status.checkBlock.ambush[x + ',' + y]) deepAdd += 1000;
deepAdd += core.status.checkBlock.mockery[`${x},${y}`] ? 1000 : 0;
return deepAdd;
};
+11 -7
View File
@@ -1,10 +1,10 @@
var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
{
"greenSlime": {"name":"绿头怪","hp":100,"atk":11,"def":3,"money":0,"exp":1,"point":0,"special":[],"description":"一种极其低级的怪物,低级到普通人用手都可以打死。"},
"redSlime": {"name":"红头怪","hp":120,"atk":16,"def":6,"money":0,"exp":2,"point":0,"special":[],"value":10},
"blackSlime": {"name":"青头怪","hp":170,"atk":20,"def":8,"money":0,"exp":3,"point":0,"special":[]},
"slimelord": {"name":"粘液王","hp":200,"atk":58,"def":24,"money":0,"exp":8,"point":0,"special":[]},
"bat": {"name":"小蝙蝠","hp":60,"atk":15,"def":0,"money":0,"exp":2,"point":0,"special":[4]},
"redSlime": {"name":"红头怪","hp":120,"atk":16,"def":6,"money":0,"exp":2,"point":0,"special":[],"value":10,"description":"即使是最弱的怪物,也有进化的时候,对吧?"},
"blackSlime": {"name":"青头怪","hp":170,"atk":20,"def":8,"money":0,"exp":3,"point":0,"special":[],"description":"看,这就是最弱的怪物进化出的最强的怪物之一了"},
"slimelord": {"name":"粘液王","hp":200,"atk":58,"def":24,"money":0,"exp":8,"point":0,"special":[],"description":"看上去黏糊糊的,实际也确实黏糊糊的,据说是史莱姆族的长老级人物"},
"bat": {"name":"小蝙蝠","hp":60,"atk":15,"def":0,"money":0,"exp":2,"point":0,"special":[4],"description":"经常出现在山洞中,再平常不过了。但是这次它却有了攻击性。"},
"bigBat": {"name":"大蝙蝠","hp":150,"atk":17,"def":5,"money":0,"exp":4,"point":0,"special":[4],"crit":0,"charge":0,"courage":0,"together":0,"hungry":0,"value":100,"n":1000},
"redBat": {"name":"恐怖蝙蝠","hp":1200,"atk":260,"def":110,"money":1,"exp":32,"point":0,"special":[5]},
"vampire": {"name":"冥灵魔王","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
@@ -32,7 +32,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
"demonPriest": {"name":"魔神法师","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"goldHornSlime": {"name":"尖角怪","hp":1500,"atk":366,"def":166,"money":1,"exp":35,"point":0,"special":[]},
"silverSlime": {"name":"银头怪","hp":250,"atk":50,"def":20,"money":0,"exp":11,"point":0,"special":[2]},
"whiteHornSlime": {"name":"尖角怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"whiteHornSlime": {"name":"恐怖尖角怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"redSwordsman": {"name":"山间盗贼","hp":1000,"atk":175,"def":40,"money":1,"exp":24,"point":0,"special":[4],"n":8},
"poisonZombie": {"name":"绿兽人","hp":100,"atk":120,"def":0,"money":13,"exp":0,"point":0,"special":[12]},
"octopus": {"name":"血影","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
@@ -68,7 +68,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
"bowman": {"name":"猎人","hp":500,"atk":100,"def":50,"money":0,"exp":16,"point":0,"special":[24],"value":75},
"liteBowman": {"name":"山间猎手","hp":1200,"atk":200,"def":60,"money":1,"exp":27,"point":0,"special":[24]},
"crimsonZombie": {"name":"勇气之兽","hp":1800,"atk":2000,"def":-100,"money":1,"exp":35,"point":0,"special":[]},
"watcherSlime": {"name":"邪眼怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"watcherSlime": {"name":"邪眼史莱姆","hp":5000,"atk":900,"def":600,"money":1,"exp":50,"point":0,"special":[17]},
"mutantSlimeman": {"name":"变异史莱姆人","hp":350,"atk":70,"def":27,"money":0,"exp":13,"point":0,"special":[]},
"devilKnight": {"name":"恶灵骑士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"grayPriest": {"name":"智慧法王","hp":3000,"atk":600,"def":250,"money":1,"exp":40,"point":0,"special":[13]},
@@ -122,5 +122,9 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
"E549": {"name":"智慧之史","hp":1000,"atk":1000,"def":100,"money":1,"exp":35,"point":0,"special":[1],"crit":10000},
"E550": {"name":"智慧之兔","hp":1500,"atk":600,"def":200,"money":1,"exp":35,"point":0,"special":[8],"together":20},
"E556": {"name":"智慧之姆","hp":3000,"atk":800,"def":200,"money":1,"exp":45,"point":0,"special":[8],"together":20},
"E557": {"name":"智慧之神","hp":10000,"atk":2000,"def":800,"money":10,"exp":500,"point":0,"special":[]}
"E557": {"name":"智慧之神","hp":10000,"atk":2000,"def":800,"money":10,"exp":500,"point":0,"special":[]},
"E561": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"E562": {"name":"嘲讽剑客","hp":2000,"atk":1500,"def":600,"money":1,"exp":50,"point":0,"special":[19]},
"E563": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"E564": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}
}
+5 -2
View File
@@ -29,7 +29,10 @@ main.floors.MT22=
],
"3,9": [
"第二章的加点已开启,可以在技能树的前置技能下方选择",
"如果你玩过上个版本,直接跳到了本章,记得查看背包里面的各种道具,尤其是百科全书"
"如果你玩过上个版本,直接跳到了本章,记得查看背包里面的各种道具,尤其是百科全书,同时注意左边是你来的方向,那里还有些怪物"
],
"7,9": [
"对于电摇嘲讽的怪物,当一个点可以被多个怪物嘲讽时,会优先选择最靠左上角的怪物。其次,在进入嘲讽区域之前会自动存档"
]
},
"changeFloor": {
@@ -58,7 +61,7 @@ main.floors.MT22=
[142,142,482,482,492, 0, 0,484, 0,494,484,491,484,143,143],
[142,142,142,142,142, 0, 0, 0, 0,143,143,143,143,143,143],
[ 92, 0, 0, 0,441, 0, 0,484, 0, 0, 0, 0, 0,143,143],
[143,143, 0,129, 0, 0, 0, 0, 0, 0, 0, 0, 0,143,143],
[143,143, 0,129, 0, 0, 0,129, 0, 0, 0, 0, 0,143,143],
[143,143,492,143,492,143,492,143,492,143,492,143,492,143,143],
[143,143,482,143,482,143,482,143,482,143,482,143,482,143,143],
[143,143,482,143,482,143,482,143,482,143,482,143,482,143,143],
+2 -2
View File
@@ -36,8 +36,8 @@ main.floors.MT23=
"map": [
[143,143,143,143,143,143,143,143,143,143,143,143, 91,143,143],
[143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,143],
[143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94],
[143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,143],
[143, 0,275, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94],
[143, 0,562, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,143],
[ 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,143],
[143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,143],
[143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,143],
Binary file not shown.
+32 -17
View File
@@ -424,6 +424,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
if (core.getFlag('bladeOn') && core.getFlag('blade')) {
core.setFlag('blade', false);
}
if (core.getFlag('shieldOn') && core.getFlag('shield')) {
core.setFlag('shield', false);
}
// 事件的处理
var todo = [];
@@ -447,11 +450,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
);
}
core.push(todo, enemy.afterBattle);
if (
core.status.hero.loc.direction == 'up' ||
core.status.hero.loc.direction == 'down'
)
core.insertAction([{ type: 'moveAction' }]);
// 在这里增加其他的自定义事件需求
/*
if (enemyId=='xxx') {
@@ -694,14 +693,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
'经过两只相同的怪物中间,勇士生命值变成一半',
'#bb99ee'
],
[
17,
'仇恨',
'战斗前,怪物附加之前积累的仇恨值作为伤害;战斗后,释放一半的仇恨值。(每杀死一个怪物获得' +
(core.values.hatred || 0) +
'点仇恨值)',
'#b0b666'
],
[17, '先攻', '战斗时怪物首先攻击', '#b0b666'],
[
18,
'阻击',
@@ -714,7 +706,12 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
},
'#8888e6'
],
[19, '自爆', '战斗后勇士的生命值变成1', '#ff6666'],
[
19,
'电摇嘲讽',
'当勇士移动到怪物同行或同列时,勇士会直接冲向怪物,撞碎路上的所有地形和门,拾取路上的道具,与路上的怪物以及该怪物战斗',
'#ff6666'
],
[20, '无敌', '勇士无法打败怪物,除非拥有十字架', '#aaaaaa'],
[
21,
@@ -990,6 +987,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
// 战斗伤害不能为负值
if (per_damage < 0) per_damage = 0;
// 先攻
if (core.hasSpecial(mon_special, 17)) damage += per_damage;
// 2连击 & 3连击 & N连击
if (core.hasSpecial(mon_special, 4)) per_damage *= 2;
if (core.hasSpecial(mon_special, 5)) per_damage *= 3;
@@ -1431,7 +1431,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
var damage = {}, // 每个点的伤害值
type = {}, // 每个点的伤害类型
repulse = {}, // 每个点的阻击怪信息
ambush = {}; // 每个点的捕捉信息
mockery = {}; // 电摇嘲讽
var betweenAttackLocs = {}; // 所有可能的夹击点
var needCache = false;
var canGoDeadZone = core.flags.canGoDeadZone;
@@ -1528,7 +1528,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
}
}
// 射击
// 如果要防止激光伤害,可以直接简单的将 flag:no_laser 设为true
if (enemy && core.hasSpecial(enemy.special, 24)) {
var beyondVisual = false;
for (var nx = 0; nx < width; nx++) {
@@ -1618,6 +1617,22 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
}
}
// 电摇嘲讽
if (enemy && core.hasSpecial(enemy.special, 19)) {
for (let nx = 0; nx < width; nx++) {
if (!core.noPass(nx, y)) {
mockery[`${nx},${y}`] ??= [];
mockery[`${nx},${y}`].push([x, y]);
}
}
for (let ny = 0; ny < height; ny++) {
if (!core.noPass(x, ny)) {
mockery[`${x},${ny}`] ??= [];
mockery[`${x},${ny}`].push([x, y]);
}
}
}
// 夹击;在这里提前计算所有可能的夹击点,具体计算逻辑在下面
// 如果要防止夹击伤害,可以简单的将 flag:no_betweenAttack 设为true
if (
@@ -1721,7 +1736,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
damage: damage,
type: type,
repulse: repulse,
ambush: ambush,
mockery,
needCache: needCache,
cache: {}, // clear cache
haveHunt: haveHunt
+5 -1
View File
@@ -327,7 +327,11 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 =
"E549": 115,
"E550": 116,
"E556": 117,
"E557": 118
"E557": 118,
"E561": 119,
"E562": 120,
"E563": 121,
"E564": 122
},
"enemy48": {
"angel": 0,
+16 -16
View File
@@ -97,8 +97,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "红血瓶",
"text": ",生命+${core.values.redPotion}",
"itemEffect": "core.status.hero.hp += 100 * core.status.thisMap.ratio",
"itemEffectTip": ",生命+${100 * core.status.thisMap.ratio}",
"itemEffect": "core.status.hero.hp += 100 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)",
"itemEffectTip": ",生命+${100 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)}",
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
"canUseItemEffect": "true"
},
@@ -106,8 +106,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "蓝血瓶",
"text": ",生命+${core.values.bluePotion}",
"itemEffect": "core.status.hero.hp += 200 * core.status.thisMap.ratio",
"itemEffectTip": ",生命+${200 * core.status.thisMap.ratio}",
"itemEffect": "core.status.hero.hp += 200 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)",
"itemEffectTip": ",生命+${200 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)}",
"useItemEffect": "core.status.hero.hp += core.values.bluePotion",
"canUseItemEffect": "true"
},
@@ -115,8 +115,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "黄血瓶",
"text": ",生命+${core.values.yellowPotion}",
"itemEffect": "core.status.hero.hp += 400 * core.status.thisMap.ratio",
"itemEffectTip": ",生命+${400 * core.status.thisMap.ratio}",
"itemEffect": "core.status.hero.hp += 400 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)",
"itemEffectTip": ",生命+${400 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)}",
"useItemEffect": "core.status.hero.hp += core.values.yellowPotion",
"canUseItemEffect": "true"
},
@@ -124,8 +124,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "绿血瓶",
"text": ",生命+${core.values.greenPotion}",
"itemEffect": "core.status.hero.hp += 800 * core.status.thisMap.ratio",
"itemEffectTip": ",生命+${800 * core.status.thisMap.ratio}",
"itemEffect": "core.status.hero.hp += 800 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)",
"itemEffectTip": ",生命+${800 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)}",
"useItemEffect": "core.status.hero.hp += core.values.greenPotion",
"canUseItemEffect": "true"
},
@@ -1180,8 +1180,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "大红血瓶",
"text": ",生命+${core.values.redPotion}",
"itemEffect": "core.status.hero.hp += 1000 * core.status.thisMap.ratio",
"itemEffectTip": ",生命+${1000 * core.status.thisMap.ratio}",
"itemEffect": "core.status.hero.hp += 1000 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)",
"itemEffectTip": ",生命+${1000 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)}",
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
"canUseItemEffect": "true"
},
@@ -1193,8 +1193,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "大蓝血瓶",
"text": ",生命+${core.values.redPotion}",
"itemEffect": "core.status.hero.hp += 2000 * core.status.thisMap.ratio",
"itemEffectTip": ",生命+${2000 * core.status.thisMap.ratio}",
"itemEffect": "core.status.hero.hp += 2000 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)",
"itemEffectTip": ",生命+${2000 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)}",
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
"canUseItemEffect": "true"
},
@@ -1210,8 +1210,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "大绿血瓶",
"text": ",生命+${core.values.redPotion}",
"itemEffect": "core.status.hero.hp += 8000 * core.status.thisMap.ratio",
"itemEffectTip": ",生命+${8000 * core.status.thisMap.ratio}",
"itemEffect": "core.status.hero.hp += 8000 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)",
"itemEffectTip": ",生命+${8000 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)}",
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
"canUseItemEffect": "true"
},
@@ -1231,8 +1231,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "大黄血瓶",
"text": ",生命+${core.values.redPotion}",
"itemEffect": "core.status.hero.hp += 4000 * core.status.thisMap.ratio",
"itemEffectTip": ",生命+${4000 * core.status.thisMap.ratio}",
"itemEffect": "core.status.hero.hp += 4000 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)",
"itemEffectTip": ",生命+${4000 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)}",
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
"canUseItemEffect": "true"
},
+4
View File
@@ -485,6 +485,10 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
"558": {"cls":"items","id":"I558"},
"559": {"cls":"items","id":"I559"},
"560": {"cls":"items","id":"I560"},
"561": {"cls":"enemys","id":"E561"},
"562": {"cls":"enemys","id":"E562"},
"563": {"cls":"enemys","id":"E563"},
"564": {"cls":"enemys","id":"E564"},
"20037": {"cls":"tileset","id":"X20037","cannotOut":["up","left"],"cannotIn":["up","left"]},
"20038": {"cls":"tileset","id":"X20038","cannotOut":["up"],"cannotIn":["up"]},
"20039": {"cls":"tileset","id":"X20039","cannotOut":["up","right"],"cannotIn":["up","right"]},
Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 123 KiB

+91 -10
View File
@@ -2227,7 +2227,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
damaged[loc + direction] = true;
core.drawHeroAnimate('hand');
core.status.hero.hp -= 1000;
core.addPop(x * 32 + 16, y * 32 + 16, 1000);
core.addPop(x * 32 + 16, y * 32 + 16, -1000);
core.updateStatusBar();
if (core.status.hero.hp < 0) {
clearInterval(skill1);
@@ -2245,7 +2245,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
damaged[loc + direction] = true;
core.drawHeroAnimate('hand');
core.status.hero.hp -= 1000;
core.addPop(x * 32 + 16, y * 32 + 16, 1000);
core.addPop(x * 32 + 16, y * 32 + 16, -1000);
core.updateStatusBar();
if (core.status.hero.hp < 0) {
clearInterval(skill1);
@@ -2376,7 +2376,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
if (x == locs[index][0] && y == locs[index][1]) {
core.drawHeroAnimate('hand');
core.status.hero.hp -= 5000;
core.addPop(x * 32 + 16, y * 32 + 16, 5000);
core.addPop(x * 32 + 16, y * 32 + 16, -5000);
core.updateStatusBar();
if (core.status.hero.hp < 0) {
core.status.hero.hp = 0;
@@ -2552,7 +2552,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
hy = core.status.hero.loc.y;
if (Math.abs(hx - x) <= 1 && Math.abs(hy - y) <= 1) {
core.status.hero.hp -= 3000 * power;
core.addPop(x * 32 + 16, y * 32 + 16, 3000 * power);
core.addPop(x * 32 + 16, y * 32 + 16, -3000 * power);
core.updateStatusBar();
if (core.status.hero.hp < 0) {
core.status.hero.hp = 0;
@@ -2720,7 +2720,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
) {
damaged[i] = true;
core.status.hero.hp -= 3000;
core.addPop(x * 32 + 16, y * 32 + 16, 3000);
core.addPop(
x * 32 + 16,
y * 32 + 16,
-3000
);
core.updateStatusBar();
core.playSound('electron.mp3');
if (core.status.hero.hp < 0) {
@@ -3291,7 +3295,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
hy = core.status.hero.loc.y;
if (loc[0] == hx && loc[1] == hy) {
core.status.hero.hp -= 3000;
core.addPop(x * 32 + 16, y * 32 + 16, 3000);
core.addPop(x * 32 + 16, y * 32 + 16, -3000);
core.updateStatusBar();
if (core.status.hero.hp < 0) {
core.status.hero.hp = 0;
@@ -3336,7 +3340,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
loc2[1];
if (n1 * n2 <= 0) {
core.status.hero.hp -= damage;
core.addPop(x * 32 + 16, y * 32 + 16, damage);
core.addPop(x * 32 + 16, y * 32 + 16, -damage);
core.updateStatusBar();
core.playSound('electron.mp3');
if (core.status.hero.hp < 0) {
@@ -3362,7 +3366,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
loc2[1];
if (n1 * n2 <= 0) {
core.status.hero.hp -= damage;
core.addPop(x * 32 + 16, y * 32 + 16, damage);
core.addPop(x * 32 + 16, y * 32 + 16, -damage);
core.updateStatusBar();
core.playSound('electron.mp3');
if (core.status.hero.hp < 0) {
@@ -3380,7 +3384,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
popupDamage: function () {
// 伤害弹出
// 复写阻激夹域检测
control.prototype.checkBlock = function () {
control.prototype.checkBlock = function (forceMockery) {
var x = core.getHeroLoc('x'),
y = core.getHeroLoc('y'),
loc = x + ',' + y;
@@ -3410,9 +3414,86 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
core.updateStatusBar();
}
}
this._checkBlock_ambush(core.status.checkBlock.ambush[loc]);
this._checkBlock_repulse(core.status.checkBlock.repulse[loc]);
checkMockery(loc, forceMockery);
};
control.prototype.moveHero = function (direction, callback) {
// 如果正在移动,直接return
if (core.status.heroMoving != 0) return;
if (core.isset(direction)) core.setHeroLoc('direction', direction);
const nx = core.nextX();
const ny = core.nextY();
if (core.status.checkBlock.mockery[`${nx},${ny}`]) {
core.autosave();
}
if (callback) return this.moveAction(callback);
this._moveHero_moving();
};
function checkMockery(loc, force) {
if (core.status.lockControl && !force) return;
const mockery = core.status.checkBlock.mockery[loc];
if (mockery) {
mockery.sort((a, b) =>
a[0] === b[0] ? a[1] - b[1] : a[0] - b[0]
);
const action = [];
const [tx, ty] = mockery[0];
let { x, y } = core.status.hero.loc;
const dir =
x > tx ? 'left' : x < tx ? 'right' : y > ty ? 'up' : 'down';
const { x: dx, y: dy } = core.utils.scan[dir];
action.push({ type: 'changePos', direction: dir });
const blocks = core.getMapBlocksObj();
while (1) {
x += dx;
y += dy;
const block = blocks[`${x},${y}`];
if (block) {
block.event.cls === '';
if (
[
'animates',
'autotile',
'tileset',
'npcs',
'npc48'
].includes(block.event.cls)
) {
action.push(
{
type: 'hide',
loc: [[x, y]],
remove: true,
time: 0
},
{
type: 'animate',
name: 'hand',
loc: [x, y],
async: true
}
);
}
if (block.event.cls.startsWith('enemy')) {
action.push({ type: 'moveAction' });
}
}
action.push({ type: 'moveAction' });
if (x === tx && y === ty) break;
}
action.push({
type: 'function',
function: `function() { core.checkBlock(true); }`
});
action.push({ type: 'stopAsync' });
core.insertAction(action);
}
}
},
hotReload: function () {
if (main.mode !== 'play' || main.replayChecking) return;